Re: Problems starting Xen domU after latest stable update

2021-01-30 Thread Marek Marczykowski-Górecki
-stable-rc.git/log/?h=queue/5.10 -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

Re: Problems starting Xen domU after latest stable update

2021-01-28 Thread Marek Marczykowski-Górecki
and it's cherry-picked variants > > on linux-5.4.y and linux-5.10.y. > > > You most likely need 5f46400f7a6a4fad635d5a79e2aa5a04a30ffea1. It hit Linus > tree a few hours ago. I can confirm this fixes the same issue for me (too?), thanks! Shouldn't this patch have Cc: stable? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc Description: PGP signature

[PATCH] Revert "xen: add helpers to allocate unpopulated memory"

2020-12-06 Thread Marek Marczykowski-Górecki
+ (for 5.9 it's easier to revert the original commit directly) Signed-off-by: Marek Marczykowski-Górecki --- drivers/gpu/drm/xen/xen_drm_front_gem.c | 9 +- drivers/xen/Kconfig | 10 -- drivers/xen/Makefile| 1 - drivers/xen/balloon.c |

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-20 Thread Marek Marczykowski-Górecki
ble. Yes, that makes sense. As discussed earlier, that probably means re-constructing SystemTable before giving it to dom0. We'd need to do that in PVH case anyway, to adjust addresses, right? Is there something like this in the Xen codebase already, or it needs to be written from scratch? -- Best Regards,

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
e a clearer view of what you are trying to > achieve IMO. Norbert, can you shed some light on this process? While those two runtime services seems relevant, I see also an update process involving simply dropping some file into ESP (/boot/efi). I'm not sure if some runtime services were involved. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? signature.asc Description: PGP signature

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
On Tue, Aug 18, 2020 at 02:47:10PM +0200, Roger Pau Monné wrote: > On Tue, Aug 18, 2020 at 02:01:35PM +0200, Marek Marczykowski-Górecki wrote: > > Do you mean PV dom0 should receive full EFI memory map? Jan already > > objected this as it would be a layering violation. > > do

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
On Mon, Aug 17, 2020 at 11:00:13AM +0200, Roger Pau Monné wrote: > On Sun, Aug 16, 2020 at 02:19:49AM +0200, Marek Marczykowski-Górecki wrote: > > In case of Xen PV dom0, Xen passes along info about system tables (see > > arch/x86/xen/efi.c), but not the memory map from EFI. >

Re: [PATCH] efi: discover ESRT table on Xen PV too

2020-08-18 Thread Marek Marczykowski-Górecki
d to be > reserved on a Xen boot? The OS may overwrite it otherwise. In case of Xen, it is Xen responsibility to do that. Otherwise even if dom0 would not use it, Xen could allocate that physical memory to another guest. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it m

[PATCH] efi: discover ESRT table on Xen PV too

2020-08-15 Thread Marek Marczykowski-Górecki
of EFI memory map, as it isn't Linux kernel responsible for it. Skip this part on Xen PV (let Xen do the right thing if it deems necessary) and use ESRT table normally. This is a requirement for using fwupd in PV dom0 to update UEFI using capsules. Signed-off-by: Marek Marczykowski-Górecki

Re: [PATCH] xen/events: avoid NULL pointer dereference in evtchn_from_irq()

2020-05-21 Thread Marek Marczykowski-Górecki
n't find the relevant discussion. Here is the original bug report: https://xen.markmail.org/thread/44apwkwzeme4uavo -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? signature.asc Description: PGP signature

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-30 Thread Marek Marczykowski-Górecki
On Tue, Jul 30, 2019 at 08:22:02PM +0530, Souptick Joarder wrote: > On Tue, Jul 30, 2019 at 7:52 PM Marek Marczykowski-Górecki > wrote: > > > > On Tue, Jul 30, 2019 at 10:05:42AM -0400, Boris Ostrovsky wrote: > > > On 7/30/19 2:03 AM, Souptick Joarder wrote: > >

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-30 Thread Marek Marczykowski-Górecki
On Tue, Jul 30, 2019 at 10:05:42AM -0400, Boris Ostrovsky wrote: > On 7/30/19 2:03 AM, Souptick Joarder wrote: > > On Mon, Jul 29, 2019 at 7:06 PM Marek Marczykowski-Górecki > > wrote: > >> On Mon, Jul 29, 2019 at 02:02:54PM +0530, Souptick Joarder wrote: > >>

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-29 Thread Marek Marczykowski-Górecki
On Mon, Jul 29, 2019 at 02:02:54PM +0530, Souptick Joarder wrote: > On Mon, Jul 29, 2019 at 1:35 PM Souptick Joarder wrote: > > > > On Sun, Jul 28, 2019 at 11:36 PM Marek Marczykowski-Górecki > > wrote: > > > > > > On Fri, Feb 15, 2019 at 08:18:31AM +0530,

Re: [Xen-devel] [PATCH v4 8/9] xen/gntdev.c: Convert to use vm_map_pages()

2019-07-28 Thread Marek Marczykowski-Górecki
vma, vma->vm_start + i*PAGE_SIZE, > - map->pages[i]); > - if (err) > - goto out_put_map; > - } > + err = vm_map_pages(vma, map->pages, map->count); > + if (

Re: [Xen-devel] [PATCH RFC 00/39] x86/KVM: Xen HVM guest support

2019-02-20 Thread Marek Marczykowski-Górecki
ugh abstraction to do that safely. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? signature.asc Description: PGP signature

Re: [PATCH 1/6] xen: Add RING_COPY_RESPONSE()

2018-04-30 Thread Marek Marczykowski-Górecki
> (I have not tried to compile this so it may well be wrong) It works, thanks :) I'll wait with v2 until I get feedback on other patches. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top

Re: [PATCH 1/6] xen: Add RING_COPY_RESPONSE()

2018-04-30 Thread Marek Marczykowski-Górecki
> (I have not tried to compile this so it may well be wrong) It works, thanks :) I'll wait with v2 until I get feedback on other patches. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top

[PATCH 0/6] Fix XSA-155-like bugs in frontend drivers

2018-04-30 Thread Marek Marczykowski-Górecki
Patches in original Xen Security Advisory 155 cared only about backend drivers while leaving frontend patches to be "developed and released (publicly) after the embargo date". This is said series. Marek Marczykowski-Górecki (6): xen: Add RING_COPY_RESPONSE() xen-netfront: copy re

[PATCH 0/6] Fix XSA-155-like bugs in frontend drivers

2018-04-30 Thread Marek Marczykowski-Górecki
Patches in original Xen Security Advisory 155 cared only about backend drivers while leaving frontend patches to be "developed and released (publicly) after the embargo date". This is said series. Marek Marczykowski-Górecki (6): xen: Add RING_COPY_RESPONSE() xen-netfront: copy re

[PATCH 2/6] xen-netfront: copy response out of shared buffer before accessing it

2018-04-30 Thread Marek Marczykowski-Górecki
Make local copy of the response, otherwise backend might modify it while frontend is already processing it - leading to time of check / time of use issue. This is complementary to XSA155. Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.

[PATCH 2/6] xen-netfront: copy response out of shared buffer before accessing it

2018-04-30 Thread Marek Marczykowski-Górecki
Make local copy of the response, otherwise backend might modify it while frontend is already processing it - leading to time of check / time of use issue. This is complementary to XSA155. Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- drivers/net/xen-netfront.c | 51

[PATCH 3/6] xen-netfront: do not use data already exposed to backend

2018-04-30 Thread Marek Marczykowski-Górecki
Backend may freely modify anything on shared page, so use data which was supposed to be written there, instead of reading it back from the shared page. This is complementary to XSA155. CC: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.

[PATCH 3/6] xen-netfront: do not use data already exposed to backend

2018-04-30 Thread Marek Marczykowski-Górecki
Backend may freely modify anything on shared page, so use data which was supposed to be written there, instead of reading it back from the shared page. This is complementary to XSA155. CC: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- drivers/net/xen-netfront.c | 9

[PATCH 5/6] xen-blkfront: make local copy of response before using it

2018-04-30 Thread Marek Marczykowski-Górecki
Data on the shared page can be changed at any time by the backend. Make a local copy, which is no longer controlled by the backend. And only then access it. This is complementary to XSA155. CC: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.

[PATCH 5/6] xen-blkfront: make local copy of response before using it

2018-04-30 Thread Marek Marczykowski-Górecki
Data on the shared page can be changed at any time by the backend. Make a local copy, which is no longer controlled by the backend. And only then access it. This is complementary to XSA155. CC: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- drivers/block/xen-blkfront.c

[PATCH 6/6] xen-blkfront: prepare request locally, only then put it on the shared ring

2018-04-30 Thread Marek Marczykowski-Górecki
off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- drivers/block/xen-blkfront.c | 76 + 1 file changed, 44 insertions(+), 32 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 3926811..b100b

[PATCH 6/6] xen-blkfront: prepare request locally, only then put it on the shared ring

2018-04-30 Thread Marek Marczykowski-Górecki
off-by: Marek Marczykowski-Górecki --- drivers/block/xen-blkfront.c | 76 + 1 file changed, 44 insertions(+), 32 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 3926811..b100b55 100644 --- a/drivers/block/xen-blkfront.c ++

[PATCH 1/6] xen: Add RING_COPY_RESPONSE()

2018-04-30 Thread Marek Marczykowski-Górecki
...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- include/xen/interface/io/ring.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h index 3f40501..03702f6

[PATCH 1/6] xen: Add RING_COPY_RESPONSE()

2018-04-30 Thread Marek Marczykowski-Górecki
...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- include/xen/interface/io/ring.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h index 3f40501..03702f6 100644 --- a/include/xen/interface/io/ring.h

[PATCH 4/6] xen-netfront: add range check for Tx response id

2018-04-30 Thread Marek Marczykowski-Górecki
Tx response ID is fetched from shared page, so make sure it is sane before using it as an array index. CC: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- drivers/net/xen-netfront.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d

[PATCH 4/6] xen-netfront: add range check for Tx response id

2018-04-30 Thread Marek Marczykowski-Górecki
Tx response ID is fetched from shared page, so make sure it is sane before using it as an array index. CC: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- drivers/net/xen-netfront.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/xen-netfront.c b/drivers/net

Re: [Xen-devel] [PATCH] x86/xen: allow userspace access during hypercalls

2017-06-26 Thread 'Marek Marczykowski-Górecki'
On Mon, Jun 26, 2017 at 01:09:58PM +, Paul Durrant wrote: > > -Original Message- > > From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of > > Marek Marczykowski-Górecki > > Sent: 26 June 2017 13:45 > > To: Juergen Groß <jgr..

Re: [Xen-devel] [PATCH] x86/xen: allow userspace access during hypercalls

2017-06-26 Thread 'Marek Marczykowski-Górecki'
On Mon, Jun 26, 2017 at 01:09:58PM +, Paul Durrant wrote: > > -Original Message- > > From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of > > Marek Marczykowski-Górecki > > Sent: 26 June 2017 13:45 > > To: Juergen Groß > > Cc: An

[PATCH v2] x86/xen: allow userspace access during hypercalls

2017-06-26 Thread Marek Marczykowski-Górecki
driver carefully verify buffer addresses. Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- arch/x86/include/asm/xen/hypercall.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Changes since v1: - add HYPERVISOR_dm_op diff

[PATCH v2] x86/xen: allow userspace access during hypercalls

2017-06-26 Thread Marek Marczykowski-Górecki
driver carefully verify buffer addresses. Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki --- arch/x86/include/asm/xen/hypercall.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Changes since v1: - add HYPERVISOR_dm_op diff --git a/arch/x86/include/asm/xen

Re: [PATCH] x86/xen: allow userspace access during hypercalls

2017-06-26 Thread Marek Marczykowski-Górecki
On Mon, Jun 26, 2017 at 02:05:48PM +0200, Juergen Groß wrote: > On 06/23/2017 02:47 PM, Marek Marczykowski-Górecki wrote: > > Userspace application can do a hypercall through /dev/xen/privcmd, and > > some for some hypercalls argument is a pointers to user-provided > >

Re: [PATCH] x86/xen: allow userspace access during hypercalls

2017-06-26 Thread Marek Marczykowski-Górecki
On Mon, Jun 26, 2017 at 02:05:48PM +0200, Juergen Groß wrote: > On 06/23/2017 02:47 PM, Marek Marczykowski-Górecki wrote: > > Userspace application can do a hypercall through /dev/xen/privcmd, and > > some for some hypercalls argument is a pointers to user-provided > >

[PATCH] x86/xen: allow userspace access during hypercalls

2017-06-23 Thread Marek Marczykowski-Górecki
Userspace application can do a hypercall through /dev/xen/privcmd, and some for some hypercalls argument is a pointers to user-provided structure. When SMAP is supported and enabled, hypervisor can't access. So, lets allow it. Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki

[PATCH] x86/xen: allow userspace access during hypercalls

2017-06-23 Thread Marek Marczykowski-Górecki
Userspace application can do a hypercall through /dev/xen/privcmd, and some for some hypercalls argument is a pointers to user-provided structure. When SMAP is supported and enabled, hypervisor can't access. So, lets allow it. Cc: sta...@vger.kernel.org Signed-off-by: Marek Marczykowski-Górecki

Re: [PATCH 3.12 49/82] xen/gntdevt: Fix race condition in gntdev_release()

2015-08-25 Thread Marek Marczykowski-Górecki
On Tue, Aug 25, 2015 at 03:18:17PM +0200, Jiri Slaby wrote: > On 08/25/2015, 01:52 PM, Marek Marczykowski-Górecki wrote: > >>> --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ > >>> -529,12 +529,14 @@ static int gntdev_release(struct inode >

Re: [PATCH 3.12 49/82] xen/gntdevt: Fix race condition in gntdev_release()

2015-08-25 Thread Marek Marczykowski-Górecki
On Tue, Aug 25, 2015 at 12:35:59PM +0100, Luis Henriques wrote: > [ Adding Greg has he seems to have this patch queued for 3.10 and 3.14 ] > > On Mon, Aug 24, 2015 at 11:09:09AM +0200, Jiri Slaby wrote: > > From: Marek Marczykowski-Górecki > > > > 3.12-stable revie

Re: [PATCH 3.12 49/82] xen/gntdevt: Fix race condition in gntdev_release()

2015-08-25 Thread Marek Marczykowski-Górecki
On Tue, Aug 25, 2015 at 03:18:17PM +0200, Jiri Slaby wrote: On 08/25/2015, 01:52 PM, Marek Marczykowski-Górecki wrote: --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c @@ -529,12 +529,14 @@ static int gntdev_release(struct inode *inode, struct file *flip) pr_debug(priv %p\n, priv

Re: [PATCH 3.12 49/82] xen/gntdevt: Fix race condition in gntdev_release()

2015-08-25 Thread Marek Marczykowski-Górecki
On Tue, Aug 25, 2015 at 12:35:59PM +0100, Luis Henriques wrote: [ Adding Greg has he seems to have this patch queued for 3.10 and 3.14 ] On Mon, Aug 24, 2015 at 11:09:09AM +0200, Jiri Slaby wrote: From: Marek Marczykowski-Górecki marma...@invisiblethingslab.com 3.12-stable review patch

Re: [PATCH] [RFC] Fix deadlock on regular nonseekable files

2015-03-20 Thread Marek Marczykowski-Górecki
that user-visible behaviour changes need to be dealt with; it's > the nature of your fix I've a problem with. Maybe its better to change the file type? Character device? Pipe? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? pgpPdG4PzUYiU.pgp Description: PGP signature

Re: [PATCH] [RFC] Fix deadlock on regular nonseekable files

2015-03-20 Thread Marek Marczykowski-Górecki
to tell what's really going on there in that regression. I agree that user-visible behaviour changes need to be dealt with; it's the nature of your fix I've a problem with. Maybe its better to change the file type? Character device? Pipe? -- Best Regards, Marek Marczykowski-Górecki Invisible Things