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: <763AC431-73A6-4A5F-9453-A66A86D7DEEB@kernel.crashing.org>
Date:	Tue, 10 Jul 2007 23:10:05 +0200
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Andi Kleen <ak@...e.de>, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [x86 setup 13/33] Header file to produce 16-bit code with gcc

>> It seems to me GCC should grow an option to insert .code16gcc
>> by itself (-m16 perhaps?)

> -m16 is the right thing,

Probably not actually, -m16 might have 16-bit "int" etc.
-mabi=16 is closer to what other architectures do here.

> and it also provides a proper hook for
> eventually having a real 16-bit backend (there are at least two  
> projects
> for doing that.)

Those would use -m16, yes.

> For now, I have:
>
> CFLAGS          := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
>                    $(cflags-$(ARCH)) \
>                    -Wall -Wstrict-prototypes \
>                    -march=i386 -mregparm=3 \
>                    -include $(srctree)/$(src)/code16gcc.h \
>                    -fno-strict-aliasing -fomit-frame-pointer \
>                    $(call cc-option, -ffreestanding) \
>                    $(call cc-option, -fno-unit-at-a-time) \
>                    $(call cc-option, -fno-toplevel-reorder) \
>                    $(call cc-option, -fno-stack-protector) \
>                    $(call cc-option, -mpreferred-stack-boundary=2)
>
> ... since that will require less violence to eventually hack in the
> proper -m16 option if/when it becomes available.

Looks good, except you don't want -fno-unit-at-a-time if
-fno-toplevel-reorder works.  And of course it would be
good to get rid of -fno-strict-aliasing, but let's not
go there today ;-P


Segher

-
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