Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1525588

Re: [PATCH v2] slab: Add POISON_POINTER_DELTA to ZERO_SIZE_PTR

From Christoph Lameter <cl@linux.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] slab: Add POISON_POINTER_DELTA to ZERO_SIZE_PTR
Date 2016-11-18 18:50 +0100
Message-ID <sEVst-1L1-5@gated-at.bofh.it> (permalink)
References <sErE6-7my-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 17 Nov 2016, Michael Ellerman wrote:

> Currently ZERO_OR_NULL_PTR() uses a trick of doing a single check that
> x <= ZERO_SIZE_PTR, and ignoring the fact that it also matches 1-15.

Well yes that was done so we do not add too many branches all over the
kernel.....


> That no longer really works once we add the poison delta, so split it
> into two checks. Assign x to a temporary to avoid evaluating it
> twice (suggested by Kees Cook).

And now you are doing just that.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] slab: Add POISON_POINTER_DELTA to ZERO_SIZE_PTR Michael Ellerman <mpe@ellerman.id.au> - 2016-11-17 11:00 +0100
  Re: [PATCH v2] slab: Add POISON_POINTER_DELTA to ZERO_SIZE_PTR Kees Cook <keescook@chromium.org> - 2016-11-17 21:10 +0100
  Re: [PATCH v2] slab: Add POISON_POINTER_DELTA to ZERO_SIZE_PTR Christoph Lameter <cl@linux.com> - 2016-11-18 18:50 +0100
    Re: [PATCH v2] slab: Add POISON_POINTER_DELTA to ZERO_SIZE_PTR Kees Cook <keescook@chromium.org> - 2016-11-18 19:00 +0100
      Re: [PATCH v2] slab: Add POISON_POINTER_DELTA to ZERO_SIZE_PTR Christoph Lameter <cl@linux.com> - 2016-11-18 19:40 +0100

csiph-web