Re: [PATCH v2] xen/arm: gnttab: cast unused macro arguments to void

2022-05-03 Thread Michal Orzel
Hi Julien, On 03.05.2022 19:44, Julien Grall wrote: > Hi, > > On 28/04/2022 10:46, Michal Orzel wrote: >> Function unmap_common_complete (common/grant_table.c) defines and sets >> a variable ld that is later on passed to a macro: >> gnttab_host_mapping_get_page_type(). >> On Arm this macro does n

Re: [PATCH 10/32] wcn36xx: Use mem_to_flex_dup() with struct wcn36xx_hal_ind_msg

2022-05-03 Thread Kalle Valo
Kees Cook writes: > As part of the work to perform bounds checking on all memcpy() uses, > replace the open-coded a deserialization of bytes out of memory into a > trailing flexible array by using a flex_array.h helper to perform the > allocation, bounds checking, and copying. > > Cc: Loic Poulai

[PATCH] optee: immediately free RPC buffers that are released by OP-TEE

2022-05-03 Thread Jens Wiklander
This commit fixes a case overlooked in [1]. There are two kinds of shared memory buffers used by OP-TEE: 1. Normal payload buffer 2. Internal command structure buffers The internal command structure buffers are represented with a shadow copy internally in Xen since this buffer can contain physica

[PATCH 23/32] Bluetooth: Use mem_to_flex_dup() with struct hci_op_configure_data_path

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Lu

Re: [PATCH 01/32] netlink: Avoid memcpy() across flexible array boundary

2022-05-03 Thread Gustavo A. R. Silva
On Tue, May 03, 2022 at 06:44:10PM -0700, Kees Cook wrote: > In preparation for run-time memcpy() bounds checking, split the nlmsg > copying for error messages (which crosses a previous unspecified flexible > array boundary) in half. Avoids the future run-time warning: > > memcpy: detected field-s

[PATCH 32/32] esas2r: Use __mem_to_flex() with struct atto_ioctl

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. This requires adding the flexible array explici

[PATCH 25/32] Drivers: hv: utils: Use mem_to_flex_dup() with struct cn_msg

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc:

[PATCH 30/32] usb: gadget: f_fs: Use mem_to_flex_dup() with struct ffs_buffer

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc:

[PATCH 31/32] xenbus: Use mem_to_flex_dup() with struct read_buffer

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Boris Ostrovsky Cc: Juergen Gross Cc: St

[PATCH 26/32] ima: Use mem_to_flex_dup() with struct modsig

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Mimi Zohar Cc: Dmitry Kasatkin Cc: James

[PATCH 24/32] IB/hfi1: Use mem_to_flex_dup() for struct tid_rb_node

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Dennis Dalessandro Cc: Jason Gunthorpe C

[PATCH 13/32] mac80211: Use mem_to_flex_dup() with several structs

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying: struct probe_resp struct fils_discover

Re: [PATCH 03/32] flex_array: Add Kunit tests

2022-05-03 Thread David Gow
On Wed, May 4, 2022 at 9:47 AM Kees Cook wrote: > > Add tests for the new flexible array structure helpers. These can be run > with: > > make ARCH=um mrproper > ./tools/testing/kunit/kunit.py config Nit: it shouldn't be necessary to run kunit.py config separately: kunit.py run will configure

[PATCH 17/32] net/flow_offload: Use mem_to_flex_dup() with struct flow_action_cookie

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: "David S. Miller" Cc: Eric Dumazet Cc: J

[PATCH 19/32] afs: Use mem_to_flex_dup() with struct afs_acl

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: David Howells Cc: Marc Dionne Cc: linux-

[PATCH 05/32] brcmfmac: Use mem_to_flex_dup() with struct brcmf_fweh_queue_item

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Arend van Spriel Cc: Franky Lin Cc: Hant

[PATCH 15/32] 802/garp: Use mem_to_flex_dup() with struct garp_attr

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: "David S. Miller" Cc: Eric Dumazet Cc: J

[PATCH 08/32] iwlwifi: mvm: Use mem_to_flex_dup() with struct ieee80211_key_conf

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Luca Coelho Cc: Kalle Valo Cc: "David S.

Re: [PATCH 01/32] netlink: Avoid memcpy() across flexible array boundary

2022-05-03 Thread Kees Cook
On Tue, May 03, 2022 at 10:31:05PM -0500, Gustavo A. R. Silva wrote: > On Tue, May 03, 2022 at 06:44:10PM -0700, Kees Cook wrote: > [...] > > diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c > > index 1b5a9c2e1c29..09346aee1022 100644 > > --- a/net/netlink/af_netlink.c > > +++ b/net

[PATCH 29/32] xtensa: Use mem_to_flex_dup() with struct property

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Chris Zankel Cc: Max Filippov Cc: Rob He

[PATCH 21/32] soc: qcom: apr: Use mem_to_flex_dup() with struct apr_rx_buf

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Andy Gross Cc: Bjorn Andersson Cc: linux

[PATCH 22/32] atags_proc: Use mem_to_flex_dup() with struct buffer

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Russell King Cc: Christian Brauner Cc: A

[PATCH 16/32] 802/mrp: Use mem_to_flex_dup() with struct mrp_attr

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: "David S. Miller" Cc: Eric Dumazet Cc: J

[PATCH 18/32] firewire: Use __mem_to_flex_dup() with struct iso_interrupt_event

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Stefan Richter Cc: linux1394-de...@lists.

[PATCH 10/32] wcn36xx: Use mem_to_flex_dup() with struct wcn36xx_hal_ind_msg

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Loic Poulain Cc: Kalle Valo Cc: "David S

[PATCH 09/32] p54: Use mem_to_flex_dup() with struct p54_cal_database

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Christian Lamparter Cc: Kalle Valo Cc: "

[PATCH 27/32] KEYS: Use mem_to_flex_dup() with struct user_key_payload

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: David Howells Cc: Jarkko Sakkinen Cc: Ja

[PATCH 28/32] selinux: Use mem_to_flex_dup() with xfrm and sidtab

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying: struct xfrm_sec_ctx struct sidtab_str_

[PATCH 06/32] iwlwifi: calib: Prepare to use mem_to_flex_dup()

2022-05-03 Thread Kees Cook
In preparation for replacing an open-coded memcpy() of a dynamically side buffer, rearrange the structures to pass enough information into the calling function to examine the bounds of the struct. Rearrange the argument passing to use "cmd", rather than "hdr", since "res" expects to operate on the

[PATCH 12/32] cfg80211: Use mem_to_flex_dup() with struct cfg80211_bss_ies

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Johannes Berg Cc: "David S. Miller" Cc:

[PATCH 04/32] fortify: Add run-time WARN for cross-field memcpy()

2022-05-03 Thread Kees Cook
Enable run-time checking of dynamic memcpy() and memmove() lengths, issuing a WARN when a write would exceed the size of the target struct member, when built with CONFIG_FORTIFY_SOURCE=y. This would have caught all of the memcpy()-based buffer overflows from 2018 through 2020, specifically covering

[PATCH 03/32] flex_array: Add Kunit tests

2022-05-03 Thread Kees Cook
Add tests for the new flexible array structure helpers. These can be run with: make ARCH=um mrproper ./tools/testing/kunit/kunit.py config ./tools/testing/kunit/kunit.py run flex_array Cc: David Gow Cc: kunit-...@googlegroups.com Signed-off-by: Kees Cook --- lib/Kconfig.debug | 12

[PATCH 07/32] iwlwifi: calib: Use mem_to_flex_dup() with struct iwl_calib_result

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Avoids future false-positive warning when stri

[PATCH 20/32] ASoC: sigmadsp: Use mem_to_flex_dup() with struct sigmadsp_data

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Lars-Peter Clausen Cc: "Nuno Sá" Cc: Lia

[PATCH 01/32] netlink: Avoid memcpy() across flexible array boundary

2022-05-03 Thread Kees Cook
In preparation for run-time memcpy() bounds checking, split the nlmsg copying for error messages (which crosses a previous unspecified flexible array boundary) in half. Avoids the future run-time warning: memcpy: detected field-spanning write (size 32) of single field "&errmsg->msg" (size 16) Cr

[PATCH 14/32] af_unix: Use mem_to_flex_dup() with struct unix_address

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: "David S. Miller" Cc: Eric Dumazet Cc: J

[PATCH 11/32] nl80211: Use mem_to_flex_dup() with struct cfg80211_cqm_config

2022-05-03 Thread Kees Cook
As part of the work to perform bounds checking on all memcpy() uses, replace the open-coded a deserialization of bytes out of memory into a trailing flexible array by using a flex_array.h helper to perform the allocation, bounds checking, and copying. Cc: Johannes Berg Cc: "David S. Miller" Cc:

[PATCH 00/32] Introduce flexible array struct memcpy() helpers

2022-05-03 Thread Kees Cook
Hi, This is the next phase of memcpy() buffer bounds checking[1], which starts by adding a new set of helpers to address common code patterns that result in memcpy() usage that can't be easily verified by the compiler (i.e. dynamic bounds due to flexible arrays). The runtime WARN from memcpy has b

[PATCH 02/32] Introduce flexible array struct memcpy() helpers

2022-05-03 Thread Kees Cook
The compiler is not able to automatically perform bounds checking on structures that end in flexible arrays: __builtin_object_size() is compile-time only. Any possible run-time checks are currently short-circuited because there isn't an obvious common way to figure out the bounds of such a structur

Re: [PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-05-03 Thread Evan Green
On Wed, Apr 27, 2022 at 3:51 PM Guilherme G. Piccoli wrote: > > Currently the gsmi driver registers a panic notifier as well as > reboot and die notifiers. The callbacks registered are called in > atomic and very limited context - for instance, panic disables > preemption, local IRQs and all other

Re: [PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-05-03 Thread Evan Green
Hi Guilherme, On Tue, May 3, 2022 at 12:12 PM Guilherme G. Piccoli wrote: > > On 03/05/2022 15:03, Evan Green wrote: > > [...] > > gsmi_shutdown_reason() is a common function called in other scenarios > > as well, like reboot and thermal trip, where it may still make sense > > to wait to acquire

OPNSense running in domU has no network connectivity on 5.15.29+

2022-05-03 Thread Colton Reeder
Hello, I am running the FreeBSD-based router OS OPNSense in a domU. I recently upgraded my dom0 kernel from 5.15.26 to 5.15.32 and with the new kernel, OPNSense had no connectivity. I downloaded from kernel.org 5.15.26-32, built and installed each version and booted them consecutively until I foun

[ovmf test] 170077: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170077 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170077/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[ovmf test] 170073: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170073 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170073/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[ovmf test] 170069: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170069 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170069/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[linux-linus test] 170053: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170053 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/170053/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-examine-uefi 5 host-install broken REGR. vs. 170001 test-armhf-armhf-li

[ovmf test] 170066: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170066 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170066/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH V1 4/6] dt-bindings: Add xen,dev-domid property description for xen-grant DMA ops

2022-05-03 Thread Rob Herring
On Tue, May 03, 2022 at 08:09:32PM +0300, Oleksandr wrote: > > On 03.05.22 00:59, Rob Herring wrote: > > Hello Rob > > > > On Fri, Apr 22, 2022 at 07:51:01PM +0300, Oleksandr Tyshchenko wrote: > > > From: Oleksandr Tyshchenko > > > > > > Introduce Xen specific binding for the virtualized devi

Re: [PATCH V8 2/2] libxl: Introduce basic virtio-mmio support on Arm

2022-05-03 Thread Stefano Stabellini
On Tue, 3 May 2022, Oleksandr Tyshchenko wrote: > From: Julien Grall > > This patch introduces helpers to allocate Virtio MMIO params > (IRQ and memory region) and create specific device node in > the Guest device-tree with allocated params. In order to deal > with multiple Virtio devices, reserv

[ovmf test] 170062: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170062 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170062/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[qemu-mainline test] 170051: tolerable FAIL - PUSHED

2022-05-03 Thread osstest service owner
flight 170051 qemu-mainline real [real] flight 170057 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/170051/ http://logs.test-lab.xenproject.org/osstest/logs/170057/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-am

[ovmf test] 170059: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170059 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170059/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

[ovmf test] 170055: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170055 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170055/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-05-03 Thread Guilherme G. Piccoli
On 03/05/2022 15:03, Evan Green wrote: > [...] > gsmi_shutdown_reason() is a common function called in other scenarios > as well, like reboot and thermal trip, where it may still make sense > to wait to acquire a spinlock. Maybe we should add a parameter to > gsmi_shutdown_reason() so that you can

[ovmf test] 170054: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170054 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170054/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH 16/30] drivers/hv/vmbus, video/hyperv_fb: Untangle and refactor Hyper-V panic notifiers

2022-05-03 Thread Guilherme G. Piccoli
On 03/05/2022 15:13, Michael Kelley (LINUX) wrote: > [...] >> (a) We could forget about this change, and always do the clean-up here, >> not relying in machine_crash_shutdown(). >> Pro: really simple, behaves the same as it is doing currently. >> Con: less elegant/concise, doesn't allow arm64 custo

Re: [PATCH 3/3] xen/arm: Add sb instruction support

2022-05-03 Thread Julien Grall
Hi Bertrand, On 03/05/2022 10:38, Bertrand Marquis wrote: This patch is adding sb instruction support when it is supported by a CPU on arm64. To achieve this, the "sb" macro is moved to sub-arch macros.h so that we can use sb instruction when available through alternative on arm64 and keep the c

Re: [PATCH 2/3] xen/arm: Advertise workaround 1 if we apply 3

2022-05-03 Thread Julien Grall
Hi Bertrand, On 03/05/2022 10:38, Bertrand Marquis wrote: SMCC_WORKAROUND_3 is handling both Spectre v2 and spectre BHB. So when a guest is asking if we support workaround 1, tell yes if we apply workaround 3 on exception entry as it handles it. This will allow guests not supporting Spectre BHB

RE: [PATCH 16/30] drivers/hv/vmbus, video/hyperv_fb: Untangle and refactor Hyper-V panic notifiers

2022-05-03 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Friday, April 29, 2022 3:35 PM > > Hi Michael, first of all thanks for the great review, much appreciated. > Some comments inline below: > > On 29/04/2022 14:16, Michael Kelley (LINUX) wrote: > > [...] > >> hypervisor I/O completion), so we postpone that to run

Re: [PATCH 1/3] xen/arm: Sync sysregs and cpuinfo with Linux 5.18-rc3

2022-05-03 Thread Julien Grall
Hi Bertrand, On 03/05/2022 10:38, Bertrand Marquis wrote: Sync arm64 sysreg bit shift definitions with status of Linux kernel as of 5.18-rc3 version (linux commit b2d229d4ddb1). Sync ID registers sanitization with the status of Linux 5.18-rc3 and add sanitization of ISAR2 registers. Please outli

Re: [PATCH 24/30] panic: Refactor the panic path

2022-05-03 Thread Guilherme G. Piccoli
On 03/05/2022 14:31, Michael Kelley (LINUX) wrote: > [...] > > To me, it's a weak correlation between having a kmsg dumper, and > wanting or not wanting the info level output to come before kdump. > Hyper-V is one of only a few places that register a kmsg dumper, so most > Linux instances outside

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-03 Thread Guilherme G. Piccoli
On 03/05/2022 14:44, Michael Kelley (LINUX) wrote: > [...] >> >> Hi Michael, thanks for your feedback! I agree that your idea could work, >> but...there is one downside: imagine the kmsg_dump() approach is not set >> in some Hyper-V guest, then we would rely in the regular notification >> mechanism

RE: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-03 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Friday, April 29, 2022 11:04 AM > > On 29/04/2022 14:30, Michael Kelley (LINUX) wrote: > > From: Guilherme G. Piccoli Sent: Wednesday, April 27, > > 2022 > 3:49 PM > >> [...] > >> > >> @@ -2843,7 +2843,7 @@ static void __exit vmbus_exit(void) > >>if (ms_hyp

Re: [PATCH v2] xen/arm: gnttab: cast unused macro arguments to void

2022-05-03 Thread Julien Grall
Hi, On 28/04/2022 10:46, Michal Orzel wrote: Function unmap_common_complete (common/grant_table.c) defines and sets a variable ld that is later on passed to a macro: gnttab_host_mapping_get_page_type(). On Arm this macro does not make use of any arguments causing a compiler to warn about unused-

RE: [PATCH 24/30] panic: Refactor the panic path

2022-05-03 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Friday, April 29, 2022 1:38 PM > > On 29/04/2022 14:53, Michael Kelley (LINUX) wrote: > > From: Guilherme G. Piccoli Sent: Wednesday, April 27, > > 2022 > 3:49 PM > >> [...] > >> + panic_notifiers_level= > >> + [KNL] Set the panic notifiers ex

[PATCH V8 1/2] libxl: Add support for Virtio disk configuration

2022-05-03 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch adds basic support for configuring and assisting virtio-mmio based virtio-disk backend (emulator) which is intended to run out of Qemu and could be run in any domain. Although the Virtio block device is quite different from traditional Xen PV block device (vb

[PATCH V8 2/2] libxl: Introduce basic virtio-mmio support on Arm

2022-05-03 Thread Oleksandr Tyshchenko
From: Julien Grall This patch introduces helpers to allocate Virtio MMIO params (IRQ and memory region) and create specific device node in the Guest device-tree with allocated params. In order to deal with multiple Virtio devices, reserve corresponding ranges. For now, we reserve 1MB for memory r

[PATCH V8 0/2] Virtio support for toolstack on Arm (Was "IOREQ feature (+ virtio-mmio) on Arm")

2022-05-03 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Hello all. The purpose of this patch series is to add missing virtio-mmio bits to Xen toolstack on Arm. The Virtio support for toolstack [1] was postponed as the main target was to upstream IOREQ/DM support on Arm in the first place. Now, we already have IOREQ suppor

[ovmf test] 170052: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170052 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170052/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH V1 4/6] dt-bindings: Add xen,dev-domid property description for xen-grant DMA ops

2022-05-03 Thread Oleksandr
On 03.05.22 00:59, Rob Herring wrote: Hello Rob On Fri, Apr 22, 2022 at 07:51:01PM +0300, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Introduce Xen specific binding for the virtualized device (e.g. virtio) to be used by Xen grant DMA-mapping layer in the subsequent commit. Thi

Re: fix and cleanup discard_alignment handling

2022-05-03 Thread Jens Axboe
On Mon, 18 Apr 2022 06:53:03 +0200, Christoph Hellwig wrote: > the somewhat confusing name of the discard_alignment queue limit, that > really is an offset for the discard granularity mislead a lot of driver > authors to set it to an incorrect value. This series tries to fix up > all these cases.

Re: [PATCH v4 02/21] IOMMU: simplify unmap-on-error in iommu_map()

2022-05-03 Thread Roger Pau Monné
On Tue, May 03, 2022 at 04:37:29PM +0200, Jan Beulich wrote: > On 03.05.2022 12:25, Roger Pau Monné wrote: > > On Mon, Apr 25, 2022 at 10:32:10AM +0200, Jan Beulich wrote: > >> As of 68a8aa5d7264 ("iommu: make map and unmap take a page count, > >> similar to flush") there's no need anymore to have

Re: [PATCH v4 07/21] IOMMU/x86: support freeing of pagetables

2022-05-03 Thread Roger Pau Monné
On Mon, Apr 25, 2022 at 10:35:45AM +0200, Jan Beulich wrote: > For vendor specific code to support superpages we need to be able to > deal with a superpage mapping replacing an intermediate page table (or > hierarchy thereof). Consequently an iommu_alloc_pgtable() counterpart is > needed to free in

Re: [PATCH RFC] x86/lld: fix symbol map generation

2022-05-03 Thread Jan Beulich
On 03.05.2022 11:15, Roger Pau Monné wrote: > On Tue, May 03, 2022 at 10:17:44AM +0200, Jan Beulich wrote: >> On 02.05.2022 17:20, Roger Pau Monne wrote: >>> The symbol map generation (and thus the debug info attached to Xen) is >>> partially broken when using LLVM LD. That's due to LLD converting

[ovmf test] 170050: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170050 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170050/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH] arm/its: enable LPIs before mapping the collection table

2022-05-03 Thread Julien Grall
Hi Rahul, On 27/04/2022 17:14, Rahul Singh wrote: MAPC_LPI_OFF ITS command error can be reported to software if LPIs are not enabled before mapping the collection table using MAPC command. Enable the LPIs using GICR_CTLR.EnableLPIs before mapping the collection table. Signed-off-by: Rahul Sing

Re: [PATCH] arm/its: enable LPIs before mapping the collection table

2022-05-03 Thread Julien Grall
On 28/04/2022 15:11, Rahul Singh wrote: Hi Julien, Hi Rahul, On 28 Apr 2022, at 1:59 pm, Julien Grall wrote: On 28/04/2022 11:00, Rahul Singh wrote: Hi Julien, On 27 Apr 2022, at 6:59 pm, Julien Grall wrote: Hi Rahul, On 27/04/2022 17:14, Rahul Singh wrote: MAPC_LPI_OFF ITS comma

Re: [PATCH] xen/arm: smmuv1: remove iommu group when deassign a device

2022-05-03 Thread Julien Grall
On 29/04/2022 15:33, Rahul Singh wrote: Hi Julien, Hi Rahul, On 27 Apr 2022, at 6:42 pm, Julien Grall wrote: Hi, On 27/04/2022 17:15, Rahul Singh wrote: When a device is deassigned from the domain it is required to remove the iommu group. This read wrong to me. We should not need to

Re: x86/PV: (lack of) MTRR exposure

2022-05-03 Thread Juergen Gross
On 28.04.22 17:53, Jan Beulich wrote: Hello, in the course of analyzing the i915 driver causing boot to fail in Linux 5.18 I found that Linux, for all the years, has been running in PV mode as if PAT was (mostly) disabled. This is a result of them tying PAT initialization to MTRR initialization,

Re: [PATCH] arm/acpi: don't expose the ACPI IORT SMMUv3 entry to dom0

2022-05-03 Thread Julien Grall
On 29/04/2022 19:18, Rahul Singh wrote: Hi Julien, Hi Rahul, On 27 Apr 2022, at 7:26 pm, Julien Grall wrote: Hi Rahul, On 27/04/2022 17:12, Rahul Singh wrote: Xen should control the SMMUv3 devices therefore, don't expose the SMMUv3 devices to dom0. Deny iomem access to SMMUv3 address spac

[ovmf test] 170049: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170049 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170049/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH v4 05/21] IOMMU/x86: restrict IO-APIC mappings for PV Dom0

2022-05-03 Thread Jan Beulich
On 03.05.2022 15:00, Roger Pau Monné wrote: > On Mon, Apr 25, 2022 at 10:34:23AM +0200, Jan Beulich wrote: >> While already the case for PVH, there's no reason to treat PV >> differently here, though of course the addresses get taken from another >> source in this case. Except that, to match CPU si

Re: [PATCH v4 06/21] IOMMU/x86: perform PV Dom0 mappings in batches

2022-05-03 Thread Roger Pau Monné
On Mon, Apr 25, 2022 at 10:34:59AM +0200, Jan Beulich wrote: > For large page mappings to be easily usable (i.e. in particular without > un-shattering of smaller page mappings) and for mapping operations to > then also be more efficient, pass batches of Dom0 memory to iommu_map(). > In dom0_constru

Re: [PATCH v4 04/21] IOMMU: have iommu_{,un}map() split requests into largest possible chunks

2022-05-03 Thread Jan Beulich
On 03.05.2022 14:37, Roger Pau Monné wrote: > On Mon, Apr 25, 2022 at 10:33:32AM +0200, Jan Beulich wrote: >> --- a/xen/drivers/passthrough/iommu.c >> +++ b/xen/drivers/passthrough/iommu.c >> @@ -307,11 +338,10 @@ int iommu_map(struct domain *d, dfn_t df >> if ( !d->is_shutting_down && pri

Re: [PATCH v4 02/21] IOMMU: simplify unmap-on-error in iommu_map()

2022-05-03 Thread Jan Beulich
On 03.05.2022 12:25, Roger Pau Monné wrote: > On Mon, Apr 25, 2022 at 10:32:10AM +0200, Jan Beulich wrote: >> As of 68a8aa5d7264 ("iommu: make map and unmap take a page count, >> similar to flush") there's no need anymore to have a loop here. >> >> Suggested-by: Roger Pau Monné >> Signed-off-by: J

Re: [PATCH v4 01/21] AMD/IOMMU: correct potentially-UB shifts

2022-05-03 Thread Jan Beulich
On 03.05.2022 12:10, Roger Pau Monné wrote: > On Mon, Apr 25, 2022 at 10:30:33AM +0200, Jan Beulich wrote: >> Recent changes (likely 5fafa6cf529a ["AMD/IOMMU: have callers specify >> the target level for page table walks"]) have made Coverity notice a >> shift count in iommu_pde_from_dfn() which mi

[ovmf test] 170048: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170048 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170048/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH v2] xen/arm: p2m don't fall over on FEAT_LPA enabled hw

2022-05-03 Thread Luca Fancellu
> On 28 Apr 2022, at 11:34, Alex Bennée wrote: > > When we introduced FEAT_LPA to QEMU's -cpu max we discovered older > kernels had a bug where the physical address was copied directly from > ID_AA64MMFR0_EL1.PARange field. The early cpu_init code of Xen commits > the same error by blindly copy

[ovmf bisection] complete build-i386

2022-05-03 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job build-i386 testid xen-build Tree: ovmf https://github.com/tianocore/edk2.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: seabios git://xenbits.xen.org/osstest/seabios.git Tree: xen git

Re: [PATCH v6 2/2] flask: implement xsm_set_system_active

2022-05-03 Thread Luca Fancellu
> On 3 May 2022, at 12:17, Daniel P. Smith wrote: > > This commit implements full support for starting the idle domain privileged by > introducing a new flask label xenboot_t which the idle domain is labeled with > at creation. It then provides the implementation for the XSM hook > xsm_set_sys

[PATCH 0/2] x86/pat: fix querying available caching modes

2022-05-03 Thread Juergen Gross
Fix some issues with querying caching modes being available for memory mappings. This is a replacement for the patch of Jan sent recently: https://lists.xen.org/archives/html/xen-devel/2022-04/msg02392.html Juergen Gross (2): x86/pat: fix x86_has_pat_wp() x86/pat: add functions to query spec

[PATCH 2/2] x86/pat: add functions to query specific cache mode availability

2022-05-03 Thread Juergen Gross
Some drivers are using pat_enabled() in order to test availability of special caching modes (WC and UC-). This will lead to false negatives in case the system was booted e.g. with the "nopat" variant and the BIOS did setup the PAT MSR supporting the queried mode, or if the system is running as a Xe

[PATCH 1/2] x86/pat: fix x86_has_pat_wp()

2022-05-03 Thread Juergen Gross
x86_has_pat_wp() is using a wrong test, as it relies on the normal PAT configuration used by the kernel. In case the PAT MSR has been setup by another entity (e.g. BIOS or Xen hypervisor) it might return false even if the PAT configuration is allowing WP mappings. Fixes: 1f6f655e01ad ("x86/mm: Add

[ovmf test] 170045: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170045 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170045/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH v6 1/2] xsm: create idle domain privileged and demote after setup

2022-05-03 Thread Luca Fancellu
Hi Daniel, > diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c > index 0bf63ffa84..b93101191e 100644 > --- a/xen/xsm/flask/hooks.c > +++ b/xen/xsm/flask/hooks.c > @@ -186,6 +186,28 @@ static int cf_check flask_domain_alloc_security(struct > domain *d) > return 0; > } > > +static int

Re: [PATCH v4 05/21] IOMMU/x86: restrict IO-APIC mappings for PV Dom0

2022-05-03 Thread Roger Pau Monné
On Mon, Apr 25, 2022 at 10:34:23AM +0200, Jan Beulich wrote: > While already the case for PVH, there's no reason to treat PV > differently here, though of course the addresses get taken from another > source in this case. Except that, to match CPU side mappings, by default > we permit r/o ones. Thi

Re: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen

2022-05-03 Thread Juergen Gross
On 28.04.22 16:50, Jan Beulich wrote: The latest with commit bdd8b6c98239 ("drm/i915: replace X86_FEATURE_PAT with pat_enabled()") pat_enabled() returning false (because of PAT initialization being suppressed in the absence of MTRRs being announced to be available) has become a problem: The i915

[ovmf test] 170043: regressions - FAIL

2022-05-03 Thread osstest service owner
flight 170043 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170043/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 168254 build-amd64

Re: [PATCH v4 04/21] IOMMU: have iommu_{,un}map() split requests into largest possible chunks

2022-05-03 Thread Roger Pau Monné
On Mon, Apr 25, 2022 at 10:33:32AM +0200, Jan Beulich wrote: > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -307,11 +338,10 @@ int iommu_map(struct domain *d, dfn_t df > if ( !d->is_shutting_down && printk_ratelimit() ) > printk(XENLOG_ERR

Re: [PATCH v6 1/2] xsm: create idle domain privileged and demote after setup

2022-05-03 Thread Luca Fancellu
> On 3 May 2022, at 12:17, Daniel P. Smith wrote: > > There are new capabilities, dom0less and hyperlaunch, that introduce internal > hypervisor logic which needs to make resource allocation calls that are > protected by XSM access checks. This creates an issue as a subset of the > hypervisor

  1   2   >