Re: [PATCH] bfs: add sanity check at bfs_fill_super().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Having read the discussion carefully, I personally prefer to ignore
the fix as invalid, because mounting a filesystem image is a
privileged operation and if attempting to mount a corrupted image
causes a panic, that is no big deal, imho.

On 13 June 2018 at 14:33, Tetsuo Handa
<penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
> On 2018/05/10 8:53, Andrew Morton wrote:
>> On Thu, 10 May 2018 08:46:18 +0900 Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
>>
>>>> page-allocation-fauilure warning and a nice backtrace, etc.  Why
>>>> suppress all of that and add our custom warning instead?
>>>
>>> the intent of this patch is to avoid panic() by panic_on_warn == 1
>>> due to hitting
>>>
>>> struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags)
>>> {
>>>         unsigned int index;
>>>
>>>         if (unlikely(size > KMALLOC_MAX_SIZE)) {
>>>                 WARN_ON_ONCE(!(flags & __GFP_NOWARN)); /* <= this line */
>>>                 return NULL;
>>>         }
>>>
>>> when size to allocate is controlled by the filesystem image.
>>
>> Well, the same could happen with many many memory-allocation sites.
>> What's special about BFS?  If someone sets panic_on_warn=1 then
>> presumably this panic is the behaviour they wanted in this case.
>>
>
> Tigran, this patch is stalling. Do we want to apply this? Or, ignore as invalid?
>
> errors=panic mount option for ext4 case was ignored as invalid.
> http://lkml.kernel.org/r/CACT4Y+Z+2YW_VALJzzQr6hLsviA=dXk3iFqwVf+P5zqojeC9Zg@xxxxxxxxxxxxxx
>
> But I prefer avoiding crashes if we can fix it.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux