[PATCH linux-next] bpf: fix warning for crash_kexec

Hari Bathini hbathini at linux.ibm.com
Tue Mar 19 01:06:36 PDT 2024



On 18/03/24 9:43 pm, Yonghong Song wrote:
> 
> On 3/17/24 11:52 PM, Hari Bathini wrote:
>> Just checking on whether this will go via bpf or mm tree?
> 
> Sending to bpf-next should be okay.
> Could you resubmit the patch as CONFIG_CRASH_DUMP probably not
> available to bpf-next when you initially submitted the patch.

OK. Sent V2 with tags added and changelog updated:

 
https://lore.kernel.org/all/20240319080152.36987-1-hbathini@linux.ibm.com/

> 
>>
>> On 09/02/24 6:05 pm, Hari Bathini wrote:
>>> With [1], CONFIG_KEXEC & !CONFIG_CRASH_DUMP is supported but that led
>>> to the below warning:
>>>
>>>    "WARN: resolve_btfids: unresolved symbol crash_kexec"
>>>
>>> Fix it by using the appropriate #ifdef.
>>>
>>> [1] https://lore.kernel.org/all/20240124051254.67105-1-bhe@redhat.com/
>>>
>>> Signed-off-by: Hari Bathini <hbathini at linux.ibm.com>
>>> ---
>>>   kernel/bpf/helpers.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
>>> index 4db1c658254c..e408d1115e26 100644
>>> --- a/kernel/bpf/helpers.c
>>> +++ b/kernel/bpf/helpers.c
>>> @@ -2545,7 +2545,7 @@ __bpf_kfunc void bpf_throw(u64 cookie)
>>>   __bpf_kfunc_end_defs();
>>>     BTF_KFUNCS_START(generic_btf_ids)
>>> -#ifdef CONFIG_KEXEC_CORE
>>> +#ifdef CONFIG_CRASH_DUMP
>>>   BTF_ID_FLAGS(func, crash_kexec, KF_DESTRUCTIVE)
>>>   #endif
>>>   BTF_ID_FLAGS(func, bpf_obj_new_impl, KF_ACQUIRE | KF_RET_NULL)
>>



More information about the kexec mailing list