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: <98baeeed-345d-4ae9-9418-61df6c689516@zytor.com>
Date: Thu, 22 May 2025 23:23:30 -0700
From: Xin Li <xin@...or.com>
To: Andrew Cooper <andrew.cooper3@...rix.com>,
        kernel test robot <lkp@...el.com>, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
        hpa@...or.com, peterz@...radead.org, stable@...r.kernel.org
Subject: Re: [PATCH v1 1/1] x86/fred/signal: Prevent single-step upon ERETU
 completion

>>>      arch/x86/include/asm/sighandling.h: In function
>>> 'prevent_single_step_upon_eretu':
>>>>> arch/x86/include/asm/sighandling.h:44:21: error: 'struct pt_regs'
>>>>> has no member named 'fred_ss'
>>>         44 |                 regs->fred_ss.swevent = 0;
>>>            |                     ^~
>>>
>>
>> Hmm, this statement is under IS_ENABLED(CONFIG_X86_FRED), which should
>> be a compile time FALSE with i386.  Why it is still being compiled?
> 
> Because what the compiler is seeing is:
> 
> if (0 && ...)
>      regs->fred_ss.swevent = 0;
> 
> and the bad field name is found at parse time, while the whole
> expression is only discarded during optimisation.
> 
> The one thing you can't IS_ENABLED() around is conditional fields.  That
> needs to be full #ifdef.

Thanks a lot for the explanation.  Just sent out v3 using #ifdef.

     Xin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ