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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 Aug 2022 06:31:44 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Sathvika Vasireddy <sv@...ux.ibm.com>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
CC:     "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "aik@...abs.ru" <aik@...abs.ru>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "mbenes@...e.cz" <mbenes@...e.cz>,
        "npiggin@...il.com" <npiggin@...il.com>,
        "chenzhongjin@...wei.com" <chenzhongjin@...wei.com>,
        "naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 12/16] objtool: Read special sections with alts only
 when specific options are selected



Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> This patch reads special sections which have alternate
> instructions, only when stackval or orc or uaccess or
> noinstr options are passed to objtool.

Unclear, I had to read it three time to understand.

What about something like:

--- >8 ---
Reading special sections which have alternate instructions is only 
needed for stack validation or orc or uaccess validation or noinstr 
validation.

Only call add_special_section_alts() when stackval or orc or uaccess or
noinstr options are passed to objtool.
--- >8 ---

> 
> Signed-off-by: Sathvika Vasireddy <sv@...ux.ibm.com>
> ---
>   tools/objtool/check.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index 3cea58f73878..5298a143ceac 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -2370,9 +2370,11 @@ static int decode_sections(struct objtool_file *file)
>   	 * Must be before add_jump_destinations(), which depends on 'func'
>   	 * being set for alternatives, to enable proper sibling call detection.
>   	 */
> -	ret = add_special_section_alts(file);
> -	if (ret)
> -		return ret;
> +	if (opts.stackval || opts.orc || opts.uaccess || opts.noinstr) {
> +		ret = add_special_section_alts(file);
> +		if (ret)
> +			return ret;
> +	}
>   
>   	ret = add_jump_destinations(file);
>   	if (ret)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ