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: <tencent_C5E6023F97E7CC2A046AAEA09BC9ACF43907@qq.com>
Date: Sat,  9 Mar 2024 18:31:17 +0800
From: wenyang.linux@...mail.com
To: "Eric W . Biederman" <ebiederm@...ssion.com>,
	Luis Chamberlain <mcgrof@...nel.org>,
	Kees Cook <keescook@...omium.org>,
	Joel Granados <j.granados@...sung.com>,
	Christian Brauner <brauner@...nel.org>
Cc: Wen Yang <wenyang.linux@...mail.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/9] encode the values directly in the table entry

From: Wen Yang <wenyang.linux@...mail.com>

The boundary check of multiple modules uses these static variables (such as
two_five_five, n_65535, ue_int_max, etc), and they are also not changed.

Eric points out: "by turning .extra1 and .extra2 into longs instead of
keeping them as pointers and needing constants to be pointed at somewhere
.. The only people I can see who find a significant benefit by
consolidating all of the constants into one place are people who know how
to stomp kernel memory."

This patch series achieves direct encoding values in table entries and still
maintains compatibility with existing extra1/extra2 pointers.
Afterwards, we can remove these unnecessary static variables progressively and
also gradually kill the shared const array.

Wen Yang (9):
  sysctl: support encoding values directly in the table entry
  kernel/sysctl-test: add some kunit test cases for min/max detection
  rxrpc: delete these unnecessary static variables n_65535, four,
    max_500, etc
  net: ipv6: delete these unnecessary static variables two_five_five and
    minus_one
  svcrdma: delete these unnecessary static variables min_ord, max_ord,
    etc
  sysctl: delete these unnecessary static variables i_zero and
    i_one_hundred
  epoll: delete these unnecessary static variables long_zero and
    long_max
  fs: inotify: delete these unnecessary static variables it_zero and
    it_int_max
  ucounts: delete these unnecessary static variables ue_zero and
    ue_int_max

 fs/eventpoll.c                   |  19 +-
 fs/notify/inotify/inotify_user.c |  49 +++--
 include/linux/sysctl.h           | 108 ++++++++++-
 kernel/sysctl-test.c             | 300 +++++++++++++++++++++++++++++++
 kernel/sysctl.c                  |  61 +++++--
 kernel/ucount.c                  |   8 +-
 lib/test_sysctl.c                |  12 +-
 net/ipv6/addrconf.c              |  15 +-
 net/rxrpc/sysctl.c               | 169 ++++++++---------
 net/sunrpc/xprtrdma/svc_rdma.c   |  21 +--
 10 files changed, 571 insertions(+), 191 deletions(-)

Cc: Eric W. Biederman <ebiederm@...ssion.com>
Cc: Luis Chamberlain <mcgrof@...nel.org>
Cc: Kees Cook <keescook@...omium.org>
Cc: Joel Granados <j.granados@...sung.com>
Cc: Christian Brauner <brauner@...nel.org>
Cc: linux-kernel@...r.kernel.org

-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ