Re: [PATCH v2 bpf-next 4/5] bpf: Update iterators.lskel.h.

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

 



On Tue, Feb 8, 2022 at 8:40 PM Andrii Nakryiko
<andrii.nakryiko@xxxxxxxxx> wrote:
> > -       skel->rodata =
> > -               mmap(skel->rodata, 4096, PROT_READ, MAP_SHARED | MAP_FIXED,
> > -                       skel->maps.rodata.map_fd, 0);
> > +       skel->rodata = skel_finalize_map_data(&skel->maps.rodata.initial_value,
> > +                       4096, PROT_READ, skel->maps.rodata.map_fd);
>
> here seems like both before and now, on error, nothing happens. For
> kernel mode it matches skeleton behavior (rodata will be NULL), but
> for user-space code you'll have (void *)-1, which is probably not
> great.

Yeah, not a regression, but let's add the checks while at it.



[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