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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200527133356.GA16622@alpha.franken.de>
Date:   Wed, 27 May 2020 15:33:56 +0200
From:   Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To:     Jiaxun Yang <jiaxun.yang@...goat.com>
Cc:     linux-mips@...r.kernel.org, Kees Cook <keescook@...omium.org>,
        Borislav Petkov <bp@...e.de>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Fangrui Song <maskray@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] MIPS: Move kernel head into a standalone section

On Wed, May 27, 2020 at 08:05:22PM +0800, Jiaxun Yang wrote:
> On Wed, 27 May 2020 13:53:54 +0200
> Thomas Bogendoerfer <tsbogend@...ha.franken.de> wrote:
> 
> > On Wed, May 27, 2020 at 02:34:33PM +0800, Jiaxun Yang wrote:
> > > That's what already done by Arm64 and other architectures.
> > > That would allow us put more things like PE headers safely into
> > > the header.
> > > 
> > > Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
> > > ---
> > >  arch/mips/kernel/head.S        | 4 ++--
> > >  arch/mips/kernel/vmlinux.lds.S | 8 ++++++--
> > >  2 files changed, 8 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
> > > index c7c2795837e7..8081a905a71c 100644
> > > --- a/arch/mips/kernel/head.S
> > > +++ b/arch/mips/kernel/head.S
> > > @@ -59,6 +59,8 @@
> > >  #endif
> > >  	.endm
> > >  
> > > +	__HEAD
> > > +_head:
> > >  #ifndef CONFIG_NO_EXCEPT_FILL
> > >  	/*
> > >  	 * Reserved space for exception handlers.  
> > 
> > I'm adding the missing piece, why this change ist broken:
> > 
> >          * Necessary for machines which link their kernels at KSEG0.
> > 
> > by putting something in front of that will probably break platforms
> > making use of "feature". If we can make sure, we don't need it
> > anymore, we should first remove this and then add __HEAD part.
> 
> __HEAD is just marking the section of code.
> It will not add anything to the binary.

oops, should have looked it up first. You mentioned PE headers and
I thought it will be added this way.

> Btw: I just noticed this patch may break relocatable kernel. I'll delay
> it for next merge window.

ok.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ