Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-08 Thread Daniel P . Berrangé
On Thu, Sep 08, 2022 at 02:28:29PM +0200, Ard Biesheuvel wrote: > On Thu, 8 Sept 2022 at 13:30, Laszlo Ersek wrote: > > > > On 09/06/22 13:33, Daniel P. Berrangé wrote: > > > On Tue, Sep 06, 2022 at 01:14:50PM +0200, Ard Biesheuvel wrote: > > >> (cc Laszlo) > > >> > > >> On Tue, 6 Sept 2022 at 12:

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-08 Thread Ard Biesheuvel
On Thu, 8 Sept 2022 at 13:30, Laszlo Ersek wrote: > > On 09/06/22 13:33, Daniel P. Berrangé wrote: > > On Tue, Sep 06, 2022 at 01:14:50PM +0200, Ard Biesheuvel wrote: > >> (cc Laszlo) > >> > >> On Tue, 6 Sept 2022 at 12:45, Michael S. Tsirkin wrote: > >>> > >>> On Tue, Sep 06, 2022 at 12:43:55PM

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-08 Thread Laszlo Ersek
On 09/06/22 13:33, Daniel P. Berrangé wrote: > On Tue, Sep 06, 2022 at 01:14:50PM +0200, Ard Biesheuvel wrote: >> (cc Laszlo) >> >> On Tue, 6 Sept 2022 at 12:45, Michael S. Tsirkin wrote: >>> >>> On Tue, Sep 06, 2022 at 12:43:55PM +0200, Jason A. Donenfeld wrote: On Tue, Sep 6, 2022 at 12:40

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Michael S. Tsirkin
On Tue, Sep 06, 2022 at 12:43:55PM +0200, Jason A. Donenfeld wrote: > On Tue, Sep 6, 2022 at 12:40 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 06, 2022 at 12:36:56PM +0200, Jason A. Donenfeld wrote: > > > It's only safe to modify the setup_data pointer on newer kernels where > > > the EFI stu

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Daniel P . Berrangé
On Tue, Sep 06, 2022 at 01:14:50PM +0200, Ard Biesheuvel wrote: > (cc Laszlo) > > On Tue, 6 Sept 2022 at 12:45, Michael S. Tsirkin wrote: > > > > On Tue, Sep 06, 2022 at 12:43:55PM +0200, Jason A. Donenfeld wrote: > > > On Tue, Sep 6, 2022 at 12:40 PM Michael S. Tsirkin > > > wrote: > > > > > >

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Jason A. Donenfeld
On Tue, Sep 06, 2022 at 12:46:24PM +0200, Gerd Hoffmann wrote: > On Tue, Sep 06, 2022 at 12:36:56PM +0200, Jason A. Donenfeld wrote: > > It's only safe to modify the setup_data pointer on newer kernels where > > the EFI stub loader will ignore it. So condition setting that offset on > > the newer b

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Michael S. Tsirkin
On Tue, Sep 06, 2022 at 12:36:56PM +0200, Jason A. Donenfeld wrote: > It's only safe to modify the setup_data pointer on newer kernels where > the EFI stub loader will ignore it. So condition setting that offset on > the newer boot protocol version. While we're at it, gate this on SEV too. > This d

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Jason A. Donenfeld
On Tue, Sep 6, 2022 at 12:40 PM Michael S. Tsirkin wrote: > > On Tue, Sep 06, 2022 at 12:36:56PM +0200, Jason A. Donenfeld wrote: > > It's only safe to modify the setup_data pointer on newer kernels where > > the EFI stub loader will ignore it. So condition setting that offset on > > the newer boo

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Jason A. Donenfeld
On Tue, Sep 06, 2022 at 12:46:32PM +0200, Jason A. Donenfeld wrote: > On Tue, Sep 06, 2022 at 06:45:34AM -0400, Michael S. Tsirkin wrote: > > On Tue, Sep 06, 2022 at 12:43:55PM +0200, Jason A. Donenfeld wrote: > > > On Tue, Sep 6, 2022 at 12:40 PM Michael S. Tsirkin > > > wrote: > > > > > > > > O

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Gerd Hoffmann via
On Tue, Sep 06, 2022 at 12:36:56PM +0200, Jason A. Donenfeld wrote: > It's only safe to modify the setup_data pointer on newer kernels where > the EFI stub loader will ignore it. So condition setting that offset on > the newer boot protocol version. While we're at it, gate this on SEV too. > This d

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Jason A. Donenfeld
On Tue, Sep 06, 2022 at 06:45:34AM -0400, Michael S. Tsirkin wrote: > On Tue, Sep 06, 2022 at 12:43:55PM +0200, Jason A. Donenfeld wrote: > > On Tue, Sep 6, 2022 at 12:40 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 06, 2022 at 12:36:56PM +0200, Jason A. Donenfeld wrote: > > > > It's only

Re: [PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Ard Biesheuvel
(cc Laszlo) On Tue, 6 Sept 2022 at 12:45, Michael S. Tsirkin wrote: > > On Tue, Sep 06, 2022 at 12:43:55PM +0200, Jason A. Donenfeld wrote: > > On Tue, Sep 6, 2022 at 12:40 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Sep 06, 2022 at 12:36:56PM +0200, Jason A. Donenfeld wrote: > > > > It's o

[PATCH v2 1/2] x86: only modify setup_data if the boot protocol indicates safety

2022-09-06 Thread Jason A. Donenfeld
It's only safe to modify the setup_data pointer on newer kernels where the EFI stub loader will ignore it. So condition setting that offset on the newer boot protocol version. While we're at it, gate this on SEV too. This depends on the kernel commit linked below going upstream. Cc: Gerd Hoffmann