lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Feb 2022 13:44:52 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Yafang Shao <laoar.shao@...il.com>, ast@...nel.org,
        andrii@...nel.org, kafai@...com, songliubraving@...com, yhs@...com,
        john.fastabend@...il.com, kpsingh@...nel.org
Cc:     netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH 1/4] bpf: Add pin_name into struct bpf_prog_aux

On 2/11/22 1:43 PM, Daniel Borkmann wrote:
> On 2/11/22 1:11 PM, Yafang Shao wrote:
>> A new member pin_name is added into struct bpf_prog_aux, which will be
>> set when the prog is set and cleared when the pinned file is removed.
>>
>> Signed-off-by: Yafang Shao <laoar.shao@...il.com>
>> ---
>>   include/linux/bpf.h      |  2 ++
>>   include/uapi/linux/bpf.h |  1 +
>>   kernel/bpf/inode.c       | 20 +++++++++++++++++++-
>>   3 files changed, 22 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/bpf.h b/include/linux/bpf.h
>> index 0ceb25b..9cf8055 100644
>> --- a/include/linux/bpf.h
>> +++ b/include/linux/bpf.h
>> @@ -933,6 +933,8 @@ struct bpf_prog_aux {
>>           struct work_struct work;
>>           struct rcu_head    rcu;
>>       };
>> +
>> +    char pin_name[BPF_PIN_NAME_LEN];
>>   };
> 
> I'm afraid this is not possible. You are assuming a 1:1 relationship between prog
> and pin location, but it's really a 1:n (prog can be pinned in multiple locations
> and also across multiple mount instances). Also, you can create hard links of pins
> which are not handled via bpf_obj_do_pin().

(Same is also true for BPF maps wrt patch 2.)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ