[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0907311428370.3304@localhost.localdomain>
Date: Fri, 31 Jul 2009 14:31:51 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ulrich Drepper <drepper@...hat.com>
cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists