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: <515E9C0D.503@cip.cs.fau.de>
Date:	Fri, 05 Apr 2013 11:40:29 +0200
From:	Sebastian Wankerl <sisewank@....cs.fau.de>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Philip Kranz <philip.kranz@...glemail.com>,
	linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
	i4passt@...ts.informatik.uni-erlangen.de
Subject: Re: [PATCH] Add non-zero module sections to sysfs

On 04/05/13 06:00, Rusty Russell wrote:
> Exactly.  Don't workaround it here, revert it and put the
> duplicate-section-name fixup in parisc where it belongs.
>
> Assuming parisc still produces these dup sections: that patch is 4 years
> old now.
>
> Untested:
>
> diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
> index 2a625fb..28d32a2 100644
> --- a/arch/parisc/kernel/module.c
> +++ b/arch/parisc/kernel/module.c
> @@ -341,6 +341,11 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr,
>  			    ".PARISC.unwind", 14) == 0)
>  			me->arch.unwind_section = i;
>  
> +		/* we produce multiple, empty .text sections, and kallsyms
> +		 * gets upset.  make non-alloc so it doesn't see them. */
> +		if (sechdrs[i].sh_size == 0)
> +			sechdrs[i].sh_flags &= ~SHF_ALLOC;
> +
>  		if (sechdrs[i].sh_type != SHT_RELA)
>  			continue;
We just worked your suggested patch in.

> Why?  Does something refer to this empty section?  Why has noone noticed
> this since 2009?

GDB wants to know all section with attribute ALLOC, regardless whether
they are empty or not. Thus, it is useful if all of them appear in sysfs.
> A zero-length section doesn't change the binary's structure.  You don't
> see non-SHF_ALLOC sections either.

Yes, but they do occupy an index in the section headers of the binary.
GDB needs to know all of them in the right order.
--
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