[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a74e6a5d-d4c1-9006-60af-de52afafebb2@i-love.sakura.ne.jp>
Date: Fri, 9 Nov 2018 19:07:49 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: Michal Hocko <mhocko@...nel.org>
Cc: Kyungtae Kim <kt0755@...il.com>, akpm@...ux-foundation.org,
pavel.tatashin@...rosoft.com, vbabka@...e.cz, osalvador@...e.de,
rppt@...ux.vnet.ibm.com, aaron.lu@...el.com,
iamjoonsoo.kim@....com, alexander.h.duyck@...ux.intel.com,
mgorman@...hsingularity.net, lifeasageek@...il.com,
threeearcat@...il.com, syzkaller@...glegroups.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Subject: Re: UBSAN: Undefined behaviour in mm/page_alloc.c
On 2018/11/09 18:56, Michal Hocko wrote:
> Does this following look better?
Yes.
>> Also, why not to add BUG_ON(gfp_mask & __GFP_NOFAIL); here?
>
> Because we do not want to blow up the kernel just because of a stupid
> usage of the allocator. Can you think of an example where it would
> actually make any sense?
>
> I would argue that such a theoretical abuse would blow up on an
> unchecked NULL ptr access. Isn't that enough?
We after all can't avoid blowing up the kernel even if we don't add BUG_ON().
Stopping with BUG_ON() is saner than NULL pointer dereference messages.
Powered by blists - more mailing lists