mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Kees Cook' <keescook@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Martin Uecker <Martin.Uecker@med.uni-goettingen.de>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Randy Dunlap <rdunlap@infradead.org>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	"Ingo Molnar" <mingo@kernel.org>, Ian Abbott <abbotti@mev.co.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel-hardening@lists.openwall.com"
	<kernel-hardening@lists.openwall.com>
Subject: RE: [PATCH v6] kernel.h: Retain constant expression output for max()/min()
Date: Tue, 27 Mar 2018 08:55:55 +0000	[thread overview]
Message-ID: <0c29e85f7fa64ff488d60b0f5647257b@AcuMS.aculab.com> (raw)
In-Reply-To: <20180326221554.GA45166@beast>

From: Kees Cook
> Sent: 26 March 2018 23:16
...
> +#define __typecheck(x, y) \
> +		(!!(sizeof((typeof(x)*)1 == (typeof(y)*)1)))

The two 1 should probably be at least 8 before the compiler starts
bleating about accesses to misaligned addresses being undefined.

	David


  parent reply	other threads:[~2018-03-27  8:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 22:15 Kees Cook
2018-03-27  0:52 ` Linus Torvalds
2018-03-27 12:00   ` Uecker, Martin
2018-03-27  5:47 ` Ingo Molnar
2018-03-31  4:57   ` Kees Cook
2018-03-31  5:34     ` Ingo Molnar
2018-03-31 13:37       ` Kees Cook
2018-03-27  8:55 ` David Laight [this message]
2018-03-27 10:03 ` Miguel Ojeda
2018-03-27 10:43 ` kbuild test robot
2018-03-27 18:39 ` kbuild test robot

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=0c29e85f7fa64ff488d60b0f5647257b@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=Martin.Uecker@med.uni-goettingen.de \
    --cc=abbotti@mev.co.uk \
    --cc=akpm@linux-foundation.org \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mingo@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=torvalds@linux-foundation.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®