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]
Date:	Mon, 13 Feb 2012 17:12:28 -0800
From:	Tony Lindgren <tony@...mide.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Russell King - ARM Linux <linux@....linux.org.uk>,
	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>, linux-kernel@...r.kernel.org,
	Anders Kaseorg <andersk@...lice.com>,
	Greg KH <gregkh@...uxfoundation.org>,
	linux-omap@...r.kernel.org, Ben Hutchings <ben@...adent.org.uk>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] modpost: Fix section warnings for ARM for many
 compilers

* Rusty Russell <rusty@...tcorp.com.au> [120213 16:07]:
> On Mon, 13 Feb 2012 22:51:18 +0000, Russell King - ARM Linux <linux@....linux.org.uk> wrote:
> > On Mon, Feb 13, 2012 at 11:26:52PM +0100, Uwe Kleine-König wrote:
> > > On Mon, Feb 13, 2012 at 01:24:01PM -0800, Tony Lindgren wrote:
> > > Maybe:
> > > 
> > > #ifndef R_ARM_CALL
> > > #warning "you're elf.h include is outdated"
> > 
> > "You are elf.h include is outdated" does not make sense.
> > 
> > Why are you calling Tony an elf.h include?
> 
> Because he knew it would attract the attention of pedants to the patch?
> :)

I've been called worse than that :)
 
> Just do the #ifndef, and skip the warning.  There's not much the poor
> user receiving the warning can do about it.

OK
 
> Acked-by: Rusty Russell <rusty@...tcorp.com.au>

Assuming your ack applies for this patch below, let me know if that's
not the case.  
Regards,

Tony


From: Tony Lindgren <tony@...mide.com>
Date: Mon, 13 Feb 2012 12:30:09 -0800
Subject: [PATCH] modpost: Fix section warnings for ARM for many compilers

It turns out that many compilers don't show section warnings on ARM
currently because handling for ARM_CALL relocs are missing from
modpost.c.

Based on commit c2e26114 ([ARM] 3205/1: Handle new EABI relocations when
loading kernel modules) it seems that R_ARM_PC24, R_ARM_CALL and
R_ARM_JUMP24 can be handled the same way.

Note that at least Debian libc6-dev is missing defines for both
R_ARM_CALL and R_ARM_JUMP24 in /usr/include/elf.h. So for now
we need to define them in modpost.c if not defined.

Acked-by: Rusty Russell <rusty@...tcorp.com.au>
Cc: Ben Hutchings <ben@...adent.org.uk>
Cc: Anders Kaseorg <andersk@...lice.com>
Cc: Greg KH <gregkh@...uxfoundation.org>
Cc: Russell King <rmk+kernel@....linux.org.uk>
Signed-off-by: Tony Lindgren <tony@...mide.com>

--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1494,6 +1494,13 @@ static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
 	return 0;
 }
 
+#ifndef R_ARM_CALL
+#define R_ARM_CALL	28
+#endif
+#ifndef R_ARM_JUMP24
+#define R_ARM_JUMP24	29
+#endif
+
 static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
 {
 	unsigned int r_typ = ELF_R_TYPE(r->r_info);
@@ -1505,6 +1512,8 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
 		              (elf->symtab_start + ELF_R_SYM(r->r_info));
 		break;
 	case R_ARM_PC24:
+	case R_ARM_CALL:
+	case R_ARM_JUMP24:
 		/* From ARM ABI: ((S + A) | T) - P */
 		r->r_addend = (int)(long)(elf->hdr +
 		              sechdr->sh_offset +
--
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