Re: [PATCH -mm 5/5] bpf/progs: replace hard-coded 16 with TASK_COMM_LEN

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

 



On Sun, Dec 5, 2021 at 12:44 AM Alexei Starovoitov
<alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Sat, Dec 4, 2021 at 1:53 AM Yafang Shao <laoar.shao@xxxxxxxxx> wrote:
> >
> >  static int process_sample(void *ctx, void *data, size_t len)
> >  {
> > -       struct sample *s = data;
> > +       struct sample_ringbuf *s = data;
>
> This is becoming pointless churn.
> Nack.
>
> > index 145028b52ad8..7b1bb73c3501 100644
> > --- a/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c
> > +++ b/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c
> > @@ -1,8 +1,7 @@
> >  // SPDX-License-Identifier: GPL-2.0
> >  // Copyright (c) 2019 Facebook
> >
> > -#include <linux/bpf.h>
> > -#include <stdint.h>
> > +#include <vmlinux.h>
> >  #include <stdbool.h>
> >  #include <bpf/bpf_helpers.h>
> >  #include <bpf/bpf_core_read.h>
> > @@ -23,11 +22,11 @@ struct core_reloc_kernel_output {
> >         int comm_len;
> >  };
> >
> > -struct task_struct {
> > +struct task_struct_reloc {
>
> Churn that is not even compile tested.

It is strange that I have successfully compiled it....
Below is the compile log,

$ cat make.log | grep test_core_reloc_kernel
  CLNG-BPF [test_maps] test_core_reloc_kernel.o
  GEN-SKEL [test_progs] test_core_reloc_kernel.skel.h
  CLNG-BPF [test_maps] test_core_reloc_kernel.o
  GEN-SKEL [test_progs-no_alu32] test_core_reloc_kernel.skel.h

Also there's no error in the compile log.

-- 
Thanks
Yafang



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux