Re: NULL pointer dereference in xenbus_thread->...

2025-05-01 Thread Marek Marczykowski-Górecki
On Tue, Apr 29, 2025 at 08:59:45PM -0400, Jason Andryuk wrote: > Hi Marek, > > On Wed, Apr 23, 2025 at 8:42 AM Marek Marczykowski-Górecki > wrote: > > > > On Sat, Jun 01, 2024 at 12:48:33AM +0200, Marek Marczykowski-Górecki wrote: > > > On Tue, Mar 26, 2024 at 11:00:50AM +, Julien Grall wrote

[PATCH] x86/vpic: Improve bitops usage

2025-05-01 Thread Andrew Cooper
* For vpic_get_priority(), introduce a common ror8() helper in plain C. One thing that I can't persuade the compiler to realise is that a non-zero value rotated is still non-zero, so use __builtin_clz() to help the optimiser out. * vpic_ioport_write() can be simplified to just for_each

[PATCH] x86/vmx: Fix label name in vmwrite_safe()

2025-05-01 Thread Andrew Cooper
This condition is called VMFail(valid) in the SDM. No functional change. Fixes: fc3db01db6fb ("x86/vmx: Rework VMX wrappers using `asm goto()`") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/include/asm/hvm/vmx/vmx.h | 6 +++--- 1 file changed, 3 insert

Re: [PATCH v5 2/3] xen/mm: Switch some APIs over to pte_attr_t

2025-05-01 Thread Stefano Stabellini
On Fri, 25 Apr 2025, Andrew Cooper wrote: > From: Shawn Anastasio > > Several APIs take an architecture-dependent set of flags in an unsigned int, > but this needs to be a wider type to support PPC. > > The new type pte_attr_t has been introduced for this purpose, so switch to it > in map_pages_

Re: [PATCH v5 1/3] xen/mm: Introduce mm-types.h

2025-05-01 Thread Stefano Stabellini
On Fri, 25 Apr 2025, Andrew Cooper wrote: > The type used for pagetable attributes/permissions is currently unsigned int, > but needs to become architecture dependent as PPC needs unsigned long. > > Introduce mm-types.h to house pte_attr_t. > > Given the new toolchain baseline, we can use __has_i

Re: [XEN PATCH] sbat: Add SBAT section to the xen binary

2025-05-01 Thread Demi Marie Obenour
On 5/1/25 7:34 AM, Andrew Cooper wrote: > On 01/05/2025 11:49 am, Gerald Elder-Vass wrote: >> The SBAT section provides a way for the binary to declare a generation >> id for its upstream source and any vendor changes applied. A compatible >> loader can then revoke vulnerable binaries by generation

Re: [PATCH] misra: update list of GCC extensions used by Xen

2025-05-01 Thread Andrew Cooper
On 01/05/2025 8:24 pm, Stefano Stabellini wrote: > From: Nicola Vetrini > > __inline and __inline__ are already handled by ECLAIR but > C-language-toolchain.rst doesn't reflect that. Update the doc. > > No functional change. > > Signed-off-by: Nicola Vetrini > Signed-off-by: Stefano Stabellini

[PATCH] misra: update list of GCC extensions used by Xen

2025-05-01 Thread Stefano Stabellini
From: Nicola Vetrini __inline and __inline__ are already handled by ECLAIR but C-language-toolchain.rst doesn't reflect that. Update the doc. No functional change. Signed-off-by: Nicola Vetrini Signed-off-by: Stefano Stabellini --- docs/misra/C-language-toolchain.rst | 2 ++ 1 file changed,

[PATCH] x86/thunk: Don't opencode TSX instructions in clear_bhb_tsx()

2025-05-01 Thread Andrew Cooper
The new toolchain baseline understands the RTM instructions. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné --- xen/arch/x86/bhb-thunk.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/bhb-thunk.S b/xen/arch/x86/

Re: [PATCH RFC v3 0/8] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE

2025-05-01 Thread Peter Zijlstra
On Thu, May 01, 2025 at 03:22:55PM +, Brendan Jackman wrote: > Whereas enlarging the pool of functions that you can _optionally target_ > for tracing, or nice reliable breakpoints in GDB, and disasm that's > easier to mentally map back to C, seems like a helpful improvement for > test builds.

Re: [PATCH RFC v3 0/8] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE

2025-05-01 Thread Brendan Jackman
On Thu May 1, 2025 at 3:02 PM UTC, Peter Zijlstra wrote: > On Thu, May 01, 2025 at 02:19:47PM +, Brendan Jackman wrote: >> On Tue Apr 29, 2025 at 12:35 PM UTC, Christoph Hellwig wrote: >> > On Tue, Apr 29, 2025 at 12:06:04PM +0800, Chen Linxuan via B4 Relay wrote: >> >> This series introduces a

Re: [PATCH RFC v3 0/8] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE

2025-05-01 Thread Peter Zijlstra
On Thu, May 01, 2025 at 02:19:47PM +, Brendan Jackman wrote: > On Tue Apr 29, 2025 at 12:35 PM UTC, Christoph Hellwig wrote: > > On Tue, Apr 29, 2025 at 12:06:04PM +0800, Chen Linxuan via B4 Relay wrote: > >> This series introduces a new kernel configuration option NO_AUTO_INLINE, > >> which ca

Re: [PATCH v2 0/8] Move parts of Arm's Dom0less to common code

2025-05-01 Thread Oleksii Kurochko
On 5/1/25 2:55 AM, Stefano Stabellini wrote: The patch series needs to be rebased. Actually, I couldn't find a baseline where to apply patch #2 successfully The baseline is:   b0e54c0719 CI: write whole etc/issue for domU initrd But I will prepare and send new version of the patch series soo

Re: [PATCH] mm: move paddr_to_pdx()

2025-05-01 Thread Oleksii Kurochko
On 4/30/25 5:56 PM, Jan Beulich wrote: There's nothing arch-specific about it. While there, on x86 visually separate the vmap_to_*() macros from those covered by the earlier comment. Signed-off-by: Jan Beulich --- a/xen/arch/arm/include/asm/mm.h +++ b/xen/arch/arm/include/asm/mm.h @@ -237,7 +

Re: [PATCH RFC v3 0/8] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE

2025-05-01 Thread Brendan Jackman
On Tue Apr 29, 2025 at 12:35 PM UTC, Christoph Hellwig wrote: > On Tue, Apr 29, 2025 at 12:06:04PM +0800, Chen Linxuan via B4 Relay wrote: >> This series introduces a new kernel configuration option NO_AUTO_INLINE, >> which can be used to disable the automatic inlining of functions. >> >> This wil

Re: [PATCH] xen/x86: allow Dom0 PVH to call XENMEM_exchange

2025-05-01 Thread Jason Andryuk
On 2025-04-30 20:19, Stefano Stabellini wrote: On Wed, 30 Apr 2025, Roger Pau Monné wrote: On Wed, Apr 30, 2025 at 08:27:55AM +0200, Jan Beulich wrote: On 29.04.2025 23:52, Stefano Stabellini wrote: On Tue, 29 Apr 2025, Jan Beulich wrote: On 28.04.2025 22:00, Stefano Stabellini wrote: On Mon

Re: [XEN PATCH v2] sbat: Add SBAT section to the Xen EFI binary

2025-05-01 Thread Frediano Ziglio
On Thu, May 1, 2025 at 1:23 PM Gerald Elder-Vass wrote: > > SBAT is a revocation scheme for UEFI SecureBoot, and is mandated by Microsoft > for signing. > > The SBAT section provides a way for the binary to declare a generation > id for its upstream source and any vendor changes applied. A compati

Re: [XEN PATCH] sbat: Add SBAT section to the xen binary

2025-05-01 Thread Frediano Ziglio
On Thu, May 1, 2025 at 12:34 PM Andrew Cooper wrote: > > On 01/05/2025 11:49 am, Gerald Elder-Vass wrote: > > The SBAT section provides a way for the binary to declare a generation > > id for its upstream source and any vendor changes applied. A compatible > > loader can then revoke vulnerable bin

[XEN PATCH v2] sbat: Add SBAT section to the Xen EFI binary

2025-05-01 Thread Gerald Elder-Vass
SBAT is a revocation scheme for UEFI SecureBoot, and is mandated by Microsoft for signing. The SBAT section provides a way for the binary to declare a generation id for its upstream source and any vendor changes applied. A compatible loader can then revoke vulnerable binaries by generation, using

Re: [XEN PATCH] sbat: Add SBAT section to the xen binary

2025-05-01 Thread Andrew Cooper
On 01/05/2025 11:49 am, Gerald Elder-Vass wrote: > The SBAT section provides a way for the binary to declare a generation > id for its upstream source and any vendor changes applied. A compatible > loader can then revoke vulnerable binaries by generation, using the > binary's declared generation id

Re: [RFC PATCH 0/4] Physical address hypercall ABI ("HVMv2")

2025-05-01 Thread Julien Grall
Hi, On 22/04/2025 08:45, Jan Beulich wrote: On 18.04.2025 16:18, Teddy Astie wrote: In current HVM mode, when a hypercall references a structure in guest memory, it is passed to the hypervisor as its "linear address" (e.g virtual address for the x86 long mode). One of the caveats is that this l

Re: [PATCH] mm: move paddr_to_pdx()

2025-05-01 Thread Julien Grall
Hi Jan, On 30/04/2025 16:56, Jan Beulich wrote: There's nothing arch-specific about it. While there, on x86 visually separate the vmap_to_*() macros from those covered by the earlier comment. Signed-off-by: Jan Beulich Acked-by: Julien Grall Cheers, -- Julien Grall

[XEN PATCH] sbat: Add SBAT section to the xen binary

2025-05-01 Thread Gerald Elder-Vass
The SBAT section provides a way for the binary to declare a generation id for its upstream source and any vendor changes applied. A compatible loader can then revoke vulnerable binaries by generation, using the binary's declared generation id(s) to determine if it is safe to load. More information