From patchwork Thu Nov 30 14:29:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Pau Monne X-Patchwork-Id: 13474467 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 738CEC46CA3 for ; Thu, 30 Nov 2023 14:31:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.644744.1006168 (Exim 4.92) (envelope-from ) id 1r8i4C-0004Zr-2X; Thu, 30 Nov 2023 14:31:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 644744.1006168; Thu, 30 Nov 2023 14:31:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r8i4B-0004Zk-Uw; Thu, 30 Nov 2023 14:30:59 +0000 Received: by outflank-mailman (input) for mailman id 644744; Thu, 30 Nov 2023 14:30:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r8i4A-0004Xw-8R for xen-devel@lists.xenproject.org; Thu, 30 Nov 2023 14:30:58 +0000 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [2a00:1450:4864:20::329]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 12efe29f-8f8d-11ee-9b0f-b553b5be7939; Thu, 30 Nov 2023 15:30:56 +0100 (CET) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40b397793aaso6086725e9.0 for ; Thu, 30 Nov 2023 06:30:56 -0800 (PST) Received: from localhost ([213.195.113.99]) by smtp.gmail.com with ESMTPSA id z3-20020a05600c0a0300b0040839fcb217sm2258963wmp.8.2023.11.30.06.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:30:55 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 12efe29f-8f8d-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1701354656; x=1701959456; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7YB37uIZeiul8LXYiUxNbAMSZ783gJlh2AC/oVkpE9k=; b=eSHayK3KiQWxyyKxv2dvOh+XutUyRSWh349zfMpFuNv/k/Us0ri8muyjdHoXi2jDIX MzjfCYwR45QwX2BVc7ZT6ApS+u/oR/Mdo1I4u492kJHTLOCcJGM+RcXzFNuqsl3TJUv5 Oyax1CTgXcU6bfpi/eyZh4SHOMHVmEP//mqAE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701354656; x=1701959456; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7YB37uIZeiul8LXYiUxNbAMSZ783gJlh2AC/oVkpE9k=; b=uaNlzkd35Q/V6wUxSjnN1Tevnfy0BOKa+1PMHRJWKCDCGRV16AAH4dX4WvoCWaiX0c 9ovcnpptH1CLYSDCAgOMVoaTv95SIulQrgz38dagSaVCrwFs9AH0sXhfGqUcPsNPsjxI 5qsICW5Ma9UAWOP5qtF/TlisOswlIAY0Rb27nfFOU/z5wlCiFQQgZJC5G3rlUWPn5SO4 j1xy5i8Vpr7TM53hPjl/xabJyfSnNklIFRToFR8Kf8lb9SFh8WiOojN89VPYHjTQLtta jiqZAE88rgoFRI9R4HCf0Gif82z8mpd5Fj8ejv0tS7niVtiqDpYNuKhX1LlETrwZzG9D GJNw== X-Gm-Message-State: AOJu0YzA4LzgC8EsoC7+jNS06ST/XN6ojVJvdGWf2RdiYV3oXzOLcdSq XkmprEmev98/2rSn173enxX5XHstzu7CrCzCeRI= X-Google-Smtp-Source: AGHT+IGk5wiVX8u7sDPjUBYqsnBCp9HjIvQBHrfkrueF3ZqUybxOG4Ktv99JpeK54r4EJg3kufojFQ== X-Received: by 2002:a05:600c:1d08:b0:40b:2a62:a2b6 with SMTP id l8-20020a05600c1d0800b0040b2a62a2b6mr18753285wms.1.1701354655932; Thu, 30 Nov 2023 06:30:55 -0800 (PST) From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Konrad Rzeszutek Wilk , Ross Lagerwall , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH 0/5] xen/livepatch: fixes for the pre-apply / post-revert hooks Date: Thu, 30 Nov 2023 15:29:39 +0100 Message-ID: <20231130142944.46322-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Hello, The follow series contain a misc of fixes mostly related to the usage of the pre-apply / post-revert hooks. The norevert test is also fixed to work as I think was expected. Finally both the no{apply,revert} tests are fixed to build properly, as the files where previously unhooked from the build system completely. I'm unsure how useful the apply and revert hooks really are, as without calling the internal apply/revert functions the state of the payload structure is quite likely inconsistent with the code expectations. Thanks, Roger. Roger Pau Monne (5): xen/livepatch: register livepatch regions when loaded xen/livepatch: search for symbols in all loaded payloads xen/livepatch: fix norevert test attempt to open-code revert xen/livepatch: fix norevert test hook setup typo xen/livepatch: properly build the noapply and norevert tests xen/common/livepatch.c | 95 +++++++++++-------- xen/common/virtual_region.c | 40 +++----- xen/include/xen/livepatch.h | 32 +------ xen/test/livepatch/Makefile | 4 +- .../livepatch/xen_action_hooks_norevert.c | 24 ++--- 5 files changed, 81 insertions(+), 114 deletions(-)