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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210918074718.240511-1-yang.guang5@zte.com.cn>
Date:   Sat, 18 Sep 2021 07:47:18 +0000
From:   cgel.zte@...il.com
To:     peterz@...radead.org
Cc:     jpoimboe@...hat.com, jbaron@...mai.com, rostedt@...dmis.org,
        ardb@...nel.org, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, x86@...nel.org, hpa@...or.com,
        linux-kernel@...r.kernel.org, Yang Guang <yang.guang5@....com.cn>
Subject: [PATCH] Add exception handling

From: Yang Guang <yang.guang5@....com.cn>

If the type is abnormal input from argument, the code will be NULL.
So it should return as default;

Signed-off-by: Yang Guang <yang.guang5@....com.cn>
---
 arch/x86/kernel/static_call.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/static_call.c b/arch/x86/kernel/static_call.c
index f608e6710300..696da3eccf28 100644
--- a/arch/x86/kernel/static_call.c
+++ b/arch/x86/kernel/static_call.c
@@ -45,6 +45,8 @@ static void __ref __static_call_transform(void *insn, enum insn_type type, void
 		code = text_gen_insn(RET_INSN_OPCODE, insn, func);
 		size = RET_INSN_SIZE;
 		break;
+	default:
+		return;
 	}
 
 	if (memcmp(insn, code, size) == 0)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ