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-prev] [day] [month] [year] [list]
Message-ID: <tip-5d9070b1f0fc9a159a9a3240c43004828408444b@git.kernel.org>
Date:   Mon, 29 May 2017 01:16:40 -0700
From:   tip-bot for Borislav Petkov <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     jpoimboe@...hat.com, bp@...e.de, mingo@...nel.org, hpa@...or.com,
        peterz@...radead.org, torvalds@...ux-foundation.org,
        linux-kernel@...r.kernel.org, tglx@...utronix.de
Subject: [tip:x86/urgent] x86/debug/32: Convert a smp_processor_id() call to
 raw to avoid DEBUG_PREEMPT warning

Commit-ID:  5d9070b1f0fc9a159a9a3240c43004828408444b
Gitweb:     http://git.kernel.org/tip/5d9070b1f0fc9a159a9a3240c43004828408444b
Author:     Borislav Petkov <bp@...e.de>
AuthorDate: Sun, 28 May 2017 11:03:42 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 29 May 2017 08:22:49 +0200

x86/debug/32: Convert a smp_processor_id() call to raw to avoid DEBUG_PREEMPT warning

... to raw_smp_processor_id() to not trip the

  BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1

check. The reasoning behind it is that __warn() already uses the raw_
variants but the show_regs() path on 32-bit doesn't.

Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20170528092212.fiod7kygpjm23m3o@pd.tnic
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/kernel/process_32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index ff40e74..ffeae81 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -78,7 +78,7 @@ void __show_regs(struct pt_regs *regs, int all)
 
 	printk(KERN_DEFAULT "EIP: %pS\n", (void *)regs->ip);
 	printk(KERN_DEFAULT "EFLAGS: %08lx CPU: %d\n", regs->flags,
-		smp_processor_id());
+		raw_smp_processor_id());
 
 	printk(KERN_DEFAULT "EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
 		regs->ax, regs->bx, regs->cx, regs->dx);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ