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] [day] [month] [year] [list]
Date:	Wed, 17 Aug 2016 11:38:27 +0200 (CEST)
From:	Miroslav Benes <mbenes@...e.cz>
To:	Jessica Yu <jeyu@...hat.com>
cc:	Torsten Duwe <duwe@....de>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>, takahiro.akashi@...aro.org,
	Jungseok Lee <jungseoklee85@...il.com>,
	Arnd Bergmann <arnd@...db.de>,
	Li Bin <huawei.libin@...wei.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...hat.com>,
	Christopher Li <sparse@...isli.org>,
	Jiri Kosina <jikos@...nel.org>, andrew.wafaa@....com,
	linux-arm-kernel@...ts.infradead.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	live-patching@...r.kernel.org, linux-arch@...r.kernel.org,
	linux-sparse@...r.kernel.org
Subject: Re: [PATCH] arm64: take SHN_LIVEPATCH syms into account when
 calculating plt_max_entries

On Tue, 12 Jul 2016, Jessica Yu wrote:

> SHN_LIVEPATCH symbols are technically a subset of SHN_UNDEF/undefined
> symbols, except that their addresses are resolved by livepatch at runtime.
> Therefore, when calculating the upper-bound for the number of plt entries
> to allocate, make sure to take livepatch symbols into account as well.
> 
> Signed-off-by: Jessica Yu <jeyu@...hat.com>

FWIW, I think the patch does what we want, but it's for arm people to 
judge. It might be better to include it to Torsten's patch set.

Miroslav

> ---
> arch/arm64/kernel/module-plts.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kernel/module-plts.c b/arch/arm64/kernel/module-plts.c
> index 1ce90d8..1e95dc1 100644
> --- a/arch/arm64/kernel/module-plts.c
> +++ b/arch/arm64/kernel/module-plts.c
> @@ -122,7 +122,8 @@ static unsigned int count_plts(Elf64_Sym *syms, Elf64_Rela
> *rela, int num)
>                         * as well, so modules can never grow beyond that
> limit.
>                         */
>                        s = syms + ELF64_R_SYM(rela[i].r_info);
> -                       if (s->st_shndx != SHN_UNDEF)
> +                       if (s->st_shndx != SHN_UNDEF &&
> +                           s->st_shndx != SHN_LIVEPATCH)
>                                break;
> 
>                        /*
> -- 
> 2.5.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ