Re: [PATCH v2 3/5] xen/x86: introduce self modifying code test

2023-12-01 Thread Stefano Stabellini
On Fri, 1 Dec 2023, Roger Pau Monné wrote: > > > @@ -1261,6 +1269,7 @@ struct xen_sysctl { > > > struct xen_sysctl_livepatch_op livepatch; > > > #if defined(__i386__) || defined(__x86_64__) > > > struct xen_sysctl_cpu_policycpu_policy; > > > +struct xen_sysct

Re: [PATCH v2 3/5] xen/x86: introduce self modifying code test

2023-12-01 Thread Roger Pau Monné
On Thu, Nov 30, 2023 at 06:02:55PM +0100, Jan Beulich wrote: > On 28.11.2023 11:03, Roger Pau Monne wrote: > > --- /dev/null > > +++ b/xen/arch/x86/test-smc.c > > @@ -0,0 +1,68 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > + > > +#include > > + > > +#include > > +#include > > +#include > >

Re: [PATCH v2 3/5] xen/x86: introduce self modifying code test

2023-12-01 Thread Roger Pau Monné
On Wed, Nov 29, 2023 at 06:58:38PM -0800, Stefano Stabellini wrote: > On Tue, 28 Nov 2023, Roger Pau Monne wrote: > > Introduce a helper to perform checks related to self modifying code, and > > start > > by creating a simple test to check that alternatives have been applied. > > > > Such test is

Re: [PATCH v2 3/5] xen/x86: introduce self modifying code test

2023-11-30 Thread Jan Beulich
On 28.11.2023 11:03, Roger Pau Monne wrote: > --- /dev/null > +++ b/xen/arch/x86/test-smc.c > @@ -0,0 +1,68 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > + > +#include > + > +#include > +#include > +#include > + > +static bool cf_check test_insn_replacement(void) > +{ > +#define EXPECTED_VALUE

Re: [PATCH v2 3/5] xen/x86: introduce self modifying code test

2023-11-29 Thread Stefano Stabellini
On Tue, 28 Nov 2023, Roger Pau Monne wrote: > Introduce a helper to perform checks related to self modifying code, and start > by creating a simple test to check that alternatives have been applied. > > Such test is hooked into the boot process and called just after alternatives > have been applie

[PATCH v2 3/5] xen/x86: introduce self modifying code test

2023-11-28 Thread Roger Pau Monne
Introduce a helper to perform checks related to self modifying code, and start by creating a simple test to check that alternatives have been applied. Such test is hooked into the boot process and called just after alternatives have been applied. In case of failure a message is printed, and the h