mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Ulrich Drepper <drepper@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] information leak in sigaltstack
Date: Fri, 31 Jul 2009 14:31:51 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0907311428370.3304@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.01.0907311407040.24841@localhost.localdomain>



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

  reply	other threads:[~2009-07-31 21:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 19:48 Ulrich Drepper
2009-07-31 21:15 ` Linus Torvalds
2009-07-31 21:31   ` Linus Torvalds [this message]
2009-07-31 21:37     ` Ulrich Drepper
2009-08-01  0:28       ` Linus Torvalds
2009-08-01  7:22         ` Jakub Jelinek
2009-08-01 16:13           ` Linus Torvalds
2009-08-01 17:52         ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.01.0907311428370.3304@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®