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] [thread-next>] [day] [month] [year] [list]
Message-Id: <200907092044.22108.rusty@rustcorp.com.au>
Date:	Thu, 9 Jul 2009 20:44:21 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	"Jan Beulich" <JBeulich@...ell.com>
Cc:	"Michal Marek" <mmarek@...e.cz>, "Ingo Molnar" <mingo@...e.hu>,
	tony.luck@...el.com, "Thomas Gleixner" <tglx@...utronix.de>,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-modules@...r.kernel.org, hpa@...or.com,
	Jon Masters <jonathan@...masters.org>
Subject: Re: [PATCH] reduce export symbol CRC table size on 64-bit archs

On Mon, 6 Jul 2009 05:12:51 pm Jan Beulich wrote:
> >Jan Beulich napsal(a):
> >> Since these CRCs are really only 32-bit quantities, there's no need to
> >> store them in 64-bit slots. Since, however, gcc doesn't allow
> >> respective initializations, asm() constructs get used to create the CRC
> >> tables (and its for that reason that the patch only makes x86-64 and
> >> ia64 utilize that functionality, as I can't verify this doesn't break
> >> in some subtle way elsewhere).
> >
> >...
> >
> >>  struct modversion_info
> >>  {
> >> -	unsigned long crc;
> >> +	ksym_crc_t crc;
> >>  	char name[MODULE_NAME_LEN];
> >>  };
> >
> >This change breaks module-init-tools:
> >Before:
> >$ /sbin/modprobe --dump-modversions _build/drivers/usb/core/usbcore.ko
> >
> >| head
> >
> >0xb49b735a      module_layout
> >0xdb7e6a70      bus_register
> >...
> >After:
> >$ /sbin/modprobe --dump-modversions
> >_build-crc-int/drivers/usb/core/usbcore.ko  | head
> >0x75646f6d91ea7b5c      le_layout
> >0x5f7375623e215f43      register
> >...
> >It also breaks the newly added depmod -E option (check symbol versions),
> >which also reads the struct modversion_info array (*). Is it possible
> >name the section differently (__versions2?) on those architectures where
> >the size changes, so that it is possible to fix m-i-t in a
> >backwards-compatible manner?
>
> First of all I'd view it as a design bug if user mode code assumptions
> prevent changes to the kernel.

Yes, but unfortunately it happens.  We do it much less than we used to, but 
there are limits.

> But taking this as an uncorrectable fact, I'd think that renaming the
> section would certainly be an option (though I'm unsure whether that would
> have other consequences - Rusty?), however I could also imagine other means
> to communicate to user land the width of a CRC value (e.g. adding an
> absolute symbol during the .ko linking stage).

No, just break it once.  And I still like the idea that we should do something 
more radical if we're going to break this anyway, rather than these nasty asm 
hacks.

Thanks,
Rusty.

--
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