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: <9ba2f0ac-eb06-4437-8662-441da7e168c7@citrix.com>
Date: Thu, 3 Apr 2025 00:26:59 +0100
From: Andrew Cooper <andrew.cooper3@...rix.com>
To: Uros Bizjak <ubizjak@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>, Andy Lutomirski <luto@...nel.org>,
 Brian Gerst <brgerst@...il.com>, Juergen Gross <jgross@...e.com>,
 Rik van Riel <riel@...riel.com>, "H. Peter Anvin" <hpa@...or.com>,
 Peter Zijlstra <peterz@...radead.org>,
 "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
 Linus Torvalds <torvalds@...ux-foundation.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org
Subject: Re: [tip: x86/mm] x86/idle: Standardize argument types for
 MONITOR{,X} and MWAIT{,X} instruction wrappers on 'u32'

On 02/04/2025 9:43 pm, tip-bot2 for Uros Bizjak wrote:
> The following commit has been merged into the x86/mm branch of tip:
>
> Commit-ID:     1ae899e413105aa81068d0282ab6e22974891d74
> Gitweb:        https://git.kernel.org/tip/1ae899e413105aa81068d0282ab6e22974891d74
> Author:        Uros Bizjak <ubizjak@...il.com>
> AuthorDate:    Wed, 02 Apr 2025 20:08:05 +02:00
> Committer:     Ingo Molnar <mingo@...nel.org>
> CommitterDate: Wed, 02 Apr 2025 22:26:17 +02:00
>
> x86/idle: Standardize argument types for MONITOR{,X} and MWAIT{,X} instruction wrappers on 'u32'
>
> MONITOR and MONITORX expect 32-bit unsigned integer arguments in the %ecx
> and %edx registers. MWAIT and MWAITX expect 32-bit usigned int
> argument in %eax and %ecx registers.
>
> Some of the helpers around these instructions in <asm/mwait.h> are using
> too wide types (long), standardize on u32 instead that makes it clear that
> this is a hardware ABI.
>
> [ mingo: Cleaned up the changelog. ]
>
> Signed-off-by: Uros Bizjak <ubizjak@...il.com>

Something I noticed while looking over this is that you want to push the
u32's up into the callers too.

mwait_idle_with_hints() with have (marginally) better code gen by
swapping it's unsigned longs for u32's.

~Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ