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-prev] [day] [month] [year] [list]
Date:	Sun, 12 Jun 2011 07:23:29 +0000
From:	"Daniel K." <dk@...no>
To:	Jesper Juhl <jj@...osbits.net>
CC:	David Miller <davem@...emloft.net>, viro@...IV.linux.org.uk,
	sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][RFC] Sparc: Remove trigraph in die_if_kernel() message.

Jesper Juhl wrote:
> On Thu, 9 Jun 2011, David Miller wrote:
> 
>> From: Al Viro <viro@...IV.linux.org.uk>
>> Date: Fri, 10 Jun 2011 00:03:22 +0100
>>
>>> On Thu, Jun 09, 2011 at 03:59:43PM -0700, David Miller wrote:
>>>>> If I'm not mistaken, that "??!" will be taken as a trigraph for "|" by the 
>>>>> preprocessor, so the final string will end up either as
>>>>>   "Penguin instruction from Penguin mode|?!"
>>> Not without -trigraphs, which is not on by default...
>> Oh, in that case I'll rever this.
>>
> 
> Well, my gcc warns about it. It seems that -Wtrigraphs is enabled by 
> default:

Perhaps the _real_ fix is just to remove all the interrobanging going on here,
and be in line with all the other die_if_kernel() calls in the file.

Something like this?

(Yeah, I shamelessly snarfed the patch from Jesper, and deleted all the excess
?'s and !'s. I haven't cared enough figure out the proper *-by: attribution
magic to credit Jesper, so someone just add whatever is necessary if they feel
so inclined. I can't pretend to care much about my contribution in this.)

Signed-off-by: Daniel K. <dk@...no>
---
diff --git a/arch/sparc/kernel/traps_32.c b/arch/sparc/kernel/traps_32.c
index c0490c7..d99ca40 100644
--- a/arch/sparc/kernel/traps_32.c
+++ b/arch/sparc/kernel/traps_32.c
@@ -137,7 +137,7 @@ void do_priv_instruction(struct pt_regs *regs, unsigned long pc, unsigned long n
 	siginfo_t info;
 
 	if(psr & PSR_PS)
-		die_if_kernel("Penguin instruction from Penguin mode??!?!", regs);
+		die_if_kernel("Penguin instruction from Penguin mode", regs);
 	info.si_signo = SIGILL;
 	info.si_errno = 0;
 	info.si_code = ILL_PRVOPC;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists