From patchwork Mon Sep 16 11:30:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 11146853 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6687F14ED for ; Mon, 16 Sep 2019 11:32:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 433EE206A4 for ; Mon, 16 Sep 2019 11:32:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.de header.i=@amazon.de header.b="FhYo1F7T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 433EE206A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i9pDz-0002wx-6c; Mon, 16 Sep 2019 11:31:19 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i9pDw-0002wd-PX for xen-devel@lists.xenproject.org; Mon, 16 Sep 2019 11:31:16 +0000 X-Inumbo-ID: 7ed36302-d875-11e9-95e0-12813bfff9fa Received: from smtp-fw-6002.amazon.com (unknown [52.95.49.90]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 7ed36302-d875-11e9-95e0-12813bfff9fa; Mon, 16 Sep 2019 11:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1568633475; x=1600169475; h=from:to:cc:subject:date:message-id:mime-version; bh=BJ3llmNExx4LGrtqBAjidOvKBIgGwrzONaJDbG/QghM=; b=FhYo1F7TMBNjqPY7AeRCRWpxF/ypVUzS+WMkPWbJkwJLIPC33kdzFkNv twv3YzYSEF4BS1V8NGZTUC1j/+wRDkFqBpLiRME4H33+GSeraWq1WsbDJ 6wTtcwsgjiKct8CohX7CCaGJl7gEDvsTE9MR8Y4qYJpTD5jygwswhEooI Y=; X-IronPort-AV: E=Sophos;i="5.64,512,1559520000"; d="scan'208";a="421366255" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1e-a70de69e.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 16 Sep 2019 11:31:15 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-a70de69e.us-east-1.amazon.com (Postfix) with ESMTPS id CBFB6A06F2; Mon, 16 Sep 2019 11:31:12 +0000 (UTC) Received: from EX13D05EUC004.ant.amazon.com (10.43.164.38) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 16 Sep 2019 11:31:12 +0000 Received: from EX13MTAUWC001.ant.amazon.com (10.43.162.135) by EX13D05EUC004.ant.amazon.com (10.43.164.38) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 16 Sep 2019 11:31:10 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.162.232) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 16 Sep 2019 11:31:07 +0000 From: Pawel Wieczorkiewicz To: , Date: Mon, 16 Sep 2019 11:30:49 +0000 Message-ID: <20190916113056.16592-1-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH v2 0/7] livepatch-build-tools: new features and fixes X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: wipawel@amazon.com, Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , mpohlack@amazon.com, Tim Deegan , Pawel Wieczorkiewicz , Julien Grall , Jan Beulich Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This series introduces new features to the livepatch functionality as briefly discussed during Xen Developer Summit 2019: [a] and [b]. It also provides a few fixes and some small improvements. IMPROVEMENTS: 1. Strip redundant or transient symbols from resulting object files: [6], [7] This change limits the size of resulting modules by dropping unneeded bits. FEATURES: For details see cover letter of xen series: [c] 1. independent modules (patches: [1]) 2. pre- and post- apply|revert actions hooks (patches: [2]) 3. apply|revert actions replacement hooks (patches: [3], [4]) 4. inline asm hotpatching expectations (patches: [5]) [a] https://wiki.xenproject.org/wiki/Design_Sessions_2019#LivePatch_improvements_and_features [b] https://lists.xenproject.org/archives/html/xen-devel/2019-07/msg00846.html [c] [PATCH 00/14] livepatch: new features and fixes Merged in v1: livepatch-gcc: Allow toolchain command with versions livepatch-gcc: Ignore built_in.o and prelink.o object files livepatch-build: Do not follow every symlink for patch file livepatch-build: Handle newly created object files common: Add is_standard_section() helper function common: Add is_referenced_section() helper function create-diff-object: Add is_special_section() helper function livepatch-build: detect special section group sizes create-diff-object: Add new entries to special sections array create-diff-object: Do not include all .rodata sections create-diff-object: Do not create empty .livepatch.funcs section create-diff-object: Extend patchability verification: STN_UNDEF create-diff-object: Strip all undefined entires of known size Pawel Wieczorkiewicz (7): [1] livepatch-build: Embed hypervisor build id into every hotpatch [2] create-diff-object: Handle extra pre-|post- hooks [3] create-diff-object: Handle optional apply|revert hooks [4] create-diff-object: Add support for applied/reverted marker [5] create-diff-object: Add support for expectations [6] livepatch-build: Strip transient or unneeded symbols [7] livepatch-build: Strip all metadata symbols from hotpatch modules common.h | 13 +++++++- create-diff-object.c | 82 ++++++++++++++++++++++++++++++++++++++-------- livepatch-build | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 171 insertions(+), 16 deletions(-)