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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1304051547440.2314@winds.org>
Date:	Fri, 5 Apr 2013 15:53:12 -0400 (EDT)
From:	Byron Stanoszek <bstanoszek@...time.com>
To:	Rob Landley <rob@...dley.net>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [RFC] rootmpfs

Rob,

FWIW I have a patch to do something like this. It even gives you a rdsize=xxx
tunable kernel parameter that lets you specify the size of the tmpfs, which
acts like the -osize= mount flag (so phrases like 100M or 20% works). So doing
things like 'cat /dev/zero > filename' will not run you out of all available
memory. (Note: If you don't specify rdsize= on the kernel command line, it will
not convert rootfs to tmpfs).

See attached.

  -Byron

On Wed, 3 Apr 2013, Rob Landley wrote:

> Attached is my quick and dirty hack to make rootfs be tmpfs when CONFIG_TMPFS 
> is
> enabled. It can't be this easy or somebody would have done it in the 
> _eight_years_
> since https://lkml.org/lkml/2006/7/31/145
>
> Yes, it's got an #ifdef and out of place prototypes. Yes, it manually calls a 
> module
> init function and compensates by making it reentrant. But it works, and when 
> I
> "cat /dev/zero > filename" the filesystem fills _up_ instead of panicing the 
> kernel.
>
> So now that I've posted the error, would someone please tell me how I 
> _should_ have done it?
>
> Rob
>
> P.S. If I actually change the filesystem type to a name other than "rootfs", 
> it panics on the way up because various bits of the kernel are looking for 
> that magic name. Sigh.
>
> P.P.S. removing MS_NOUSER is actually intentional, there's a local cray patch 
> that does the same thing because otherwise you can't --bind mount directories 
> out of this filesystem, which is a thing they wanted to do.--
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
View attachment "root-tmpfs.patch" of type "TEXT/x-diff" (1592 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ