Re: [PATCH bpf] lib: bpf: tracing: fail compilation if target arch is missing

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

 



On Tue, 15 Jun 2021 at 19:53, Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote:
>
> >
> > > >
> > > > Without it we sometimes get an integer cast warning, something about
> > > > an int to void* cast I think?
> > >
> > > hmm.. ok
> >
> > This is the error I get:
> >
> > progs/lsm.c:166:14: warning: cast to 'void *' from smaller integer
> > type 'int' [-Wint-to-void-pointer-cast]
> >         void *ptr = (void *)PT_REGS_PARM1(regs);
> >                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> oh, ok, but then those zeros probably best to mark as longs, not long
> longs (even thought for BPF it's the same), as (unsigned) long is a
> logical equivalent of a pointer, right?

Ack, that seems to work as well. I sent a v2, also renamed
__bpf_target_missing to __BPF_TARGET_MISSING.

-- 
Lorenz Bauer  |  Systems Engineer
6th Floor, County Hall/The Riverside Building, SE1 7PB, UK

www.cloudflare.com



[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