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] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1106100947010.19998@swampdragon.chaosbits.net>
Date:	Fri, 10 Jun 2011 09:51:22 +0200 (CEST)
From:	Jesper Juhl <jj@...osbits.net>
To:	David Miller <davem@...emloft.net>
cc:	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.

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:

[jj@...gon src]$ gcc --version
gcc (GCC) 4.6.0 20110603 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO                                                                                    
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

[jj@...gon src]$ cat test.c
#include <stdio.h>

int main()
{
  printf("Penguin instruction from Penguin mode??!?!");
  return 0;
}
[jj@...gon src]$ gcc test.c
test.c: In function ‘main’:
test.c:5:48: warning: trigraph ??! ignored, use -trigraphs to enable [-Wtrigraphs]


Which was why I wrote in my original submission mail :

"... which I assume is not what we want, or as the correct string but with 
a warning about an ignored trigraph which I assume we don't want either."

So either we get the wrong string (if someone enables -trigraphs) or we 
get a warning (at least with newer gcc's). Which is why I felt the patch 
made sense as a way to avoid both unfortunate results.

-- 
Jesper Juhl <jj@...osbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ