All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Matthew Wilcox <willy@infradead.org>
Cc: Christoph Lameter <cl@linux.com>, Linux MM <linux-mm@kvack.org>,
	Matthew Wilcox <mawilcox@microsoft.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jan Kara <jack@suse.cz>,
	jlayton@redhat.com, Mel Gorman <mgorman@techsingularity.net>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] slab: __GFP_ZERO is incompatible with a constructor
Date: Sat, 04 Aug 2018 14:00:35 +0000	[thread overview]
Message-ID: <e14d7aea-233d-57ae-c1e2-1d14369dd305@roeck-us.net> (raw)
In-Reply-To: <CAMuHMdXXYH_7oVJJ5sGWFj_-WbjuMdooXTqBfV+z0CzR193T3A@mail.gmail.com>

On 08/04/2018 02:28 AM, Geert Uytterhoeven wrote:
> On Sat, Aug 4, 2018 at 12:34 AM Matthew Wilcox <willy@infradead.org> wrote:
>> On Fri, Aug 03, 2018 at 02:22:57PM -0700, Guenter Roeck wrote:
>>> On Thu, Apr 12, 2018 at 12:13:22PM -0700, Matthew Wilcox wrote:
>>>> From: Matthew Wilcox <mawilcox@microsoft.com>
>>>> __GFP_ZERO requests that the object be initialised to all-zeroes,
>>>> while the purpose of a constructor is to initialise an object to a
>>>> particular pattern.  We cannot do both.  Add a warning to catch any
>>>> users who mistakenly pass a __GFP_ZERO flag when allocating a slab with
>>>> a constructor.
>>>>
>>>> Fixes: d07dbea46405 ("Slab allocators: support __GFP_ZERO in all allocators")
>>>> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
>>>> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
>>>> Acked-by: Vlastimil Babka <vbabka@suse.cz>
>>>> Acked-by: Michal Hocko <mhocko@suse.com>
>>>
>>> Seen with v4.18-rc7-139-gef46808 and v4.18-rc7-178-g0b5b1f9a78b5 when
>>> booting sh4 images in qemu:
>>
>> Thanks!  It's under discussion here:
>>
>> https://marc.info/?t\x153301426900002&r=1&w=2
> 
> and https://www.spinics.net/lists/linux-sh/msg53298.html
> 
>> also reported here with a bogus backtrace:
>>
>> https://marc.info/?l=linux-sh&m\x153305755505935&w=2
>>
>> Short version: It's a bug that's been present since 2009 and nobody
>> noticed until now.  And nobody's quite sure what the effect of this
>> bug is.

Though now it is making a lot of noise :-).

I just found two more 0-day bugs, so maybe improved testing and log messages
such as the one encountered here do help a bit.

Guenter

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Matthew Wilcox <willy@infradead.org>
Cc: Christoph Lameter <cl@linux.com>, Linux MM <linux-mm@kvack.org>,
	Matthew Wilcox <mawilcox@microsoft.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jan Kara <jack@suse.cz>,
	jlayton@redhat.com, Mel Gorman <mgorman@techsingularity.net>,
	Linux-sh list <linux-sh@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] slab: __GFP_ZERO is incompatible with a constructor
Date: Sat, 4 Aug 2018 07:00:35 -0700	[thread overview]
Message-ID: <e14d7aea-233d-57ae-c1e2-1d14369dd305@roeck-us.net> (raw)
In-Reply-To: <CAMuHMdXXYH_7oVJJ5sGWFj_-WbjuMdooXTqBfV+z0CzR193T3A@mail.gmail.com>

On 08/04/2018 02:28 AM, Geert Uytterhoeven wrote:
> On Sat, Aug 4, 2018 at 12:34 AM Matthew Wilcox <willy@infradead.org> wrote:
>> On Fri, Aug 03, 2018 at 02:22:57PM -0700, Guenter Roeck wrote:
>>> On Thu, Apr 12, 2018 at 12:13:22PM -0700, Matthew Wilcox wrote:
>>>> From: Matthew Wilcox <mawilcox@microsoft.com>
>>>> __GFP_ZERO requests that the object be initialised to all-zeroes,
>>>> while the purpose of a constructor is to initialise an object to a
>>>> particular pattern.  We cannot do both.  Add a warning to catch any
>>>> users who mistakenly pass a __GFP_ZERO flag when allocating a slab with
>>>> a constructor.
>>>>
>>>> Fixes: d07dbea46405 ("Slab allocators: support __GFP_ZERO in all allocators")
>>>> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
>>>> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
>>>> Acked-by: Vlastimil Babka <vbabka@suse.cz>
>>>> Acked-by: Michal Hocko <mhocko@suse.com>
>>>
>>> Seen with v4.18-rc7-139-gef46808 and v4.18-rc7-178-g0b5b1f9a78b5 when
>>> booting sh4 images in qemu:
>>
>> Thanks!  It's under discussion here:
>>
>> https://marc.info/?t=153301426900002&r=1&w=2
> 
> and https://www.spinics.net/lists/linux-sh/msg53298.html
> 
>> also reported here with a bogus backtrace:
>>
>> https://marc.info/?l=linux-sh&m=153305755505935&w=2
>>
>> Short version: It's a bug that's been present since 2009 and nobody
>> noticed until now.  And nobody's quite sure what the effect of this
>> bug is.

Though now it is making a lot of noise :-).

I just found two more 0-day bugs, so maybe improved testing and log messages
such as the one encountered here do help a bit.

Guenter

  reply	other threads:[~2018-08-04 14:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11  6:03 [PATCH v2 0/2] Fix __GFP_ZERO vs constructor Matthew Wilcox
2018-04-11  6:03 ` [PATCH v2 1/2] Fix NULL pointer in page_cache_tree_insert Matthew Wilcox
2018-04-11  6:03 ` [PATCH v2 2/2] slab: __GFP_ZERO is incompatible with a constructor Matthew Wilcox
2018-04-11  6:35   ` Michal Hocko
2018-04-11 13:44   ` Christopher Lameter
2018-04-11 19:24     ` Matthew Wilcox
2018-04-11 21:11       ` Christopher Lameter
2018-04-11 23:56         ` Matthew Wilcox
2018-04-12 14:10           ` Christopher Lameter
2018-04-12 14:27             ` Matthew Wilcox
2018-04-12 15:15               ` Christopher Lameter
2018-04-12 19:13               ` [PATCH v3 " Matthew Wilcox
2018-04-16 15:10                 ` Christopher Lameter
2018-08-03 21:22                 ` Guenter Roeck
2018-08-03 22:33                   ` Matthew Wilcox
2018-08-03 22:33                     ` Matthew Wilcox
2018-08-04  9:28                     ` Geert Uytterhoeven
2018-08-04  9:28                       ` Geert Uytterhoeven
2018-08-04 14:00                       ` Guenter Roeck [this message]
2018-08-04 14:00                         ` Guenter Roeck
2018-04-12  0:54 ` [PATCH v2 0/2] Fix __GFP_ZERO vs constructor Minchan Kim
2018-04-12 19:24   ` Matthew Wilcox
2018-04-13 12:44     ` Michal Hocko

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=e14d7aea-233d-57ae-c1e2-1d14369dd305@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=geert@linux-m68k.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jack@suse.cz \
    --cc=jlayton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mawilcox@microsoft.com \
    --cc=mgorman@techsingularity.net \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.