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: <20250602215725.GA39782@noisy.programming.kicks-ass.net>
Date: Mon, 2 Jun 2025 23:57:25 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Linus Torvalds <torvalds@...uxfoundation.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, kees@...nel.org,
	acarmina@...hat.com, jpoimboe@...nel.org, mark.rutland@....com
Subject: Re: [RFC 6/8] x86_64/bug: Implement __WARN_printf()

On Mon, Jun 02, 2025 at 09:38:09AM -0700, Linus Torvalds wrote:

> And no, I'm not ok with only using 'objdump' and friends to look at
> assembly generation. I want to be able to do
> 
>    make xyz.s
> 
> and look at code generation without throwing up.

So if I stuff the asm macro in a global asm() block then GCC ends up
looking like so:

        .set warn_imm, 0
        warn_add_reg var=warn_imm reg=%rcx      # tmp215
        .set warn_imm, (warn_imm << 4)
        warn_add_reg var=warn_imm reg=%rdx      # tmp212
        1: ud1 warn_imm(%ecx),%rax      # tmp210
        .pushsection .discard.annotate_insn,"M",@progbits,8
        .long 1b - .
        .long 8
        .popsection
        .pushsection __bug_table, "aw" ; 123: .long 1b - . ; .long .LC76 - . ; .long .LC0 - . ; .word 8710 ; .word 2321 ; .org 123b + 6 + 4 + 6 ; .popsection   #,,,

However, clangd is 'helpful' and fully expands the asm macro for the .s
file :-(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ