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: <6bc8722e-f84b-427e-96ad-6e0c3907bd09@oracle.com>
Date: Tue, 18 Nov 2025 08:19:14 +0100
From: Alexandre Chartre <alexandre.chartre@...cle.com>
To: David Laight <david.laight.linux@...il.com>
Cc: alexandre.chartre@...cle.com, Josh Poimboeuf <jpoimboe@...nel.org>,
        linux-kernel@...r.kernel.org, mingo@...nel.org, peterz@...radead.org
Subject: Re: [PATCH v4 00/28] objtool: Function validation tracing


On 11/17/25 23:09, David Laight wrote:
> On Mon, 17 Nov 2025 14:11:55 +0100
> Alexandre Chartre <alexandre.chartre@...cle.com> wrote:
> 
>> On 11/17/25 13:37, David Laight wrote:
>>> On Mon, 17 Nov 2025 10:47:06 +0100
>>> Alexandre Chartre <alexandre.chartre@...cle.com> wrote:
>>>    
>>>> On 11/17/25 10:42, David Laight wrote:
>>> ...
>>>>> Although I think there ought to be some indication of the 31 NOP bytes
>>>>> at the end of the middle alternative.
>>>>
>>>> I am now compacting the code by removing all trailing NOPs. I should probably
>>>> improve that with printing the actual number of NOPs, for example NOP31 (or nop31)
>>>
>>> That is the sort of thing I was thinking of.
>>> Perhaps the actual opcodes on one line - eg: NOP5; NOP5; NOP5; NOP1
>>
>> That might not always be very compact. For example __switch_to_asm() has 41 NOP1.
>> I will use NOP<n> for now, and we can improve later.
> 
> Could you use NOP1*41 (etc) so that NOP5*4 is different from NOP1*20?
> (I'm guessing you hand-decode the standard NOP sequences already?)

Yes, objtool already identifies standard NOP sequences.

> Hmm... you don't want to execute that many 0x90 bytes.
> I think that case might have had a jump around them.

In that specific case, they are not executed, they are after a jump:

   82e7:  __switch_to_asm+0x27  <alternative.82e7>
                                = DEFAULT
   82e7:  __switch_to_asm+0x27  | jmp    0x8312 <__switch_to_asm+0x52>
   82e9:  __switch_to_asm+0x29  | NOP41
                                                                                  |

alex.

> Do I remember something about the trailing nop being merged?
> Perhaps that is the kernel patching code.
> Something made me think objtool might (also) be doing it.
> 
> 	David


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ