# Kernel -no-red-zone required today?

## f4c3m3l70r

I want to try a newer kernel today and came across this article.

 *Quote:*   

> x86 64-bit processors
> 
> AMD has enhanced the 32-bit x86 instruction set to a 64-bit instruction set called x86-64, which is implemented in their AMD64 processors.(24) On AMD64 systems GCC generates 64-bit code by default. The option -m32 allows 32-bit code to be generated instead.
> 
> The AMD64 processor has several different memory models for programs running in 64-bit mode. The default model is the small code model, which allows code and data up to 2GB in size. The medium code model allows unlimited data sizes and can be selected with -mcmodel=medium. There is also a large code model, which supports an unlimited code size in addition to unlimited data size. It is not currently implemented in GCC since the medium code model is sufficient for all practical purposes--executables with sizes greater than 2GB are not encountered in practice.
> ...

 

Do I have to specify these parameters only in Makefile or in make.conf for all apps?

----------

## depontius

This is the first I've seen of "-no-red-zone" and I've been running amd64 kernels for years on multiple systems.

I'd say it's already being handled, under the covers.

----------

## roarinelk

Correct, the x86 Makefile explicitly adds this compiler flag.

----------

## f4c3m3l70r

GCC 4.5.3 does not accept -mc-model=kernel, but with -no-red-zone kernel image is 200 bytes bigger so it seems to affect something.

----------

## roarinelk

it's "-mcmodel=kernel".

Do a comparison of the section sizes with "size" with and without that flag. I bet

it's just alignment and/or padding of structures which changes.

----------

## Aquous

 *f4c3m3l70r wrote:*   

> Do I have to specify these parameters only in Makefile or in make.conf for all apps?

 Neither. -mno-red-zone is only needed when compiling the Linux kernel, which its Makefile takes care of for you.

----------

