[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a66155ea-151d-cfd7-01f0-15ed6f18e26b@linux.microsoft.com>
Date: Tue, 4 Aug 2020 08:57:02 -0700
From: Lakshmi Ramasubramanian <nramas@...ux.microsoft.com>
To: Stephen Smalley <stephen.smalley.work@...il.com>
Cc: Mimi Zohar <zohar@...ux.ibm.com>,
Casey Schaufler <casey@...aufler-ca.com>,
Tyler Hicks <tyhicks@...ux.microsoft.com>, sashal@...nel.org,
James Morris <jmorris@...ei.org>,
linux-integrity@...r.kernel.org,
SElinux list <selinux@...r.kernel.org>,
LSM List <linux-security-module@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 3/4] LSM: Define SELinux function to measure state and
policy
On 8/4/20 8:29 AM, Stephen Smalley wrote:
>>> Perhaps vmalloc would be better than using kmalloc? If there are
>>> better options for such large buffer allocation, please let me know.
>>
>> kvmalloc() can be used to select whichever one is most appropriate.
>
> Other option would be for ima to compute and save the hash(es) of the
> payload and not the payload itself for later use. I guess you won't
> know at that point which hash algorithm is desired?
>
I think IMA hash algorithm would be known at that point, but IMA policy
is not loaded yet (which is why I need to queue up the buffer and
process when policy is loaded).
I tried vmalloc and tested it with upto 16MB buffer (just made up a
SELinux policy buffer of size 16MB) - that works fine.
I will try kvmalloc().
Also, I fixed the issue with LSM data not measured when using the IMA
policy you had. Good catch.
Will post the updated patches today.
thanks,
-lakshmi
Powered by blists - more mailing lists