Re: [PATCHv3 0/4] sys_indirect system call

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

On Mon, 19 Nov 2007 07:12:29 -0800
Ulrich Drepper <drepper@redhat.com> wrote:


Yes, this is what I understood.


Yes, so now, if you take this new definition of indirect_params,
its size is 12 bytes at least.

So when you recompile your old program (as you post it and as I commented on),
it will pass a >= 12 bytes data to kernel, with only first 4 bytes set to O_CLOEXEC.

Other bytes will contain junk (automatic variables are not set to 0 by compiler), 
and your program possibly break - if kernel socket() call was
extended to use new_data struct. (ie wanting O_CLOEXEC features +
 new ones with new_syscall_data1)

You have to take care of binary compatibility, but also that an old program
 (unaware of the new fields) will be re-compiled with new headers.


Yes, sure, but it should be a kernel issue, not a user space one at all,
as long as user provides the size of the data he want to pass to kernel (
and your patch does this already)

-
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)