Re: [PATCH bpf-next] s390/bpf: Fix indirect trampoline generation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 15, 2023 at 5:56 PM Ilya Leoshkevich <iii@xxxxxxxxxxxxx> wrote:
>
> On Fri, Dec 15, 2023 at 04:45:49PM -0800, Alexei Starovoitov wrote:
> > From: Alexei Starovoitov <ast@xxxxxxxxxx>
> >
> > The func_addr used to be NULL for indirect trampolines used by struct_ops.
> > Now func_addr is a valid function pointer.
> > Hence use BPF_TRAMP_F_INDIRECT flag to detect such condition.
> >
> > Fixes: 2cd3e3772e41 ("x86/cfi,bpf: Fix bpf_struct_ops CFI")
> > Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
> > ---
> >  arch/s390/net/bpf_jit_comp.c               | 3 ++-
> >  tools/testing/selftests/bpf/DENYLIST.s390x | 2 --
> >  2 files changed, 2 insertions(+), 3 deletions(-)
>
> IIUC F_INDIRECT trampolines are called via C function pointers, and
> func_addr does not participate in any call chains, but is rather used
> as a source of CFI information.

Yes.

> So returning to %r14 is the right
> thing to do.
>
> Thanks!
>
> Reviewed-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>

Thank you for the quick review.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux