From patchwork Sun Sep 11 15:48:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9325463 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 A67CA607D3 for ; Sun, 11 Sep 2016 15:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F89228AA1 for ; Sun, 11 Sep 2016 15:51:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82F8F28B56; Sun, 11 Sep 2016 15:51:45 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY 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 BA7D128AA1 for ; Sun, 11 Sep 2016 15:51:44 +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 1bj70A-0001ij-Rd; Sun, 11 Sep 2016 15:49:02 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bj70A-0001iU-3d for xen-devel@lists.xenproject.org; Sun, 11 Sep 2016 15:49:02 +0000 Received: from [85.158.143.35] by server-6.bemta-6.messagelabs.com id 97/97-11175-DEC75D75; Sun, 11 Sep 2016 15:49:01 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRWlGSWpSXmKPExsUyZ7p8oO6bmqv hBjt/6lt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBkPtoUVXOKqmDP/K1MD4x+OLkYuDiGByUwS x7YuZ4Jw/jJKrJ79F8jhBHI2Mkq8PGULYU9glHj2oLKLkYODTcBE4s0qR5CwiECERO/LUywgN rNAmcTDxU9YQUqEBUokLnbqg4RZBFQl7s2+BzaRV8BVYtmxf+wgJRIC8hLPbteDhDkF3CQmPH nACrHIVaL1wH92EFtCwFii/e1FtgmMfAsYGVYxahSnFpWlFukaGeslFWWmZ5TkJmbm6BoamOn lphYXJ6an5iQmFesl5+duYgQGCAMQ7GD8Mz/wEKMkB5OSKO/ZnCvhQnxJ+SmVGYnFGfFFpTmp xYcYZTg4lCR4s4quhgsJFqWmp1akZeYAQxUmLcHBoyTC+wUkzVtckJhbnJkOkTrFqCglznsXJ CEAksgozYNrg8XHJUZZKWFeRqBDhHgKUotyM0tQ5V8xinMwKgnzvgaZwpOZVwI3/RXQYiagxU +3XgZZXJKIkJJqYBSacuy73qZlu0utk3d1+Mr+dVhz8NfadoX9n6pcil+dsvoqdnTv4sLdPxK Ul3h8j3b0yb7JOqnVp+Ypr1sKV/+zar6vPs1e9y489Wnf/j9wmYxkEP9Fju7yfRfFyh3cZeOc fibL5epn/bsm33SRfx7XWQ+eNXvE4hat0zN68lvr0qyMnpPJz5RYijMSDbWYi4oTAQe9p1iKA gAA X-Env-Sender: konrad.wilk@oracle.com X-Msg-Ref: server-14.tower-21.messagelabs.com!1473608939!32573856!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51408 invoked from network); 11 Sep 2016 15:49:00 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-14.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 11 Sep 2016 15:49:00 -0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8BFmpw5014213 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Sep 2016 15:48:51 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id u8BFmomk000422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Sep 2016 15:48:51 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u8BFmokg021360; Sun, 11 Sep 2016 15:48:50 GMT Received: from localhost.localdomain.com (/209.6.196.81) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 11 Sep 2016 08:48:50 -0700 From: Konrad Rzeszutek Wilk To: xen-devel@lists.xenproject.org, konrad@kernel.org, ross.lagerwall@citrix.com Date: Sun, 11 Sep 2016 11:48:29 -0400 Message-Id: <1473608912-5913-2-git-send-email-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1473608912-5913-1-git-send-email-konrad.wilk@oracle.com> References: <1473608912-5913-1-git-send-email-konrad.wilk@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Cc: andrew.cooper3@citrix.com, Jan Beulich , Konrad Rzeszutek Wilk Subject: [Xen-devel] [PATCH v5 1/4] livepatch/docs: Document .bss not being cleared, and .data potentially having changed values 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 . since the load time. In summary we clear the .bss only during upload time. Subsequent apply/revert/apply can change the .bss values - meaning that the .bss values are not guaranteed to be zero - in fact they can be anything! And the .data can also be in various states. Suggested-by: Ross Lagerwall Signed-off-by: Konrad Rzeszutek Wilk --- Cc: Andrew Cooper Cc: Jan Beulich v5: New submission --- docs/misc/livepatch.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/misc/livepatch.markdown b/docs/misc/livepatch.markdown index 89c1050..07be0af 100644 --- a/docs/misc/livepatch.markdown +++ b/docs/misc/livepatch.markdown @@ -875,6 +875,12 @@ section and the new function will reference the new string in the new This is implemented in the Xen Project hypervisor. +Note that the .bss section is only cleared when the ELF payload is uploaded. +Subsequent apply/revert/apply operation do no clear the .bss (or reset the +.data to what it was when loaded). Hence it is the responsibility of the +creator of the payload to reset these values to known good state if they +depend on them having certain values at apply/revert states. + ### Security Only the privileged domain should be allowed to do this operation.