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]
Date:	Thu, 3 Mar 2011 14:11:13 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Dave Martin <dave.martin@...aro.org>
Cc:	Simon Glass <sjg@...omium.org>,
	Nicolas Pitre <nicolas.pitre@...aro.org>,
	Phil Carmody <ext-phil.2.carmody@...ia.com>,
	Tony Lindgren <tony@...mide.com>,
	Catalin Marinas <catalin.marinas@....com>,
	linux-kernel@...r.kernel.org, Rabin Vincent <rabin@....in>,
	Alexander Shishkin <virtuoso@...nd.org>,
	Mikael Pettersson <mikpe@...uu.se>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Joe Perches <joe@...ches.com>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC PATCH] ARM: Use generic BUG() handler

On Wed, Mar 02, 2011 at 10:59:50AM +0000, Dave Martin wrote:
> +	asm volatile("1:\t" __bug_instr "\n"		q	\
> +		     ".pushsection .rodata.str, \"a\"\n"	\
> +		     "2:\t.asciz \"" #__file "\"\n"		\
> +		     ".popsection\n"				\ 

Doesn't this mean we end up with multiple file names?

> +		     ".pushsection __bug_table,\"a\"\n"		\
> +		     "3:\t.word 1b, 2b\n"			\
> +		     "\t.hword " #__line ", 0\n"		\
> +		     ".popsection"				\
> +	unreachable();						\
> +} while (0)

Second problem is that the above produces this:

        1:      .word 0xec000000
.pushsection .rodata.str, "a"
2:      .asciz "__FILE__"
.popsection
.pushsection __bug_table,"a"
3:      .word 1b, 2b
        .hword __LINE__, 0
.popsection

which is clearly not what we want.  Adding another level of indirection
starts to get closer to what we desire:

        1:      .word 0xec000000
.pushsection .rodata.str, "a"
2:      .asciz ""t.c""
.popsection
.pushsection __bug_table,"a"
3:      .word 1b, 2b
        .hword 19, 0
.popsection

but we're still ending up with multiple strings containing the filename,
which is going to excessively bloat the kernel no end.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ