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: <alpine.LFD.0.98.0705212150000.3890@woody.linux-foundation.org>
Date:	Mon, 21 May 2007 21:52:59 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Atsushi Nemoto <anemo@....ocn.ne.jp>
cc:	ben.collins@...ntu.com, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, sam@...nborg.org, dwmw2@...radead.org,
	adobriyan@...il.com
Subject: Re: [RFC] Crash on modpost, addend_386_rel()



On Tue, 22 May 2007, Atsushi Nemoto wrote:
> 
> Anyway, here is a updated patch tested on i386 (RELOCATABLE=y/n), arm,
> and mips.  On calculation of 'location', sh_addr should be subtracted
> (thank you for debugging, Linus).  And this patch contains an another
> fix and an improvement of added_mips_rel

Would you mind also just making this whole logic (that is generic and 
shared with all the different arch versions) be an inline function of its 
own? 

> +	Elf_Shdr *sechdrs = elf->sechdrs;
> +	unsigned int *location;
> +	int section = sechdrs[rsection].sh_info;
> +
> +	location = (void *)elf->hdr + sechdrs[section].sh_offset +
> +		(r->r_offset - sechdrs[section].sh_addr);

so that all the functions could just use some generic

	location = reloc_location(elf, rsection, r);

or similar, instead of having that complex thing duplicated three times 
(arm, mips and i386)?

Especially since other architectures will likely end up doing the same 
thing too...

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