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]
Date: Wed, 3 Jan 2024 11:15:42 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
	dave.hansen@...ux.intel.com, x86@...nel.org
Cc: mhiramat@...nel.org, linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
	patches@...ts.linux.dev
Subject: Re: [PATCH] x86/tools: objdump_reformat.awk: Skip bad instructions
 from llvm-objdump

Ping? I am still seeing this issue.

On Tue, Dec 05, 2023 at 12:53:08PM -0700, Nathan Chancellor wrote:
> When running the instruction decoder selftest with LLVM=1 +
> CONFIG_PVH=y, there is a series of warnings:
> 
>   arch/x86/tools/insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this.
>   arch/x86/tools/insn_decoder_test: warning: ffffffff81000050     ea                      <unknown>
>   arch/x86/tools/insn_decoder_test: warning: objdump says 1 bytes, but insn_get_length() says 7
>   arch/x86/tools/insn_decoder_test: warning: Decoded and checked 7214721 instructions with 1 failures
> 
> GNU objdump outputs "(bad)" instead of "<unknown>", which is already
> handled in the bad_expr regex, so there is no warning.
> 
>   $ objdump -d arch/x86/platform/pvh/head.o | grep -E '50:\s+ea'
>   50:   ea                      (bad)
> 
>   $ llvm-objdump -d arch/x86/platform/pvh/head.o | grep -E '50:\s+ea'
>         50: ea                            <unknown>
> 
> Add "<unknown>" to the bad_expr regex to clear up the warning, allowing
> the instruction decoder selftest to fully pass with llvm-objdump.
> 
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> ---
>  arch/x86/tools/objdump_reformat.awk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/tools/objdump_reformat.awk b/arch/x86/tools/objdump_reformat.awk
> index a4120d907277..20b08a6c4d33 100644
> --- a/arch/x86/tools/objdump_reformat.awk
> +++ b/arch/x86/tools/objdump_reformat.awk
> @@ -11,7 +11,7 @@ BEGIN {
>  	prev_addr = ""
>  	prev_hex = ""
>  	prev_mnemonic = ""
> -	bad_expr = "(\\(bad\\)|^rex|^.byte|^rep(z|nz)$|^lock$|^es$|^cs$|^ss$|^ds$|^fs$|^gs$|^data(16|32)$|^addr(16|32|64))"
> +	bad_expr = "(\\(bad\\)|<unknown>|^rex|^.byte|^rep(z|nz)$|^lock$|^es$|^cs$|^ss$|^ds$|^fs$|^gs$|^data(16|32)$|^addr(16|32|64))"
>  	fwait_expr = "^9b[ \t]*fwait"
>  	fwait_str="9b\tfwait"
>  }
> 
> ---
> base-commit: 5225952d74d43e4c054731c74b8afd700b23a94a
> change-id: 20231205-objdump_reformat-awk-handle-llvm-objdump-bad_expr-9e74cd2a08b5
> 
> Best regards,
> -- 
> Nathan Chancellor <nathan@...nel.org>
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ