From patchwork Tue Sep 12 00:37:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9948245 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E00EA603F3 for ; Tue, 12 Sep 2017 00:41:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D257128D31 for ; Tue, 12 Sep 2017 00:41:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C739D28D33; Tue, 12 Sep 2017 00:41:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 26FBB28D6D for ; Tue, 12 Sep 2017 00:41:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drZDC-0000gV-JK; Tue, 12 Sep 2017 00:37:58 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1drZDB-0000dj-Bg for xen-devel@lists.xenproject.org; Tue, 12 Sep 2017 00:37:57 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id 5E/BE-02224-56C27B95; Tue, 12 Sep 2017 00:37:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRWlGSWpSXmKPExsVyMfTOYd0Une2 RBuduyFh83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBlvtucX/OWvmNK0ibWBcSZfFyMXh5DATEaJ tgNPWUEcFoEPLBLfz/9k7GLk5JAQmMYqsXtLLIQdJ3Hz3UJWCDtN4uvRJ1A1NRLH7/8HiwsJK ElsmfyYEWLqQSaJHXNPs4EkhAX0JCZ/uw3WwCagL/F07TXmLkYOoGY3iU/XuEDqRQTaGSVmX/ kFNohZwFCi9e1RNpAaYYEEiVfnokDCLAKqEr+eXABr5RWwlNj5uQjiBHmJib3TwKZzClhJ/P4 xD+ocS4mOBVeYJjAKL2BkWMWoXpxaVJZapGukl1SUmZ5RkpuYmaNraGCsl5taXJyYnpqTmFSs l5yfu4kRGJr1DAyMOxhPNTsfYpTkYFIS5f0tvD1SiC8pP6UyI7E4I76oNCe1+BCjDAeHkgSvo TZQTrAoNT21Ii0zBxglMGkJDh4lEd4sLaA0b3FBYm5xZjpE6hSjJceFO5f+MHEc2HMLSHbcvP uHSYglLz8vVUqc9zdIgwBIQ0ZpHtw4WCRfYpSVEuZlZGBgEOIpSC3KzSxBlX/FKM7BqCTMqw5 yFU9mXgnc1ldABzEBHcRzaQvIQSWJCCmpBkaG68Hhz9h3FLu/0FhjZrdNMFjEaeLx6flRqcZO X0QXvTgtEyPYVXfD1/JwxzfZn275J/6fVo6TufBz5p0fX+Lj9PY/cGk5GSn1afmTRwozNfm4v LlkY/LW5EyJ9Ow1nMr7KkiiIKThs8Ii0XPHtZvSA6Zp/6rPrl6oofclhIHb+4mzwf3ITUosxR mJhlrMRcWJAJZBaQnfAgAA X-Env-Sender: ketuzsezr@gmail.com X-Msg-Ref: server-11.tower-31.messagelabs.com!1505176675!83413613!1 X-Originating-IP: [209.85.220.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51613 invoked from network); 12 Sep 2017 00:37:56 -0000 Received: from mail-qk0-f195.google.com (HELO mail-qk0-f195.google.com) (209.85.220.195) by server-11.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 12 Sep 2017 00:37:56 -0000 Received: by mail-qk0-f195.google.com with SMTP id g128so6397435qke.0 for ; Mon, 11 Sep 2017 17:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=WlL2pAk5ie6JcugbrCaR+z4Jalfjsx4GXk8cyAsalBk=; b=rx/yPzHDTsKpkMqRrFpd539sJ9sFIT2fM1TC55kSkImUMonf2EDvXDdtSDDPB4nzcS SQpnZ27fmS0TiQBeqCwCauGayu30WBV7ppGRGfasBlNxWsbqEEWaKav1KGUHQP+hwb7X F/oFZsKGZPUd0Z1qH9+4YzJJl/jtBZ1I4W0E9tXodYMifheCTxZoiRty4qoXVSpSfF+4 Jl9mB1mRKn7NzkvVnAowTIvVnIbcmMZkimoAI2I3IZqFIEpJO2cafL6pqz3v4vCI97rc MrOwZsRsXFAYEjUjAOjf9IexnE8BFlXyMOGJlbTJZV54EBT9H9cn6TRApOsUQCB5NGAd 4XsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=WlL2pAk5ie6JcugbrCaR+z4Jalfjsx4GXk8cyAsalBk=; b=a6IgAwfLslRbK+sbYoaWYUOxPAmmGli4mAR8cFGxsUKTD+NQbJyCS71FymuNKq7rya ou5tEaQNipFt4Tcvl+HxYAn9PbDiLze6MRbFG37FmrykBFN43CysvJj098M1lCK35sl3 3Sh3gKaJhNsC0nqtuP/HENpQI+0N7BrKcOcFYYRgGrWC7SqpGHYACE4Z1fo1LiA9z9tC FTzP1a3tvx2+Z5zuJDSQZms7g14Y7b7FwlgH9Lum4gdZiL2panbh5hj9nO6Ibky9aNA0 BhTiYEY7PDTbk/upCjOhlU0VsxFP4s264tGGvnQt9cjrnKccHhImFSFojdSdbAvlxs1b TLcw== X-Gm-Message-State: AHPjjUgpQMGnoC0BjjgwksYn+uQzCQOB+z/tQWkZSTIkuGhIQaf14rsS WaqWqxEOC4CIPGyH X-Google-Smtp-Source: AOwi7QA5EvCHRdiDlGAg0I5WfRyC90BSbQCyApKEp+MopdEyjr5SN0GhrMMrHXDPWyEOeQ0NUacc9Q== X-Received: by 10.55.130.130 with SMTP id e124mr16756975qkd.203.1505176675077; Mon, 11 Sep 2017 17:37:55 -0700 (PDT) Received: from localhost.localdomain (209-6-200-48.s4398.c3-0.smr-ubr2.sbo-smr.ma.cable.rcncustomer.com. [209.6.200.48]) by smtp.gmail.com with ESMTPSA id z75sm6771034qkb.71.2017.09.11.17.37.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2017 17:37:54 -0700 (PDT) From: Konrad Rzeszutek Wilk X-Google-Original-From: Konrad Rzeszutek Wilk To: xen-devel@lists.xenproject.org, ross.lagerwall@citrix.com, konrad.wilk@oracle.com, julien.grall@arm.com, sstabellini@kernel.org Date: Mon, 11 Sep 2017 20:37:17 -0400 Message-Id: <20170912003726.368-9-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170912003726.368-1-konrad.wilk@oracle.com> References: <20170912003726.368-1-konrad.wilk@oracle.com> Cc: andrew.cooper3@citrix.com, jbeulich@suse.com Subject: [Xen-devel] [PATCH v3 08/17] livepatch/tests: Make sure all .livepatch.funcs sections are read-only X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Instead of being writable (.data). This mimics the behavior of what livepatch-build-tools do. Other approaches such as 'struct const livepatch_funcs' still result in the WA section attributes. Signed-off-by: Konrad Rzeszutek Wilk --- xen/test/livepatch/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile index 9e73861732..6e5b9a3a75 100644 --- a/xen/test/livepatch/Makefile +++ b/xen/test/livepatch/Makefile @@ -54,6 +54,7 @@ xen_hello_world.o: config.h livepatch_depends.h $(LIVEPATCH): xen_hello_world_func.o xen_hello_world.o $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH) $^ $(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@ + $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@ # # This target is only accessible if CONFIG_LIVEPATCH is defined, which @@ -90,6 +91,7 @@ xen_bye_world.o: config.h hello_world_livepatch_depends.h $(LIVEPATCH_BYE): xen_bye_world_func.o xen_bye_world.o $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_BYE) $^ $(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@ + $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@ xen_replace_world.o: config.h livepatch_depends.h @@ -97,6 +99,7 @@ xen_replace_world.o: config.h livepatch_depends.h $(LIVEPATCH_REPLACE): xen_replace_world_func.o xen_replace_world.o $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_REPLACE) $^ $(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@ + $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@ xen_nop.o: config.h livepatch_depends.h @@ -104,6 +107,7 @@ xen_nop.o: config.h livepatch_depends.h $(LIVEPATCH_NOP): xen_nop.o $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_NOP) $^ $(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@ + $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@ .PHONY: livepatch livepatch: $(LIVEPATCH) $(LIVEPATCH_BYE) $(LIVEPATCH_REPLACE) $(LIVEPATCH_NOP)