[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f1c28bc-b482-cef3-12bc-b250d3be82a1@huawei.com>
Date: Mon, 28 Nov 2022 06:06:29 +0300
From: "Konstantin Meskhidze (A)" <konstantin.meskhidze@...wei.com>
To: Mickaël Salaün <mic@...ikod.net>
CC: <willemdebruijn.kernel@...il.com>, <gnoack3000@...il.com>,
<linux-security-module@...r.kernel.org>, <netdev@...r.kernel.org>,
<netfilter-devel@...r.kernel.org>, <artem.kuzin@...wei.com>
Subject: Re: [PATCH v8 02/12] landlock: Refactor
landlock_find_rule/insert_rule
11/22/2022 8:17 PM, Mickaël Salaün пишет:
>
> On 17/11/2022 19:41, Mickaël Salaün wrote:
>>
>> On 21/10/2022 17:26, Konstantin Meskhidze wrote:
>
> [...]
>
>>> diff --git a/security/landlock/ruleset.h b/security/landlock/ruleset.h
>>> index f2ad932d396c..608ab356bc3e 100644
>>> --- a/security/landlock/ruleset.h
>>> +++ b/security/landlock/ruleset.h
>>> @@ -49,6 +49,46 @@ struct landlock_layer {
>>> access_mask_t access;
>>> };
>>>
>>> +/**
>>> + * union landlock_key - Key of a ruleset's red-black tree
>>> + */
>>> +union landlock_key {
>>> + /**
>>> + * @object: Pointer to identify a kernel object (e.g. an inode).
>>> + */
>>> + struct landlock_object *object;
>>> + /**
>>> + * @data: A raw data value to identify a network socket port.
>>
>> "Raw data to identify an arbitrary 32-bit value (e.g. a TCP port)."
>>
>>
>>> + */
>>> + uintptr_t data;
>>> +};
>>> +
>>> +/**
>>> + * enum landlock_key_type - Type of &union landlock_key
>>> + */
>>> +enum landlock_key_type {
>>> + /**
>>> + * @LANDLOCK_KEY_INODE: Type of &landlock_ruleset.root_inode's node
>>> + * keys.
>>> + */
>>> + LANDLOCK_KEY_INODE = 1,
>>> +};
>>> +
>>> +/**
>>> + * struct landlock_id - Unique rule identifier for a ruleset
>>> + */
>>> +struct landlock_id {
>>> + /**
>>> + * @key: A union to identify either a kernel object (e.g. an inode) or
>>> + * a raw data value (e.g. a network socket port).
>>
>> "a 32-bit value (e.g. a TCP port)."
>
> Instead:
> @key: Identifies either a kernel object (e.g. an inode) or a raw value
> (e.g. a TCP port).
Ok. Got it.
>
>>
>>
>>> + */
>>> + union landlock_key key;
>>> + /**
>>> + * @type: A enumerator to identify the type of landlock_ruleset's root tree.
>
> @type: Type of a landlock_ruleset's root tree.
>
Ok. Thanks.
>
>>> + */
>>> + const enum landlock_key_type type;
>>> +};
> .
Powered by blists - more mailing lists