lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210715114424.GR3809@techsingularity.net>
Date:   Thu, 15 Jul 2021 12:44:24 +0100
From:   Mel Gorman <mgorman@...hsingularity.net>
To:     yong w <yongw.pur@...il.com>
Cc:     wuzhouhui <wuzhouhui14@...ls.ucas.ac.cn>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org, nico@...xnic.net, wang.yong12@....com.cn
Subject: Re: Re: [BUG] ramfs system panic when using dd to create files

On Wed, Jul 14, 2021 at 10:30:22PM +0800, yong w wrote:
> Thanks for your reply!
> 
> > Limit max size of ramfs.
> It's no use using size to limit the size of ramfs.
> "mount -t ramfs -o size=10M ramfs /ramfs" is the command i use.
> 

ramfs does not support size= limiting, that's what tmpfs is for.

> >
> > The comments already explains why kernel should panic on this situation:
> >             /*
> >              * If we got here due to an actual allocation at the
> >              * system level, we cannot survive this and will enter
> >              * an endless loop in the allocator. Bail out now.
> >              */
>
> But it causes panic, actually , I don't want it panics

Then use tmpfs and specify size=. It's mentioned in filesystems/tmpfs.rst

--8<--
If you compare it to ramfs (which was the template to create tmpfs)
you gain swapping and limit checking. Another similar thing is the RAM
disk (/dev/ram*), which simulates a fixed size hard disk in physical
RAM, where you have to create an ordinary filesystem on top. Ramdisks
cannot swap and you do not have the possibility to resize them.
--8<--

-- 
Mel Gorman
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ