From patchwork Tue Nov 5 15:37:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 11228189 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 0273F13BD for ; Tue, 5 Nov 2019 15:39:34 +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 D22142087E for ; Tue, 5 Nov 2019 15:39:33 +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="mFyx0UmW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D22142087E 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 1iS0uK-0007wr-65; Tue, 05 Nov 2019 15:38:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iS0uJ-0007wj-GC for xen-devel@lists.xenproject.org; Tue, 05 Nov 2019 15:38:11 +0000 X-Inumbo-ID: 45bae2cc-ffe2-11e9-9631-bc764e2007e4 Received: from smtp-fw-6001.amazon.com (unknown [52.95.48.154]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 45bae2cc-ffe2-11e9-9631-bc764e2007e4; Tue, 05 Nov 2019 15:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1572968291; x=1604504291; h=from:to:cc:subject:date:message-id:mime-version; bh=1y9d+GtHSAqAKr13q6Cf6wlz7pVr0G7XBvr/lEBBgWk=; b=mFyx0UmWgLKZBUgFxBRpkMTfySxjM6hTYrmn2dwvlIRsGBqmnT/p479H BszQv1OnZbpBdeoF8alUS9TlVhLrhiqf1vdFgCmZMCpCSfEsE93HHLBV4 S0HnZylbKytD4G+VhXWrDoyRJW/DzUkbWZFhahp+6/jRZCl+3ACSvHvxV Y=; IronPort-SDR: rTwVj1LjrV8gLKciSyLQdKRhiT2I1MNw10RG7KpgwGKLg5XAACCyE63u1eGxV6CclrIfLU9SAZ UWoht9+jySUw== X-IronPort-AV: E=Sophos;i="5.68,271,1569283200"; d="scan'208";a="2774113" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-f273de60.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 05 Nov 2019 15:38:10 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1d-f273de60.us-east-1.amazon.com (Postfix) with ESMTPS id 4084AA2AFA; Tue, 5 Nov 2019 15:38:09 +0000 (UTC) Received: from EX13D05EUB002.ant.amazon.com (10.43.166.45) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 5 Nov 2019 15:38:07 +0000 Received: from EX13MTAUEE001.ant.amazon.com (10.43.62.200) by EX13D05EUB002.ant.amazon.com (10.43.166.45) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 5 Nov 2019 15:38:06 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.62.226) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 5 Nov 2019 15:38:05 +0000 From: Pawel Wieczorkiewicz To: Date: Tue, 5 Nov 2019 15:37:44 +0000 Message-ID: <20191105153745.74257-1-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH] create-diff-object: do not strip STN_UNDEF symbols from *.fixup 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: Pawel Wieczorkiewicz , wipawel@amazon.com, Ross Lagerwall , mpohlack@amazon.com, Konrad Rzeszutek Wilk Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The rela groups in the *.fixup sections vary in size. That makes it more complex to handle in the livepatch_strip_undefined_elements(). It is also unnecessary as the .fixup sections are unlikely to have any STN_UNDEF symbols anyway. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Ross Lagerwall --- create-diff-object.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/create-diff-object.c b/create-diff-object.c index 2f0e162..abf3cc7 100644 --- a/create-diff-object.c +++ b/create-diff-object.c @@ -2081,6 +2081,13 @@ static void livepatch_strip_undefined_elements(struct kpatch_elf *kelf) if (!is_rela_section(sec)) continue; + /* The rela groups in the .fixup sections vary in size. + * Ignore them as they are unlikely to have any STN_UNDEF + * symbols anyway. + */ + if (strstr(sec->name, ".fixup")) + continue; + /* only known, fixed-size entries can be stripped */ entry_size = get_section_entry_size(sec->base, kelf); if (entry_size == 0)