Re: [PATCH v2 0/2] xen/gntdev: Fixes for leaks and VMA splitting

2022-10-08 Thread M. Vefa Bicakci
On 2022-10-07 01:17, Juergen Gross wrote: On 03.10.22 00:20, M. Vefa Bicakci wrote: Hi all, First of all, sorry for the delay! These patches continue the code review for the following patches:    https://lore.kernel.org/xen-devel/20220912040002.198191-1-m@runbox.com/t/#u The original

Re: [PATCH v2 1/2] xen/gntdev: Prevent leaking grants

2022-10-04 Thread M. Vefa Bicakci
On 2022-10-03 21:51, Demi Marie Obenour wrote: On Mon, Oct 03, 2022 at 09:31:25PM -0400, M. Vefa Bicakci wrote: On 2022-10-02 20:29, Demi Marie Obenour wrote: On Sun, Oct 02, 2022 at 06:20:05PM -0400, M. Vefa Bicakci wrote: Prior to this commit, if a grant mapping operation failed partially

Re: [PATCH v2 1/2] xen/gntdev: Prevent leaking grants

2022-10-03 Thread M. Vefa Bicakci
On 2022-10-02 20:29, Demi Marie Obenour wrote: On Sun, Oct 02, 2022 at 06:20:05PM -0400, M. Vefa Bicakci wrote: Prior to this commit, if a grant mapping operation failed partially, some of the entries in the map_ops array would be invalid, whereas all of the entries in the kmap_ops array would

[PATCH v2 1/2] xen/gntdev: Prevent leaking grants

2022-10-02 Thread M. Vefa Bicakci
nts values after the subtraction and warn the user. Link: https://github.com/QubesOS/qubes-issues/issues/7631 Fixes: dbe97cff7dd9 ("xen/gntdev: Avoid blocking in unmap_grant_pages()") Cc: sta...@vger.kernel.org Signed-off-by: M. Vefa Bicakci --- Changes since v1: - To determine whic

[PATCH v2 2/2] xen/gntdev: Accommodate VMA splitting

2022-10-02 Thread M. Vefa Bicakci
the mmap() over a pre-existing mapping. Link: https://github.com/QubesOS/qubes-issues/issues/7631 Fixes: ab31523c2fca ("xen/gntdev: allow usermode to map granted pages") Cc: sta...@vger.kernel.org Signed-off-by: M. Vefa Bicakci --- Changes since v1: - Amended the patch description to no

[PATCH v2 0/2] xen/gntdev: Fixes for leaks and VMA splitting

2022-10-02 Thread M. Vefa Bicakci
as expected without these patches too. - Finally, I have verified that the original "g.e. 0x1234 still pending" issue does not appear after rapidly resizing GUI windows in Qubes OS v4.1. Thank you, Vefa M. Vefa Bicakci (2): xen/gntdev: Prevent leaking grants xen/gntdev: Accom

Re: [PATCH 1/2] xen/gntdev: Prevent leaking grants

2022-09-22 Thread M. Vefa Bicakci
On 2022-09-19 05:52, Juergen Gross wrote: On 12.09.22 06:00, M. Vefa Bicakci wrote: Prior to this commit, if a grant mapping operation failed partially, some of the entries in the map_ops array would be invalid, whereas all of the entries in the kmap_ops array would be valid. This in turn would

[PATCH 2/2] xen/gntdev: Accommodate VMA splitting

2022-09-11 Thread M. Vefa Bicakci
s/7631 Fixes: ab31523c2fca ("xen/gntdev: allow usermode to map granted pages") Cc: sta...@vger.kernel.org Signed-off-by: M. Vefa Bicakci --- Note for reviewers: I am not 100% sure if the "Fixes" tag is correct. Based on a quick look at the history of the modified file, I am under t

[PATCH 1/2] xen/gntdev: Prevent leaking grants

2022-09-11 Thread M. Vefa Bicakci
tps://github.com/QubesOS/qubes-issues/issues/7631 Fixes: dbe97cff7dd9 ("xen/gntdev: Avoid blocking in unmap_grant_pages()") Cc: sta...@vger.kernel.org Signed-off-by: M. Vefa Bicakci --- drivers/xen/gntdev.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-)

[PATCH 0/2] xen/gntdev: Fixes for leaks and VMA splitting

2022-09-11 Thread M. Vefa Bicakci
, but I have also verified that they compile fine on top of the base commit mentioned at the bottom of this cover letter. The base commit in question is tagged as "next-20220909". Thank you, Vefa M. Vefa Bicakci (2): xen/gntdev: Prevent leaking grants xen/gntdev: Accommodate VMA

Re: [PATCH 1/1] x86/ept: Fix buggy XSA-321 backport

2021-02-16 Thread M. Vefa Bicakci
On 16/02/2021 07.48, M. Vefa Bicakci wrote: On 16/02/2021 04.20, Roger Pau Monné wrote: On Mon, Feb 15, 2021 at 06:46:19PM -0500, M. Vefa Bicakci wrote: [snipped by Vefa] >> In any case I think this is too much change, so I would go for a smaller fix like my proposal below. Can you

Re: [PATCH 1/1] x86/ept: Fix buggy XSA-321 backport

2021-02-16 Thread M. Vefa Bicakci
On 16/02/2021 04.20, Roger Pau Monné wrote: On Mon, Feb 15, 2021 at 06:46:19PM -0500, M. Vefa Bicakci wrote: This commit aims to fix commit a852040fe3ab ("x86/ept: flush cache when modifying PTEs and sharing page tables"). The aforementioned commit is for the stable-4.9 branch of Xe

[PATCH 0/1] Fix for a buggy XSA-321 resolution in Xen 4.9

2021-02-15 Thread M. Vefa Bicakci
advance, Vefa M. Vefa Bicakci (1): x86/ept: Fix buggy XSA-321 backport xen/arch/x86/mm/p2m-ept.c | 57 +++ 1 file changed, 28 insertions(+), 29 deletions(-) base-commit: 4597fc97b3b8870c39214e3aa4132ab711a40691 -- 2.29.2

[PATCH 1/1] x86/ept: Fix buggy XSA-321 backport

2021-02-15 Thread M. Vefa Bicakci
for the IOMMU. Upon debugging this issue further, it was noticed that Xen 4.12.0 had the same issue, but Xen 4.12.4 did not. Bisection led to the commit that fixed this issue, which was later discovered to not have been backported correctly to Xen 4.9. This patch has been tested with Xen 4.8 and Qu

Re: [PATCH] x86/S3: put data segment registers into known state upon resume

2020-07-29 Thread M. Vefa Bicakci
On 7/30/20 2:31 AM, Andrew Cooper wrote: On 30/07/2020 00:29, M. Vefa Bicakci wrote: On 7/23/20 7:00 PM, Andrew Cooper wrote: On 23/07/2020 16:19, Jan Beulich wrote: On 23.07.2020 16:40, Andrew Cooper wrote: On 20/07/2020 16:20, Jan Beulich wrote: wakeup_32 sets %ds and %es to BOOT_DS

Re: [PATCH] x86/S3: put data segment registers into known state upon resume

2020-07-29 Thread M. Vefa Bicakci
-by: M. Vefa Bicakci Signed-off-by: Jan Beulich --- a/xen/arch/x86/acpi/wakeup_prot.S +++ b/xen/arch/x86/acpi/wakeup_prot.S @@ -52,6 +52,16 @@ ENTRY(s3_resume) mov %eax, %ss mov saved_rsp(%rip), %rsp +/* + * Also put other segment registers into

Bug involving %fs register and suspend-to-RAM

2020-07-13 Thread M. Vefa Bicakci
Hello all, I encountered an unusual bug involving Xen's and Linux's handling of the %fs register after resuming from suspend-to-RAM (S2R) with Xen 4.8.y, and I am reaching out to the xen-devel mailing list, because the bug appears to affect Xen's master branch too. In summary, Xen uses/overwrite

[Xen-devel] [PATCH v3] xen/pv: Call get_cpu_address_sizes to set x86_virt/phys_bits

2018-07-25 Thread M. Vefa Bicakci
ned commit though, so the validation performed by phys_addr_valid fails, which causes __phys_addr to trigger a BUG, preventing boot-up. Signed-off-by: M. Vefa Bicakci Reviewed-by: Boris Ostrovsky Cc: "Kirill A. Shutemov" Cc: Andy Lutomirski Cc: Ingo Molnar Cc: "H. Peter Anvin&

[Xen-devel] [PATCH v2] xen/pv: Call get_cpu_address_sizes to set x86_virt/phys_bits

2018-07-24 Thread M. Vefa Bicakci
ned commit though, so the validation performed by phys_addr_valid fails, which causes __phys_addr to trigger a BUG, preventing boot-up. Signed-off-by: M. Vefa Bicakci Cc: "Kirill A. Shutemov" Cc: Andy Lutomirski Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc

Re: [Xen-devel] [PATCH 2/2] xen/pv: Call get_cpu_address_sizes to set x86_virt/phys_bits

2018-07-24 Thread M. Vefa Bicakci
On 07/23/2018 11:04 AM, Boris Ostrovsky wrote: On 07/22/2018 11:57 AM, M. Vefa Bicakci wrote: On 07/21/2018 07:17 PM, M. Vefa Bicakci wrote: On 07/21/2018 05:25 PM, Boris Ostrovsky wrote: On 07/21/2018 03:49 PM, M. Vefa Bicakci wrote: diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen

Re: [Xen-devel] [PATCH 2/2] xen/pv: Call get_cpu_address_sizes to set x86_virt/phys_bits

2018-07-22 Thread M. Vefa Bicakci
On 07/21/2018 07:17 PM, M. Vefa Bicakci wrote: On 07/21/2018 05:25 PM, Boris Ostrovsky wrote: On 07/21/2018 03:49 PM, M. Vefa Bicakci wrote: diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 439a94bf89ad..87afb000142a 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b

Re: [Xen-devel] [PATCH 1/2] x86/entry/64: Do not clear %rbx under Xen

2018-07-21 Thread M. Vefa Bicakci
On 07/21/2018 07:37 PM, M. Vefa Bicakci wrote: On 07/21/2018 07:30 PM, Andy Lutomirski wrote: On Sat, Jul 21, 2018 at 4:19 PM, M. Vefa Bicakci wrote: On 07/21/2018 05:45 PM, Andy Lutomirski wrote: On Sat, Jul 21, 2018 at 12:49 PM, M. Vefa Bicakci wrote: Commit 3ac6d8c787b8 ("x86/ent

Re: [Xen-devel] [PATCH 1/2] x86/entry/64: Do not clear %rbx under Xen

2018-07-21 Thread M. Vefa Bicakci
On 07/21/2018 07:30 PM, Andy Lutomirski wrote: On Sat, Jul 21, 2018 at 4:19 PM, M. Vefa Bicakci wrote: On 07/21/2018 05:45 PM, Andy Lutomirski wrote: On Sat, Jul 21, 2018 at 12:49 PM, M. Vefa Bicakci wrote: Commit 3ac6d8c787b8 ("x86/entry/64: Clear registers for exceptions/interrupt

Re: [Xen-devel] [PATCH 1/2] x86/entry/64: Do not clear %rbx under Xen

2018-07-21 Thread M. Vefa Bicakci
On 07/21/2018 05:19 PM, Boris Ostrovsky wrote: On 07/21/2018 03:49 PM, M. Vefa Bicakci wrote: diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index c7449f377a77..96e8ff34129e 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -1129,7 +1129,7 @@ ENTRY

Re: [Xen-devel] [PATCH 1/2] x86/entry/64: Do not clear %rbx under Xen

2018-07-21 Thread M. Vefa Bicakci
On 07/21/2018 05:45 PM, Andy Lutomirski wrote: On Sat, Jul 21, 2018 at 12:49 PM, M. Vefa Bicakci wrote: Commit 3ac6d8c787b8 ("x86/entry/64: Clear registers for exceptions/interrupts, to reduce speculation attack surface") unintendedly broke Xen PV virtual machines by clearing the %rb

Re: [Xen-devel] [PATCH 2/2] xen/pv: Call get_cpu_address_sizes to set x86_virt/phys_bits

2018-07-21 Thread M. Vefa Bicakci
On 07/21/2018 05:25 PM, Boris Ostrovsky wrote: On 07/21/2018 03:49 PM, M. Vefa Bicakci wrote: diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c index 439a94bf89ad..87afb000142a 100644 --- a/arch/x86/xen/enlighten_pv.c +++ b/arch/x86/xen/enlighten_pv.c @@ -1257,6 +1257,7

[Xen-devel] [PATCH 2/2] xen/pv: Call get_cpu_address_sizes to set x86_virt/phys_bits

2018-07-21 Thread M. Vefa Bicakci
unction named "get_cpu_address_sizes". One of the call sites related to Xen PV VMs was unfortunately missed in the aforementioned commit, and this prevents successful boot-up of kernel versions 4.17 and up in Xen PV VMs. Signed-off-by: M. Vefa Bicakci Cc: "Kirill A. Shutemov"

[Xen-devel] [PATCH 1/2] x86/entry/64: Do not clear %rbx under Xen

2018-07-21 Thread M. Vefa Bicakci
inspection of the changes introduced by the commit in question. To the best of my recollection, this issue is also reproducible in an Ubuntu 18.04 LTS dom0 instance with the version of the Xen hypervisor in Ubuntu's package repositories. Signed-off-by: M. Vefa Bicakci Cc: Dominik Brodowski