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: <cover.1768324215.git.wen.yang@linux.dev>
Date: Wed, 14 Jan 2026 01:40:29 +0800
From: wen.yang@...ux.dev
To: Joel Granados <joel.granados@...nel.org>
Cc: linux-kernel@...r.kernel.org,
	Wen Yang <wen.yang@...ux.dev>
Subject: [RFC PATCH 0/4] sysctl: refactor ctl_table creation and change extra{1,2} type

From: Wen Yang <wen.yang@...ux.dev>

This series introduces macros to centralize ctl_table initialization,
preparing for future type changes to extra1/extra2 fields.

Following Joel's suggestion [1], we start with helpers that work for all
existing patterns before making invasive changes. This lays groundwork
for eventually changing extra1/extra2 from void* to unsigned long.


[1] https://lore.kernel.org/all/sytyqb3ajm6ysoifwp57ga7gzlnzodhdsbgizbn3hqnlwytn5a@pbscftrq2qwl/

Wen Yang (4):
  sysctl: add SYSCTL_ENTRY/SYSCTL_RANGE_ENTRY helpers for ctl_table init
  sysctl: add helper functions to extract table->extra1/extra2
  sysctl: support encoding values directly in the table entry
  scripts/coccinelle: add sysctl_table_init.cocci

 include/linux/sysctl.h                        |  78 ++-
 kernel/sysctl-test.c                          | 273 +++++----
 kernel/sysctl.c                               |  57 +-
 .../coccinelle/api/sysctl_table_init.cocci    | 519 ++++++++++++++++++
 4 files changed, 779 insertions(+), 148 deletions(-)
 create mode 100644 scripts/coccinelle/api/sysctl_table_init.cocci

-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ