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  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, 11 Aug 2014 14:02:14 -0400
From:	Vivek Goyal <>
To:	"H. Peter Anvin" <>
Cc:	Shaun Ruffell <>,,,,,,,,,,
Subject: Re: [PATCH 11/15] purgatory: Core purgatory functionality

On Mon, Aug 11, 2014 at 10:51:10AM -0700, H. Peter Anvin wrote:
> On 08/11/2014 10:40 AM, Shaun Ruffell wrote:
> > FYI, it looks like the following patch (committed in
> > 8fc5b4d4121c95482b2583) adds a new requirement to use at least gcc
> > 4.4 to build the kernel?
> Well, to build the kernel with that particular new functionality
> enabled, yes.
> However...
> > The above "-mcmodel=large" compiler flag produces the following output on GCC 4.1.2.
> > 
> >   $ make modules_prepare ; gcc --version
> >     CHK     include/config/kernel.release
> >     CHK     include/generated/uapi/linux/version.h
> >     CHK     include/generated/utsrelease.h
> >     CC      arch/x86/purgatory/purgatory.o
> >   arch/x86/purgatory/purgatory.c:1: sorry, unimplemented: code model ‘large’ not supported yet
> >   make[1]: *** [arch/x86/purgatory/purgatory.o] Error 1
> >   make: *** [archprepare] Error 2
> >   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)
> >   Copyright (C) 2006 Free Software Foundation, Inc.
> >   This is free software; see the source for copying conditions.  There is NO
> > 
> > I did a quick search for a discussion the indicates this compiler is now
> > officially too old to build the kernel but did not find one.
> > 
> > If this is required, maybe Documentation/Changes needs to be updated
> > with the new minimum required version?
> ... I'm having a very, very hard time to picture a reason why the
> "large" model would be necessary or even desirable for the purgatory
> code.  The "small PIC" model seem to fit much better...

Hi hpa,

I took it because kexec-tools uses it and in one of the committs Eric
gave following reasoning.

    On x86_64 use -mcmodel=large so that the code is built without
    any 32bit assumptions.  -mcmodel=medium and -mcmodel=small
    result int code that has 32bit relocations against variables
    that can live anywhere in the address space

We do want to load purgatory anywhere in the address space. 

But if there are other ways to achieve the same thing, I will do that

So when you say "small PIC", I need to use -mcmodel=small and -fPIC?

I can give that a try.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists