|
Re: [PATCH] information leak in sigaltstack: msg#12046linux-kernel
On Fri, 31 Jul 2009, Ulrich Drepper wrote: > > The following patch should fix the issue. Hmm. Is there any reason not to do an unconditional memset(), and then expect gcc to avoid the unnecessary stores? I realize gcc may not do that, but we could always _hope_. Also, is there really any reason to believe that the only hole can be after ss_flags, and that it's only the case when ss_flags is in the middle? Quite frankly, as far as I can tell, you could have an "int ss_flags" at the _end_ of the structure too, and have the same issue (padding out to the alignment of the struct). For an example of that "'int ss_flags' at the end" look at MIPS. Now, you'd end up with a memset() in that case (since it certainly won't match the offsetof), but my point is, the conditional really looks very arbitrary and rather strange. I'd rather see it unconditional, even if it costs three unnecessary writes or whatever. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |