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>] [day] [month] [year] [list]
Message-ID: <DFBC1E41A1103B87+997a9aedbe0a9a779d0a463bcbfd13eb677d5f0a.1760463245.git.tanyuan@tinylab.org>
Date: Wed, 15 Oct 2025 14:18:31 +0800
From: Yuan Tan <tanyuan@...ylab.org>
To: arnd@...db.de,
	masahiroy@...nel.org,
	nathan@...nel.org,
	palmer@...belt.com,
	linux-kbuild@...r.kernel.org,
	linux-riscv@...ts.infradead.org
Cc: linux-arch@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	i@...kray.me,
	tanyuan@...ylab.org,
	falcon@...ylab.org,
	ronbogo@...look.com,
	z1652074432@...il.com,
	lx24@....ynu.edu.cn
Subject: [PATCH v2 4/8] riscv: enable HAVE_TRIM_UNUSED_SYSCALLS when toolchain supports DCE

From: Yuhang Zheng <z1652074432@...il.com>

Enable HAVE_TRIM_UNUSED_SYSCALLS on RISC-V when the toolchain supports dead
code and data elimination.

This allows the unused syscalls and related code to be trimmed at link time
based on the list of actually used syscalls.

While this enables per-syscall elimination, some syscall entries still
cannot be fully discarded due to sections that are force-kept by the
linker, such as ex_table, bug_table, jump_table, and .alternative.

Signed-off-by: Yuhang Zheng <z1652074432@...il.com>
Signed-off-by: Yuan Tan <tanyuan@...ylab.org>
Signed-off-by: Zhangjin Wu <falcon@...ylab.org>
---
 arch/riscv/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 0c6038dc5dfd..697050ac8c62 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -198,6 +198,7 @@ config RISCV
 	select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
 	select HAVE_STACKPROTECTOR
 	select HAVE_SYSCALL_TRACEPOINTS
+	select HAVE_TRIM_UNUSED_SYSCALLS
 	select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
 	select IRQ_DOMAIN
 	select IRQ_FORCED_THREADING
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ