Re: [PATCH] signal: Don't init struct kernel_siginfo fields to zero again

2020-12-21 Thread Eric W. Biederman
Leesoo Ahn writes: > clear_siginfo() is responsible for clearing struct kernel_siginfo object. > It's obvious that manually initializing those fields is needless as > a commit[1] explains why the function introduced and its guarantee that > all bits in the struct are cleared after it. The fields

Re: [PATCH] signal: Don't init struct kernel_siginfo fields to zero again

2020-12-21 Thread Leesoo Ahn
20. 12. 21. 오전 12:43에 Rae Kim 이(가) 쓴 글: It looks like compiler optimization is smart enough to know that assigning zero is unnecessary after clear_siginfo() which is memset() under the hood. At least in my x86_64 machine, w/ or w/o this patch, there is no difference in final compiled machine cod

Re: [PATCH] signal: Don't init struct kernel_siginfo fields to zero again

2020-12-20 Thread Christian Brauner
On Mon, Dec 21, 2020 at 12:43:05AM +0900, Rae Kim wrote: > > It looks like compiler optimization is smart enough to know that > assigning zero is unnecessary after clear_siginfo() which is memset() > under the hood. At least in my x86_64 machine, w/ or w/o this patch, > there is no difference in f

Re: [PATCH] signal: Don't init struct kernel_siginfo fields to zero again

2020-12-20 Thread Rae Kim
It looks like compiler optimization is smart enough to know that assigning zero is unnecessary after clear_siginfo() which is memset() under the hood. At least in my x86_64 machine, w/ or w/o this patch, there is no difference in final compiled machine code. (I've compared "objdump -d" results fo

Re: [PATCH] signal: Don't init struct kernel_siginfo fields to zero again

2020-12-20 Thread Christian Brauner
On Sun, Dec 20, 2020 at 04:45:54PM +0900, Leesoo Ahn wrote: > clear_siginfo() is responsible for clearing struct kernel_siginfo object. > It's obvious that manually initializing those fields is needless as > a commit[1] explains why the function introduced and its guarantee that > all bits in the s

Re: [PATCH] signal: Don't init struct kernel_siginfo fields to zero again

2020-12-20 Thread Oleg Nesterov
On 12/20, Leesoo Ahn wrote: > > clear_siginfo() is responsible for clearing struct kernel_siginfo object. > It's obvious that manually initializing those fields is needless as > a commit[1] explains why the function introduced and its guarantee that > all bits in the struct are cleared after it. >

[PATCH] signal: Don't init struct kernel_siginfo fields to zero again

2020-12-19 Thread Leesoo Ahn
clear_siginfo() is responsible for clearing struct kernel_siginfo object. It's obvious that manually initializing those fields is needless as a commit[1] explains why the function introduced and its guarantee that all bits in the struct are cleared after it. [1]: commit 8c5dbf2ae00b ("signal: Intr