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: <20090807135524.GF4455@laptop>
Date:	Fri, 7 Aug 2009 15:55:24 +0200
From:	Albin Tonnerre <albin.tonnerre@...e-electrons.com>
To:	Matthieu CASTET <matthieu.castet@...rot.com>
Cc:	Alain Knaff <alain@...ff.lu>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	"sam@...nborg.org" <sam@...nborg.org>,
	"hpa@...or.com" <hpa@...or.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-embedded@...r.kernel.org" <linux-embedded@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/6] Add support for LZO-compressed kernels for ARM

On Fri, Aug 07, 2009 at 03:27:00PM +0200, Matthieu CASTET wrote :
> Albin Tonnerre a écrit :
> > On Fri, Aug 07, 2009 at 01:50:03PM +0200, Matthieu CASTET wrote :
> >> Albin Tonnerre a écrit :
> >>> On Fri, Aug 07, 2009 at 11:36:56AM +0200, Alain Knaff wrote :
> >>>> On 08/07/09 11:24, Albin Tonnerre wrote:

> >>>>> Regards,

> >>>> Could it be that the patches that remove division (zutil.h and inflate.c)
> >>>> have somehow not been applied?

> >>> Indeed, they've not been applied. However, I'd rather try to understand why
> >>> exactly this is an issue when compiling with -Os and not -O2 instead of working
> >>> around it by removing the divisions.

> >> Look at the generated code.

> >> Arm doesn't have division instruction.
> >> May be at -Os gcc emit a call to the software division, but at -O2 it
> >> manage to optimise the division (transform it in shift, inline some
> >> builtin, ...).

> > Yes, I figured that out. What I don't get, though, is that it fails while the
> > software division symbol (__aeabi_uidivmod here) does seem to be provided by
> > libgcc.

> AFAIK we don't link the kernel with libgcc.
> That's why the kernel provide __aeabi_* in arch/arm/lib

That's true for the actual kernel image, but not for the bootstrap code we use
when compiling compressed kernels. arch/arm/boot/compressed/Makefile uses
libgcc, unless I'm overlooking something here:

  arm-unknown-linux-uclibcgnueabi-ld -EL    --defsym zreladdr=0x20008000
  --defsym initrd_phys=0x20410000 --defsym params_phys=0x20000100 -p
  --no-undefined -X
  /home/albin/x-tools/arm-unknown-linux-uclibcgnueabi/lib/gcc/arm-unknown-linux-uclibcgnueabi/4.3.2/libgcc.a
  -T arch/arm/boot/compressed/vmlinux.lds arch/arm/boot/compressed/head.o
  arch/arm/boot/compressed/piggy.gzip.o arch/arm/boot/compressed/misc.o -o
  arch/arm/boot/compressed/vmlinux


Regards,
-- 
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
--
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