Messages in this thread |  | | | Date | Fri, 31 Jul 2009 14:31:51 -0700 (PDT) | | From | Linus Torvalds <> | | Subject | Re: [PATCH] information leak in sigaltstack |
| |
On Fri, 31 Jul 2009, Linus Torvalds wrote: > > 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.
.. and if we really do want the conditional, maybe just make it something like
/* * ss_flags is often generally 'int', and may cause * holes in the structure due to alignment. */ if (alignof(oss.ss_flags) != alignof(oss)) memset(&oss, 0, sizeof(oss)); instead? That would seem to be less subtle, and more to-the-point.
Linus
|  |