lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211204095256.78042-1-laoar.shao@gmail.com>
Date:   Sat,  4 Dec 2021 09:52:51 +0000
From:   Yafang Shao <laoar.shao@...il.com>
To:     akpm@...ux-foundation.org, rostedt@...dmis.org,
        keescook@...omium.org, pmladek@...e.com, david@...hat.com,
        arnaldo.melo@...il.com, andrii.nakryiko@...il.com
Cc:     linux-mm@...ck.org, bpf@...r.kernel.org,
        linux-perf-users@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, Yafang Shao <laoar.shao@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Michal Miroslaw <mirq-linux@...e.qmqm.pl>,
        Peter Zijlstra <peterz@...radead.org>,
        Matthew Wilcox <willy@...radead.org>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: [PATCH -mm 0/5] Phase 2 of task comm cleanups

This is the followup work of task comm cleanups[1].

In this phase, the hard-coded 16 is replaced by either TASK_COMM_LEN or
TASK_COMM_LEN_16, to make it grepable. The difference between this two 
marcos is: 
- TASK_COMM_LEN
  The size should be same with the TASK_COMM_LEN defined in linux/sched.h.
  For the src file which can't include linux/sched.h, a macro with the 
  the same name is defined in this file specifically. 
- TASK_COMM_LEN_16
  The size must be a fixed-size 16. It may be exposed to userspace so we
  can't change it. 

In order to include vmlinux.h in bpf progs under sample/bpf or
tools/testing/selftests/bpf, some structs are renamed and some included
headers are removed.

1. https://lore.kernel.org/lkml/20211120112738.45980-1-laoar.shao@gmail.com/

Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Michal Miroslaw <mirq-linux@...e.qmqm.pl>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Matthew Wilcox <willy@...radead.org>
Cc: David Hildenbrand <david@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: Kees Cook <keescook@...omium.org>
Cc: Petr Mladek <pmladek@...e.com>

Yafang Shao (5):
  elfcore: replace old hard-code 16 with TASK_COMM_LEN_16
  cn_proc: replaced old hard-coded 16 with TASK_COMM_LEN_16
  samples/bpf/tracex2: replace hard-coded 16 with TASK_COMM_LEN
  tools/perf: replace hard-coded 16 with TASK_COMM_LEN
  bpf/progs: replace hard-coded 16 with TASK_COMM_LEN

 include/linux/elfcore-compat.h                        |  8 ++------
 include/linux/elfcore.h                               |  9 ++-------
 include/linux/sched.h                                 |  5 +++++
 include/uapi/linux/cn_proc.h                          |  4 +++-
 samples/bpf/tracex2_kern.c                            |  3 ++-
 samples/bpf/tracex2_user.c                            |  3 ++-
 tools/perf/tests/evsel-tp-sched.c                     |  8 +++++---
 tools/testing/selftests/bpf/prog_tests/ringbuf.c      |  9 +++++----
 .../testing/selftests/bpf/prog_tests/ringbuf_multi.c  |  8 +++++---
 .../selftests/bpf/prog_tests/sk_storage_tracing.c     |  3 ++-
 .../testing/selftests/bpf/prog_tests/test_overhead.c  |  3 ++-
 .../selftests/bpf/prog_tests/trampoline_count.c       |  3 ++-
 .../selftests/bpf/progs/test_core_reloc_kernel.c      | 11 +++++------
 tools/testing/selftests/bpf/progs/test_ringbuf.c      |  8 ++++----
 .../testing/selftests/bpf/progs/test_ringbuf_multi.c  |  8 ++++----
 .../selftests/bpf/progs/test_sk_storage_tracing.c     |  4 ++--
 16 files changed, 52 insertions(+), 45 deletions(-)

-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ