From: "Kasatkin, Dmitry" <dmitry.kasatkin@intel.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Peter Jones <pjones@redhat.com>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC 2/2] initramfs with digital signature protection
Date: Fri, 8 Feb 2013 18:24:48 +0200 [thread overview]
Message-ID: <CALLzPKZ7A6NW1ztX=hBjykMHkGofvtq6g-uK=Y2B2viskE9zDQ@mail.gmail.com> (raw)
In-Reply-To: <6b31c4f9-d98c-42fc-a510-39bf536b3299@email.android.com>
On Fri, Feb 8, 2013 at 5:49 PM, H. Peter Anvin <hpa@zytor.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@intel.com> wrote:
>
>>On Wed, Feb 6, 2013 at 6:41 PM, H. Peter Anvin <hpa@zytor.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@intel.com> wrote:
>>>
>>>>On Wed, Feb 6, 2013 at 7:04 AM, H. Peter Anvin <hpa@zytor.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.
next prev parent reply other threads:[~2013-02-08 16:24 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 12:34 [RFC 0/2] initramfs with digital signature protection Dmitry Kasatkin
2013-02-05 12:34 ` [RFC 1/2] export unpack_to_rootfs Dmitry Kasatkin
2013-02-05 16:48 ` Peter Jones
2013-02-05 17:16 ` Kasatkin, Dmitry
2013-02-08 8:30 ` Kasatkin, Dmitry
2013-02-05 12:34 ` [RFC 2/2] initramfs with digital signature protection Dmitry Kasatkin
2013-02-05 18:03 ` Peter Jones
2013-02-05 20:08 ` Mimi Zohar
2013-02-05 22:03 ` Kasatkin, Dmitry
2013-02-05 18:19 ` Matthew Garrett
2013-02-05 18:30 ` Matthew Garrett
2013-02-05 18:34 ` Vivek Goyal
2013-02-05 21:55 ` Kasatkin, Dmitry
2013-04-05 13:50 ` Vivek Goyal
2013-04-08 19:43 ` Mimi Zohar
2013-04-08 20:09 ` Vivek Goyal
2013-04-08 20:17 ` Josh Boyer
2013-04-09 14:38 ` Vivek Goyal
2013-04-10 3:07 ` Mimi Zohar
2013-04-10 19:42 ` Vivek Goyal
2013-04-10 21:05 ` Mimi Zohar
2013-04-11 8:08 ` Dmitry Kasatkin
2013-04-11 14:52 ` Vivek Goyal
2013-04-12 11:54 ` Mimi Zohar
[not found] ` <CACE9dm-GZpjco8u6jNxLQpYA8LYSeoVjsyyRXVwxXHzjO-LvGw@mail.gmail.com>
2013-04-11 14:55 ` Vivek Goyal
2013-04-11 18:42 ` Dmitry Kasatkin
2013-04-11 21:13 ` Vivek Goyal
2013-04-12 12:03 ` Mimi Zohar
2013-02-05 20:36 ` Peter Jones
2013-02-05 22:09 ` Kasatkin, Dmitry
2013-02-06 5:04 ` H. Peter Anvin
2013-02-06 8:01 ` Kasatkin, Dmitry
2013-02-06 16:41 ` H. Peter Anvin
2013-02-08 9:16 ` Kasatkin, Dmitry
2013-02-08 15:49 ` H. Peter Anvin
2013-02-08 16:24 ` Kasatkin, Dmitry [this message]
2013-02-08 16:50 ` H. Peter Anvin
2013-02-07 17:05 ` Vivek Goyal
2013-02-08 8:34 ` Kasatkin, Dmitry
2013-02-08 13:27 ` Kasatkin, Dmitry
2013-02-11 21:59 ` Vivek Goyal
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='CALLzPKZ7A6NW1ztX=hBjykMHkGofvtq6g-uK=Y2B2viskE9zDQ@mail.gmail.com' \
--to=dmitry.kasatkin@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=pjones@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).