Re: [PATCH 01/13] bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack()

2022-01-10 Thread Naveen N. Rao
Christophe Leroy wrote: Le 06/01/2022 à 12:45, Naveen N. Rao a écrit : task_pt_regs() can return NULL on powerpc for kernel threads. This is then used in __bpf_get_stack() to check for user mode, resulting in a kernel oops. Guard against this by checking return value of task_pt_regs() before

Re: [PATCH 01/13] bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack()

2022-01-10 Thread Christophe Leroy
Le 06/01/2022 à 12:45, Naveen N. Rao a écrit : > task_pt_regs() can return NULL on powerpc for kernel threads. This is > then used in __bpf_get_stack() to check for user mode, resulting in a > kernel oops. Guard against this by checking return value of > task_pt_regs() before trying to obtain

Re: [PATCH 01/13] bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack()

2022-01-07 Thread Daniel Borkmann
On 1/6/22 12:45 PM, Naveen N. Rao wrote: task_pt_regs() can return NULL on powerpc for kernel threads. This is then used in __bpf_get_stack() to check for user mode, resulting in a kernel oops. Guard against this by checking return value of task_pt_regs() before trying to obtain the call chain.

[PATCH 01/13] bpf: Guard against accessing NULL pt_regs in bpf_get_task_stack()

2022-01-06 Thread Naveen N. Rao
task_pt_regs() can return NULL on powerpc for kernel threads. This is then used in __bpf_get_stack() to check for user mode, resulting in a kernel oops. Guard against this by checking return value of task_pt_regs() before trying to obtain the call chain. Fixes: fa28dcb82a38f8 ("bpf: Introduce