Re: [PATCHv3 0/4] sys_indirect system call

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Eric Dumazet <dada1@...>
Cc: <linux-kernel@...>, <akpm@...>, <mingo@...>, <tglx@...>, <torvalds@...>
Date: Monday, November 19, 2007 - 11:12 am

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Dumazet wrote:

No, it doesn't.  The setup is indefinitely expandable.

All you need to do, if it becomes necessary to have more than an int, is
to define a little structure for the system call and then use it.  The
only requirement is that the code has to assume a value of zero is what
is used today.  That's the whole point.

union indirect_params {
  struct {
    int flags;
  } file_flags;
  struct {
    int flags;
    int new_syscall_data1;
    sigset_t and_a_sigmask;
  } new_data;
};

Old programs will set only the 'flags' member of 'new_data' while new
once can also set the new elements.  New programs on old kernels will
eithe have failing calls since the structure is too big or the call will
not have all the desired effects.  The latter can be tested for.



There is no overhead introduced through the union.  The only reason the
union is there in the first place is to allocate sufficient data in
task_struct to cover all cases.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHQafd2ijCOnn/RHQRAlSFAJ99lahwCDZGRSlIHCov5bWowrpoiQCgwvW4
LDSEusNUpMfIE1ywBCRDBfc=
=ChVT
-----END PGP SIGNATURE-----
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv3 0/4] sys_indirect system call, Ulrich Drepper, (Sat Nov 17, 1:31 am)
Re: [PATCHv3 0/4] sys_indirect system call, Eric Dumazet, (Mon Nov 19, 9:52 am)
Re: [PATCHv3 0/4] sys_indirect system call, Ulrich Drepper, (Mon Nov 19, 11:12 am)
Re: [PATCHv3 0/4] sys_indirect system call, Eric Dumazet, (Mon Nov 19, 11:43 am)
Re: [PATCHv3 0/4] sys_indirect system call, Ulrich Drepper, (Mon Nov 19, 11:48 am)
Re: [PATCHv3 0/4] sys_indirect system call, Eric Dumazet, (Mon Nov 19, 12:14 pm)
Re: [PATCHv3 0/4] sys_indirect system call, Ingo Molnar, (Mon Nov 19, 3:08 pm)
Re: [PATCHv3 0/4] sys_indirect system call, dean gaudet, (Tue Nov 20, 10:11 am)
Re: [PATCHv3 0/4] sys_indirect system call, Ulrich Drepper, (Tue Nov 20, 12:16 pm)
Re: [PATCHv3 0/4] sys_indirect system call, H. Peter Anvin, (Sun Nov 18, 3:44 am)
Re: [PATCHv3 0/4] sys_indirect system call, Ulrich Drepper, (Sun Nov 18, 5:36 am)
Re: [PATCHv3 0/4] sys_indirect system call, H. Peter Anvin, (Sun Nov 18, 3:37 pm)
Re: [PATCHv3 0/4] sys_indirect system call, Ulrich Drepper, (Mon Nov 19, 11:28 pm)
Re: [PATCHv3 0/4] sys_indirect system call, H. Peter Anvin, (Tue Nov 20, 12:27 am)