From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Vlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@kernel.org>
Cc: Kyungtae Kim <kt0755@gmail.com>,
akpm@linux-foundation.org, pavel.tatashin@microsoft.com,
osalvador@suse.de, rppt@linux.vnet.ibm.com, aaron.lu@intel.com,
iamjoonsoo.kim@lge.com, alexander.h.duyck@linux.intel.com,
mgorman@techsingularity.net, lifeasageek@gmail.com,
threeearcat@gmail.com, syzkaller@googlegroups.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Subject: Re: UBSAN: Undefined behaviour in mm/page_alloc.c
Date: Fri, 9 Nov 2018 19:24:48 +0900 [thread overview]
Message-ID: <9e17d033-b2ab-3edb-ae0b-90d4f713e55b@i-love.sakura.ne.jp> (raw)
In-Reply-To: <d8757554-45f4-1240-dc8a-0f918ae0e5f3@suse.cz>
On 2018/11/09 19:10, Vlastimil Babka wrote:>>>> + * reclaim >= MAX_ORDER areas which will never succeed. Callers may
>>>> + * be using allocators in order of preference for an area that is
>>>> + * too large.
>>>> + */
>>>> + if (order >= MAX_ORDER) {
>>>
>>> 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?
>
> Agreed.
>
If someone has written a module with __GFP_NOFAIL for an architecture
where PAGE_SIZE == 2048KB, and someone else tried to use that module on
another architecture where PAGE_SIZE == 4KB. You are saying that
triggering NULL pointer dereference is a fault of that user's ignorance
about MM. You are saying that everyone knows internal of MM. Sad...
next prev parent reply other threads:[~2018-11-09 10:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 4:09 Kyungtae Kim
2018-11-09 8:42 ` Vlastimil Babka
2018-11-09 8:43 ` Michal Hocko
2018-11-09 9:41 ` Tetsuo Handa
2018-11-09 9:56 ` Michal Hocko
2018-11-09 10:07 ` Tetsuo Handa
2018-11-09 10:25 ` Michal Hocko
2018-11-09 10:10 ` Vlastimil Babka
2018-11-09 10:22 ` Michal Hocko
2018-11-09 10:24 ` Tetsuo Handa [this message]
2018-11-09 10:28 ` Michal Hocko
2018-11-09 10:52 ` Balbir Singh
2018-11-09 9:56 ` Mel Gorman
2018-11-13 9:43 ` Michal Hocko
2018-11-13 23:15 ` Andrew Morton
2018-11-13 23:23 ` Vlastimil Babka
2018-11-13 23:32 ` Andrew Morton
2018-11-14 0:05 ` Vlastimil Babka
2018-11-19 23:57 ` Pavel Machek
2018-11-13 23:29 ` Andrew Morton
2018-11-14 7:10 ` Michal Hocko
2018-11-16 23:43 ` Dmitry Vyukov
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=9e17d033-b2ab-3edb-ae0b-90d4f713e55b@i-love.sakura.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=aaron.lu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.h.duyck@linux.intel.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=khlebnikov@yandex-team.ru \
--cc=kt0755@gmail.com \
--cc=lifeasageek@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=osalvador@suse.de \
--cc=pavel.tatashin@microsoft.com \
--cc=rppt@linux.vnet.ibm.com \
--cc=syzkaller@googlegroups.com \
--cc=threeearcat@gmail.com \
--cc=vbabka@suse.cz \
/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