[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

alternatives+livepatch testing


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, "Bjoern Doebel" <doebel@xxxxxxxxx>, Michael Kurth <mku@xxxxxxxxx>, "Pohlack, Martin" <mpohlack@xxxxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Thu, 10 Mar 2022 12:27:34 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3qZMNVGZCiP4mGgElYaJw6QWZWK6tEObc9fFLKUfK9s=; b=Qn1URTsC3LZUr6Lo3NI4j95JVaXUUzD+Dda2Tf3MeVmUW//eZJx7bxsulwEL6w8gmjbUU0iV0BFQLdm8bAlocrgJpmiNUHF7WFcvSrM/Ckes03BrjdopQGoUDGwkMCAJQSWzrcBDMOsyLnyj6HTu783Mhzz4SZ5qwGM/YyMYFU/fKQqmySo/S1/PrJha/y5zDy2efACnzwtVev9O4N3NIHp/fcol3d+9x8wF6OFWJ+a6isEEnBNljOwYNb6+NZeMhxxFkU5cQkZ2lkRjhxwd7J2vy82ibF9zAXMxrOkwbVs3yTXpfihhfY9udUtkFkCmRCu3+dPcOXlWvWB2fmwabw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LGInGvEVPtBZe5ACQGq3x+TheC5neOefg/xrD7FhDouBKnFuxwmh3JVuEN5F5Zcs1bmsQw9/aQvIWR/kVyZUeFwuLs2h+N4fNfmHH23M8TxIvPUzTP7qEthP38A7DIBRF1ybDB+RV74Ek6/qFV0/dfBIwyZCM42RfwnPPZH4SGtA9pPEpEPO2XA/lXtsopz/m3v2d6aEPvJt/uw3umPr5QLKzIQ9ZbxM+oyYw23HGWX/U2ZtO/ITnEoGfob6UWz/jScpBvN1U3oVBJQihY8bs3zI0sIoCHEqACneNH4AXqt4hwO15i/W86xdhjf1ftyAxClVMjBuoDBkKeAQQdz+7w==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Delivery-date: Thu, 10 Mar 2022 12:28:01 +0000
  • Ironport-data: A9a23:pR8q9KsdJWCb5TQ2jKqs6eDOeOfnVBVZMUV32f8akzHdYApBsoF/q tZmKWyEbP/bZGX9Ld93Pt+0/RsGv5CGzN81QAA+/yBkEygQ+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZhSAgk/nOHNIQMcacUsxLbVYMpBwJ1FQyw4bVvqYy2YLjW1jU4 YuryyHiEATNNwBcYzp8B52r8HuDjNyq0N/PlgVjDRzjlAa2e0g9VPrzF4noR5fLatA88tqBb /TC1NmEElbxpH/BPD8HfoHTKSXmSpaKVeSHZ+E/t6KK2nCurQRquko32WZ1he66RFxlkvgoo Oihu6BcRi8PYb/cwsocTSADDgZfBPNh2LjFIluG5Jn7I03uKxMAwt1rBUAye4YZ5vx2ESdF8 vlwxDIlN07ZwbjsmfTiF7cq1p9LwMrDZevzvllJyz3D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NhcYtKPTOW8ldASbsC0WKM+UyYJ8STzJ8+6U 4CSdkwNDSTNykDsS+S2mDReLxMoKjlzEnBv5aG854Hd3APV0gU1XYeNu/tKDwQeOApP+tdKL Osou584xawc3Ueacq2QlMfWfLYmtHNnJX6JTYbGh8O8mC1/H2VwY+/NyLd8gYVUjtJz7tn23 PCiRbF6qKqtOz+4gPA1lXU849dlLLau5p+7Y23+4gowwfX+0SVjbdaKvi/VfcO0aWSAWMR4Z rxStEbToNOAj3qDyeISFDWqnTdOX4VmgPfIBmj8CPeSIXCNUwH44Aqv/MnTjLJr0Unp91yy6 RNwiaQsIdWFwrJmGDn68HPTAwCrDv8nZMOq59ls5Vka/ppVFaRl/1swGpFVJMbWC7q4oEuF+ djSMna+fZNaFufK3TUpHNmztCgVmk6Wk7ueDlIhuWFlzxN2HxpxUoRw8IS2n8G6ZImUpFBo+ DJKL5hmr1CRtIfKah9GOACS82qDXGle2OFDEuCZVD8UK0XMXPErJD6pL0z+eGxYZQNiIA/nZ zQOWkowVLau3iefPFm8Kc7giwlGl/NLAgF4vsulKREhg==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYNHo4adxTGvvXZUC/Revy/sIkdQ==
  • Thread-topic: alternatives+livepatch testing

Hello,

The recent hiccup with CET-IBT, and discovery that livepatch-build-tools
have been broken for several releases, demonstrates that we do not have
remotely adequate testing in place.  We need to address, and ensure we
don't end up in the same position again.

Alternatives and Livepatching have a number of overlapping test
requirements, so how about the following plan:

1) Introduce a new $arch/scm-tests.c, with something akin to the
existing stub_selftest().  I'm tempted to move stub_selftest() out of
initcall and call it from init_done() (before we clobber .init.text)
because that gets shstk testing included.

Even without livepatching, we've got various requirements such as
endbr's only existing where expected, and getting clobbered when
suitably annotated, and altcalls turning into UD for a still-NULL pointer.

Items not yet upstream but on the radar include inlining of retpoline
thunks and SLS workarounds, which would also fit into this.

2) Provide (in xen.git) a patch to scm-tests.c which OSSTest/other can
use livepatch-build-tools on to generate a real livepatch, and a new
livepatching subop which can be invoked from xen-livepatch in userspace
that will run the same kind of consistency checks as 1) on the patched
content.

This lets us create specific constructs and confirm that they get
patched correctly, without having to specifically execute the result.  I
(think) we can do everything needed without reference to the livepatch
metadata, which simplifies things.

Providing a patch isn't totally ideal from a "maintaining xen" point of
view, but I think we can have a build-time test which confirms the patch
is still good, and it is definitely the right primitive to use for the
end-to-end testing.

Thoughts?

~Andrew

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.