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]
Message-ID: <ec1ac9cb-f92c-9a2f-3a6c-bfc4bc88ab11@iogearbox.net>
Date:   Sat, 5 Nov 2022 00:03:28 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Jonas Rabenstein <rabenstein@...fau.de>, stable@...r.kernel.org
Cc:     Jiri Olsa <jolsa@...nel.org>, Song Liu <song@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Masami Hiramatsu <mhiramat@...nel.org>, bpf@...r.kernel.org,
        linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org
Subject: Re: [PATCH] bpf: mark get_entry_ip as __maybe_unused

On 11/3/22 4:32 PM, Jonas Rabenstein wrote:
> Hi again,
> after sending this out, I noticed this is only a problem in the stable
> versions (starting from v6.0.3), as c09eb2e578eb1668bbc has been applied (as
> 03f148c159a250dd454) but not 0e253f7e558a3e250902 ("bpf: Return value in kprobe
> get_func_ip only for entry address") which makes always use of get_entry_ip.
> I therefore think, 0e253f7e558a3e250902 needs to be added to the stable v6.0
> series as well as otherwise it can't be compiled with -Werror if
> CONFIG_X6_KERNEL_IBT is set but CONFIG_FPROBE isn't.

Thanks for the info, Jonas. Added Greg wrt stable cherry-pick.

> On Thu, Nov 03, 2022 at 04:03:03PM +0100, Jonas Rabenstein wrote:
>> Commit c09eb2e578eb1668bbc ("bpf: Adjust kprobe_multi entry_ip
>> for CONFIG_X86_KERNEL_IBT") introduced the get_entry_ip() function.
>> Depending on CONFIG_X86_KERNEL_IBT it is a static function or only
>> a macro definition. The only user of this symbol so far is in
>> kprobe_multi_link_handler() if CONFIG_FPROBE is enabled.
>> If CONFIG_FROBE is not set, the symbol is not used and - depending
>> on CONFIG_X86_KERNEL_IBT - a warning for get_entry_ip() is emitted.
>> To solve this, the function should be marked as __maybe_unused.
>>
>> Signed-off-by: Jonas Rabenstein <rabenstein@...fau.de>
>> ---
>>   kernel/trace/bpf_trace.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
>> index f2d8d070d024..19131aae0bc3 100644
>> --- a/kernel/trace/bpf_trace.c
>> +++ b/kernel/trace/bpf_trace.c
>> @@ -1032,7 +1032,7 @@ static const struct bpf_func_proto bpf_get_func_ip_proto_tracing = {
>>   };
>>   
>>   #ifdef CONFIG_X86_KERNEL_IBT
>> -static unsigned long get_entry_ip(unsigned long fentry_ip)
>> +static unsigned long __maybe_unused get_entry_ip(unsigned long fentry_ip)
>>   {
>>   	u32 instr;
>>   
>> -- 
>> 2.37.4
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ