[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202203162014.FEB1496@keescook>
Date: Wed, 16 Mar 2022 20:22:40 -0700
From: Kees Cook <keescook@...omium.org>
To: David Laight <David.Laight@...lab.com>
Cc: James Jones <linux@...innocuous.com>,
Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>,
the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Remove a.out support
On Thu, Mar 17, 2022 at 02:32:29AM +0000, David Laight wrote:
> From: Kees Cook
> > Sent: 16 March 2022 22:30
> >
> > On Wed, Mar 16, 2022 at 01:38:31PM +0100, Arnd Bergmann wrote:
> > > is in the end, but it's likely easier than a standalone a.out loader
> > > in user space, or a conversion to ELF format.
> >
> > Yeah, the exec format is really simple. The only tricky bit was preparing
> > the stack and making sure everything landed in the right place for text
> > and data. James, can you try this? aln and mac run for me, but I'm not
> > actually exercising them beyond dumping argument lists, etc:
>
> Doesn't that restrict the a.out program to the address space below
> the normal base address for elf programs?
> So you'll only be able to load small programs - which might be ok here.
>
> OTOH it might be possible to link the 'loader program' to a high
> address - the elf loader will probably just load it.
> Best to link it static to avoid shared lib mmaps
> and probably try to avoid libc calls.
>
> I was wondering what happens when malloc() starts using
> sbrk() - but I guess it sees the top of the bss for the
> loaded and it all works fine.
I'll wait unless something breaks. :) Right now I just wanted to get aln
and mac working -- and that's a pretty small subset of all a.out
binaries. :)
--
Kees Cook
Powered by blists - more mailing lists