From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.112 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794274705; b=VfgJwMh8uVANQpdQqOdCILmy9QrPmJfCGp+hNFrScNb7t67t+tc6KKP2/xbce69ff/Nd koKv5soPY189QvD3CdnV87TyPatVILTzEKb7ijR+8CSP61t0x11bw+fFS8q6cKzP6OHB0 4jb5xTuCImTWswl6weheg2ZpnYvh2bgJVE3GUhhJ1LygKJiFolikZQOFA2KXnAKNyMz4X ncvBULM64PjoSwf2740cpZc8KReo9a2odTOitgswj9QQ+rHLD9j3HUZ4tt65yMm3VxxHe 0LDseB5MpeuSpKQbRSZL4EJTJqAlOXPFdwBR4RP0Y0KAUIuBPEScuMcB/Tk1iblRLWA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794274705; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc: Subject:Date:Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=C6qqXg66snVjWtvXLaTCarySN21K2eU4ZVWZSHhFYXY=; b=kmYQ8YUJRH+gj1kWPFyHPhwpOWghjwlHTAgP4Qb4VRKZ6krtXnml4nhPyQPOEXFasoAj PdTFCVVF7pKE/+RLRB2ghun5tf+kE+vTMUTSPn080JmFwweW2bZ4TQ/ntVkdUltQ5JLx+ YQD53sQhtdcGZDy4QvNnNu7b4gfcb9MifbSe4m/0Zc1rO7OJDJXaK18YSZ4OyMvCsrHYK 2cob+AlVMgPi/ovWFHv2S36qcMLi5WJQV4tucyhAr3iLNR32Tt001okOGcRKFDWk3zIPB gYB5TlhGTzXAy8fXc89VJMtvYVpy9ryWz9IpMzbWygScEjmw6JL5uHHs1j4avzZolQw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=f98cykkt; arc=none smtp.remote-ip=115.124.30.112 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A221606A32E; Tue, 10 Nov 2026 01:38:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7A221606A32E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=f98cykkt DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1794274701; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=C6qqXg66snVjWtvXLaTCarySN21K2eU4ZVWZSHhFYXY=; b=f98cykktG5+PgveGjBDygLrRpf5avxbLthqoDHCTgUtR+bQv2Jy9Mwvfno1ltMzQMjX/bq5T2dtVfyebhASL4G6grww2X9kehUkVCKbTCqSIV+Aui2tRE9UF8mRrAZdli/5yGBvxcOG5apWz4b61wW/Rf8eXtmvFJNSBQuwfiLE= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R871e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033032089153;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=36;SR=0;TI=SMTPD_---0XETOXAn_1794274696; Received: from localhost.localdomain(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0XETOXAn_1794274696 cluster:ay36) by smtp.aliyun-inc.com; Tue, 10 Nov 2026 09:38:18 +0800 From: Shuai Xue To: palmer@dabbelt.com, pjw@kernel.org, aou@eecs.berkeley.edu Cc: alex@ghiti.fr, linux-riscv@lists.infradead.org, oleg@redhat.com, rostedt@goodmis.org, mhiramat@kernel.org, mark.rutland@arm.com, peterz@infradead.org, mingo@redhat.com, acme@kernel.org, namhyung@kernel.org, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com, james.clark@linaro.org, jpoimboe@kernel.org, jikos@kernel.org, mbenes@suse.cz, pmladek@suse.com, joe.lawrence@redhat.com, shuah@kernel.org, mpdesouza@suse.com, martin@kaiser.cx, kmehltretter@gmail.com, oliver.yang@linux.alibaba.com, zhuo.song@linux.alibaba.com, xueshuai@linux.alibaba.com, jkchen@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v7 09/10] riscv: Kconfig: enable HAVE_RELIABLE_STACKTRACE and HAVE_LIVEPATCH Date: Tue, 10 Nov 2026 09:37:49 +0800 Message-Id: <20261110013750.36800-10-xueshuai@linux.alibaba.com> X-Mailer: git-send-email 2.39.5 (Apple Git-154) In-Reply-To: <20261110013750.36800-1-xueshuai@linux.alibaba.com> References: <20260914092648.51254-1-xueshuai@linux.alibaba.com> <20261110013750.36800-1-xueshuai@linux.alibaba.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Wang Han Now that the metadata frame records, the kunwind state machine and arch_stack_walk_reliable() are all in place, advertise the capability to the rest of the kernel: * select HAVE_RELIABLE_STACKTRACE under FRAME_POINTER && 64BIT, so only the configurations with the tested metadata records and FP-based reliable walker enable it. * select HAVE_LIVEPATCH under the same condition and source kernel/livepatch/Kconfig so the livepatch menu is reachable from the RISC-V configuration. The 64BIT dependency is conservative scoping rather than a hard technical requirement: the metadata frame record, kunwind state machine and arch_stack_walk_reliable() also build on RV32, and the IRQ-stack frame-record adjustment fixes a latent RV32 issue. However, the syscall livepatch selftest and module relocation path have only been exercised on RV64 QEMU virt so far. The 64BIT gate can be relaxed in a follow-up once RV32 has equivalent coverage. This is split out from the unwinder change so the policy decision and the implementation can be reviewed and reverted independently. Reviewed-by: Shuai Xue Reviewed-by: Martin Kaiser Tested-by: Martin Kaiser Signed-off-by: Wang Han Signed-off-by: Shuai Xue --- arch/riscv/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index e7891a2a89da..4512f67bbfd9 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -186,6 +186,7 @@ config RISCV select HAVE_KRETPROBES # https://github.com/ClangBuiltLinux/linux/issues/1881 select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD + select HAVE_LIVEPATCH if FRAME_POINTER && 64BIT select HAVE_MOVE_PMD select HAVE_MOVE_PUD select HAVE_PAGE_SIZE_4KB @@ -195,6 +196,7 @@ config RISCV select HAVE_PERF_USER_STACK_DUMP select HAVE_POSIX_CPU_TIMERS_TASK_WORK select HAVE_REGS_AND_STACK_ACCESS_API + select HAVE_RELIABLE_STACKTRACE if FRAME_POINTER && 64BIT select HAVE_RETHOOK select HAVE_RSEQ select HAVE_RUST if RUSTC_SUPPORTS_RISCV && CC_IS_CLANG @@ -1415,3 +1417,5 @@ endmenu # "CPU Power Management" source "arch/riscv/kvm/Kconfig" source "drivers/acpi/Kconfig" + +source "kernel/livepatch/Kconfig" -- 2.39.3