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: <56d80e23-a177-49dd-bb9f-eec4e7775c04@email.android.com>
Date:	Fri, 08 Feb 2013 08:50:52 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	"Kasatkin, Dmitry" <dmitry.kasatkin@...el.com>
CC:	Peter Jones <pjones@...hat.com>,
	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC 2/2] initramfs with digital signature protection

Yes, but I am talking about initramfs.

"Kasatkin, Dmitry" <dmitry.kasatkin@...el.com> wrote:

>On Fri, Feb 8, 2013 at 5:49 PM, H. Peter Anvin <hpa@...or.com> wrote:
>> Yes, but you can't umount rootfs.
>
>But that was not a rootfs, but tmpfs/ramfs mounted to /root folder.
>
>>
>> "Kasatkin, Dmitry" <dmitry.kasatkin@...el.com> wrote:
>>
>>>On Wed, Feb 6, 2013 at 6:41 PM, H. Peter Anvin <hpa@...or.com> wrote:
>>>> The cleanup is not a umount, it is actually a tree walk unlinking
>the
>>>contents.
>>>>
>>>
>>>Please see that umounting ramfs releases the memory.
>>>There was no forced cleanup.
>>>"cp" copied about 2GB of content.
>>>After umounting we got 2GB back to free RAM...
>>>
>>>kds@kds:~$ sudo mount -t ramfs testramfs /test
>>>kds@kds:~$ sudo cp -r /usr/ /test
>>>kds@kds:~$ du -sm /test
>>>2154    /test
>>>kds@kds:~$ free
>>>                       total       used            free     shared
>>>buffers     cached
>>>Mem:       8058600    7855780     202820          0      24768
>>>4819136
>>>-/+ buffers/cache:    3011876    5046724
>>>Swap:            0          0          0
>>>kds@kds:~$ sudo umount /test
>>>kds@kds:~$ free
>>>                      total       used            free     shared
>>>buffers     cached
>>>Mem:       8058600    5644864    2413736          0      25268
>>>2623956
>>>-/+ buffers/cache:    2995640    5062960
>>>Swap:            0          0          0
>>>
>>>The same happens also with tmpfs.
>>>
>>>- Dmitry
>>>
>>>> "Kasatkin, Dmitry" <dmitry.kasatkin@...el.com> wrote:
>>>>
>>>>>On Wed, Feb 6, 2013 at 7:04 AM, H. Peter Anvin <hpa@...or.com>
>wrote:
>>>>>> On 02/05/2013 02:09 PM, Kasatkin, Dmitry wrote:
>>>>>>>
>>>>>>>
>>>>>>> It should not be like that. Actually when pre-init exits,
>cleanup
>>>>>code
>>>>>>> umount tmpfs, which in turn cleanups the RAM.
>>>>>>>
>>>>>>
>>>>>> It doesn't quite... the rootfs is permanent.  This is also only
>one
>>>>>usage
>>>>>> mode: there are quite a few Linux systems running directly out of
>>>>>initramfs.
>>>>>>
>>>>>
>>>>>rootfs is not permanent when it is ramfs. It is cleaned up on
>switch
>>>>>root.
>>>>>It is easy to find out that it is empty by mounting : mount -t
>ramfs
>>>>>rootfs /mnt/
>>>>>
>>>>>In the case of running from normal storage, of course, there is
>>>>>ridicules remove the content.
>>>>>
>>>>>- Dmitry
>>>>>
>>>>>
>>>>>>         -hpa
>>>>>>
>>>>>>
>>>>>> --
>>>>>> H. Peter Anvin, Intel Open Source Technology Center
>>>>>> I work for Intel.  I don't speak on their behalf.
>>>>>>
>>>>
>>>> --
>>>> Sent from my mobile phone. Please excuse brevity and lack of
>>>formatting.
>>
>> --
>> Sent from my mobile phone. Please excuse brevity and lack of
>formatting.

-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.
--
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/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ