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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 01 Feb 2014 21:23:16 +1030
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	David Long <dave.long@...aro.org>,
	linux-arm-kernel@...ts.infradead.org
Cc:	James Hogan <james.hogan@...tec.com>,
	Andi Kleen <ak@...ux.intel.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Detect section mismatches in thumb relocations

David Long <dave.long@...aro.org> writes:
> From: "David A. Long" <dave.long@...aro.org>
>
> Add processing for normally encountered thumb relocation types so that
> section mismatches will be detected.
>
> Signed-off-by: David A. Long <dave.long@...aro.org>

Happiest for this to go through an ARM tree, so:

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

Cheers,
Rusty.

> ---
>  scripts/mod/modpost.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 1785576..9e6c996 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1498,6 +1498,16 @@ static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
>  #define R_ARM_JUMP24	29
>  #endif
>  
> +#ifndef	R_ARM_THM_CALL
> +#define	R_ARM_THM_CALL		10
> +#endif
> +#ifndef	R_ARM_THM_JUMP24
> +#define	R_ARM_THM_JUMP24	30
> +#endif
> +#ifndef	R_ARM_THM_JUMP19
> +#define	R_ARM_THM_JUMP19	51
> +#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);
> @@ -1511,6 +1521,9 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
>  	case R_ARM_PC24:
>  	case R_ARM_CALL:
>  	case R_ARM_JUMP24:
> +	case R_ARM_THM_CALL:
> +	case R_ARM_THM_JUMP24:
> +	case R_ARM_THM_JUMP19:
>  		/* From ARM ABI: ((S + A) | T) - P */
>  		r->r_addend = (int)(long)(elf->hdr +
>  		              sechdr->sh_offset +
> -- 
> 1.8.1.2
--
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