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: <e0540fc2-9d38-2fd9-c8c1-a766dfc577d6@csgroup.eu>
Date:   Thu, 1 Sep 2022 16:38:52 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Segher Boessenkool <segher@...nel.crashing.org>
CC:     Sathvika Vasireddy <sv@...ux.ibm.com>,
        "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "aik@...abs.ru" <aik@...abs.ru>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "npiggin@...il.com" <npiggin@...il.com>,
        "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
        "naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>,
        "mbenes@...e.cz" <mbenes@...e.cz>,
        "chenzhongjin@...wei.com" <chenzhongjin@...wei.com>
Subject: Re: [PATCH v2 15/16] objtool/powerpc: Enable objtool to be built on
 ppc



Le 01/09/2022 à 17:11, Segher Boessenkool a écrit :
> On Thu, Sep 01, 2022 at 09:32:46AM +0000, Christophe Leroy wrote:
>> Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
>>> +int arch_decode_instruction(struct objtool_file *file, const struct section *sec,
>>> +			    unsigned long offset, unsigned int maxlen,
>>> +			    unsigned int *len, enum insn_type *type,
>>> +			    unsigned long *immediate,
>>> +			    struct list_head *ops_list)
>>> +{
>>> +	u32 insn;
>>> +
>>> +	*immediate = 0;
>>> +	insn = bswap_if_needed(file->elf, *(u32 *)(sec->data->d_buf + offset));
>>> +	*len = 4;
>>
>> Should be *len = 8 when insn >> 26 == 1.
> 
> But please use ppc_inst_prefixed().  And just use ppc_inst_len() here?

objtool is a userland app, there is no access to kernel headers here.

> 
> Not having convenience abstraction functions like that will give you
> much more work in the future -- currently all prefix insns use primary
> opcode 1, sure, and nothing else does; but this can change.
> 

Yes most likely. Then we have to rebuild some light abstraction for objtool.

Christophe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ