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:	Mon, 14 Mar 2011 15:50:52 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	Jesper Juhl <jj@...osbits.net>, x86@...nel.org,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH][rfc] Use int as return type of main in arch/x86/boot/main.c

On 03/14/2011 12:03 PM, Steven Rostedt wrote:
> On Sun, Mar 13, 2011 at 11:00:09PM +0100, Jesper Juhl wrote:
>> I believe the return type of main should always be 'int'.
> 
> But this is not userspace, it is called from assmebly in header.S:
> 
>  # Jump to C code (should not return)
>  calll	main
> 
> We don't care what main returns. If it does return anything, then it
> dies:
> 
> # Setup corrupt somehow...
> setup_bad:
>         movl    $setup_corrupt, %eax
>         calll   puts
>         # Fall through...
> 
>         .globl  die
>         .type   die, @function
> die:
>         hlt
>         jmp     die
> 

Yes, but some versions of gcc complains about a nonstandard signature to
main().  At least that's what I assume Jesper's issue was.

	-hpa
--
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