From: Raphael Gianotti <raphgi@linux.microsoft.com>
To: Janne Karhunen <janne.karhunen@gmail.com>
Cc: Mimi Zohar <zohar@linux.ibm.com>,
linux-integrity@vger.kernel.org, tusharsu@linux.microsoft.com,
tyhicks@linux.microsoft.com,
Lakshmi Ramasubramanian <nramas@linux.microsoft.com>,
balajib@linux.microsoft.com
Subject: Re: [RFC] Persist ima logs to disk
Date: Thu, 7 Jan 2021 10:35:36 -0800 [thread overview]
Message-ID: <206700a4-3187-1cf8-b23e-f3f859ce0b5d@linux.microsoft.com> (raw)
In-Reply-To: <CAE=NcrY7oecVUtoGd2Jwzb6wi3i11zFPrYj3u84w9eCdOyTi4Q@mail.gmail.com>
On 1/7/2021 7:45 AM, Janne Karhunen wrote:
> On Tue, Jan 5, 2021 at 9:57 PM Raphael Gianotti
> <raphgi@linux.microsoft.com> wrote:
>
>> In a thread with Janne Karhunen[2], it was mentioned that another
>> approach, using mm had been considered. Upon some investigation the
>> approach used in this RFC still seemed adequate for solving this
>> problem.
> Curious to hear in more detail where did this land?
>
> Not sure I remember this correctly anymore, but wouldn't it be
> possible to have mmap'd tmpfile at address __heap of size __heap_sz
> and have something this simple pulling memory from it?
>
> uint8_t *get_static_buffer(size_t size)
> {
> static size_t buf_index;
> uint8_t *bufp = NULL;
>
> size = ROUND_UP(size, sizeof(double));
> if ((buf_index + size) >= __heap_sz)
> return NULL;
>
> bufp = (uint8_t *)__heap + buf_index;
> buf_index += size;
> *bufp = 0;
>
> return bufp;
> }
>
> Then just replace every related measurement list allocation with this
> get_static_buffer and that would be pretty much all there is to it?
>
> The mm code should automatically push those pages out when it needs
> memory. It will also read those pages back in when someone scans
> through the measurement list creating a nicely formatted one. I think.
>
>
> --
> Janne
As I replied to the other comment from Mimi, I think I may have been
overcomplicating
it. My knowledge of mm is still not very deep, so I may have overthought
some parts of
it and thought anything I was coming up with didn't seem like a good way
to do it. I will
revisit this, especially since I wasn't aware of the PCR concerns Mimi
had, which make
sense and will probably be hard to solve with the code I just sent.
Raph
prev parent reply other threads:[~2021-01-07 18:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 19:57 [RFC] Persist ima logs to disk Raphael Gianotti
2021-01-07 15:06 ` Mimi Zohar
2021-01-07 16:42 ` James Bottomley
2021-01-07 20:02 ` Mimi Zohar
2021-01-07 20:37 ` James Bottomley
2021-01-07 20:51 ` Mimi Zohar
2021-01-07 21:48 ` James Bottomley
2021-01-07 22:57 ` Raphael Gianotti
2021-01-08 12:38 ` Mimi Zohar
2021-01-08 17:58 ` Raphael Gianotti
2021-02-01 22:53 ` Raphael Gianotti
2021-02-02 5:54 ` Amir Goldstein
2021-02-02 13:07 ` Mimi Zohar
2021-02-02 18:14 ` Raphael Gianotti
2021-02-03 1:02 ` Mimi Zohar
2021-02-03 7:24 ` Amir Goldstein
2021-02-03 18:45 ` Mimi Zohar
2021-02-09 17:20 ` Raphael Gianotti
2021-02-09 18:08 ` Mimi Zohar
2021-01-07 23:00 ` Mimi Zohar
2021-01-07 18:32 ` Raphael Gianotti
2021-01-07 15:45 ` Janne Karhunen
2021-01-07 18:35 ` Raphael Gianotti [this message]
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=206700a4-3187-1cf8-b23e-f3f859ce0b5d@linux.microsoft.com \
--to=raphgi@linux.microsoft.com \
--cc=balajib@linux.microsoft.com \
--cc=janne.karhunen@gmail.com \
--cc=linux-integrity@vger.kernel.org \
--cc=nramas@linux.microsoft.com \
--cc=tusharsu@linux.microsoft.com \
--cc=tyhicks@linux.microsoft.com \
--cc=zohar@linux.ibm.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).