lkml.org 
[lkml]   [2022]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v12 04/26] ima: Move arch_policy_entry into ima_namespace
From


On 5/20/22 22:46, Serge E. Hallyn wrote:
> On Wed, Apr 20, 2022 at 10:06:11AM -0400, Stefan Berger wrote:

>> @@ -1005,7 +1003,8 @@ void ima_update_policy(struct ima_namespace *ns)
>> * on boot. After loading a custom policy, free the
>> * architecture specific rules stored as an array.
>> */
>> - kfree(arch_policy_entry);
>> + kfree(ns->arch_policy_entry);
>> + ns->arch_policy_entry = NULL;
>
> So the thing that prevents multiple racing occurances of the above two lines is
> that ima_open_policy() sets IMA_FS_BUSY (or returns EBUSY) and then removes
> this file before clearing the flag, right?

Correct.

>
> Seems good.
>
> Reviewed-by: Serge Hallyn <serge@hallyn.com>
>
>
>> }
>> ima_update_policy_flags(ns);
>>
>> --
>> 2.34.1

\
 
 \ /
  Last update: 2022-07-07 16:14    [W:0.172 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site