Re: [PATCH v3 1/2] bpf: Reject attaching fexit to functions annotated with __noreturn

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

 



On Wed, Feb 26, 2025 at 1:52 AM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> On Mon, Feb 24, 2025 at 07:46:05PM +0800, Yafang Shao wrote:
> > +BTF_SET_START(fexit_deny)
> > +#define NORETURN(fn) BTF_ID(func, fn)
> > +NORETURN(__fortify_panic)
> > +NORETURN(__ia32_sys_exit)
> > +NORETURN(__ia32_sys_exit_group)
>
> Why not just sync with the objtool noreturns.h?  Now we have two
> hard-coded lists instead of one.  These are guaranteed to diverge.

For details, refer to Alexei's response here:
https://lore.kernel.org/bpf/CAADnVQ+zLZKyrNGnGQDThasdS6cvM-FheN5Ttz23pF5ttbGasw@xxxxxxxxxxxxxx/.

We cannot simply reuse the objtool noreturns.h file because BTF is
limited to handling only existing functions.

--
Regards

Yafang





[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