[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220429094355.122389-22-chenzhongjin@huawei.com>
Date: Fri, 29 Apr 2022 17:43:39 +0800
From: Chen Zhongjin <chenzhongjin@...wei.com>
To: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-arch@...r.kernel.org>
CC: <jthierry@...hat.com>, <catalin.marinas@....com>,
<will@...nel.org>, <masahiroy@...nel.org>, <jpoimboe@...hat.com>,
<peterz@...radead.org>, <ycote@...hat.com>,
<herbert@...dor.apana.org.au>, <mark.rutland@....com>,
<davem@...emloft.net>, <ardb@...nel.org>, <maz@...nel.org>,
<tglx@...utronix.de>, <luc.vanoostenryck@...il.com>,
<chenzhongjin@...wei.com>
Subject: [RFC PATCH v4 21/37] arm64: kernel: Skip validation of proton-pack.c.c and hibernate.c
From: Julien Thierry <jthierry@...hat.com>
Julien Said,
"""
This workaround code is more akin to an ancient incantation than
sensible code. And since the function does not call another function
than itself, unwinding from instructions in it should be reliable.
"""
Also add mark for swsusp_arch_resume. It's a noreturn function called
by special ABI.
Signed-off-by: Julien Thierry <jthierry@...hat.com>
Signed-off-by: Chen Zhongjin <chenzhongjin@...wei.com>
---
arch/arm64/kernel/hibernate.c | 2 ++
arch/arm64/kernel/proton-pack.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c
index 6328308be272..f5422ae77dc6 100644
--- a/arch/arm64/kernel/hibernate.c
+++ b/arch/arm64/kernel/hibernate.c
@@ -16,6 +16,7 @@
#include <linux/sched.h>
#include <linux/suspend.h>
#include <linux/utsname.h>
+#include <linux/objtool.h>
#include <asm/barrier.h>
#include <asm/cacheflush.h>
@@ -471,6 +472,7 @@ int swsusp_arch_resume(void)
return 0;
}
+STACK_FRAME_NON_STANDARD(swsusp_arch_resume);
int hibernate_resume_nonboot_cpu_disable(void)
{
diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
index 40be3a7c2c53..9439e62d4b57 100644
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -22,6 +22,7 @@
#include <linux/cpu.h>
#include <linux/device.h>
#include <linux/nospec.h>
+#include <linux/objtool.h>
#include <linux/prctl.h>
#include <linux/sched/task_stack.h>
@@ -257,6 +258,7 @@ static noinstr void qcom_link_stack_sanitisation(void)
"mov x30, %0 \n"
: "=&r" (tmp));
}
+STACK_FRAME_NON_STANDARD(qcom_link_stack_sanitisation);
static bp_hardening_cb_t spectre_v2_get_sw_mitigation_cb(void)
{
--
2.17.1
Powered by blists - more mailing lists