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] [day] [month] [year] [list]
Date:   Thu, 24 Sep 2020 02:22:10 +0000
From:   "Pujari, Bimmy" <bimmy.pujari@...el.com>
To:     David Ahern <dsahern@...il.com>,
        Maciej Żenczykowski <maze@...gle.com>
CC:     bpf <bpf@...r.kernel.org>, Linux NetDev <netdev@...r.kernel.org>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin Lau <kafai@...com>,
        "Nikravesh, Ashkan" <ashkan.nikravesh@...el.com>
Subject: RE: [PATCH bpf-next v2 1/2] bpf: Add bpf_ktime_get_real_ns



-----Original Message-----
From: David Ahern <dsahern@...il.com> 
Sent: Wednesday, September 23, 2020 7:19 PM
To: Maciej Żenczykowski <maze@...gle.com>; Pujari, Bimmy <bimmy.pujari@...el.com>
Cc: bpf <bpf@...r.kernel.org>; Linux NetDev <netdev@...r.kernel.org>; mchehab@...nel.org; Alexei Starovoitov <ast@...nel.org>; Daniel Borkmann <daniel@...earbox.net>; Martin Lau <kafai@...com>; Nikravesh, Ashkan <ashkan.nikravesh@...el.com>
Subject: Re: [PATCH bpf-next v2 1/2] bpf: Add bpf_ktime_get_real_ns

On 9/23/20 7:19 PM, Maciej Żenczykowski wrote:
>> diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 
>> 5cc7425ee476..776ff58f969d 100644
>> --- a/kernel/bpf/helpers.c
>> +++ b/kernel/bpf/helpers.c
>> @@ -155,6 +155,17 @@ const struct bpf_func_proto bpf_ktime_get_ns_proto = {
>>         .ret_type       = RET_INTEGER,
>>  };
>>
>> +BPF_CALL_0(bpf_ktime_get_real_ns)
>> +{
>> +       /* NMI safe access to clock realtime */
>> +       return ktime_get_real_fast_ns(); }
>> +
>> +const struct bpf_func_proto bpf_ktime_get_real_ns_proto = {
>> +       .func           = bpf_ktime_get_real_ns,
>> +       .gpl_only       = true,
> 
> imho should be false, this is normally accessible to userspace code 
> via syscall, no reason why it should be gpl only for bpf
> 

agreed, no reason for the bpf hook to be gpl_only.

Glad to see the v2 of this patch; I wondered what happened to this helper.
BP: Thanks Maciej & Ahern for taking time to look at it. I will update the changes suggested shortly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ