From patchwork Thu Jan 26 19:24:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 92545 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp346358qgi; Thu, 26 Jan 2017 11:26:19 -0800 (PST) X-Received: by 10.84.192.107 with SMTP id b98mr6418908pld.160.1485458779805; Thu, 26 Jan 2017 11:26:19 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id z2si219751pgb.66.2017.01.26.11.26.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jan 2017 11:26:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cWpgX-0005kl-BP; Thu, 26 Jan 2017 19:26:17 +0000 Received: from mail-wm0-f45.google.com ([74.125.82.45]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cWpgU-0005j6-5Q for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2017 19:26:15 +0000 Received: by mail-wm0-f45.google.com with SMTP id c206so101596783wme.0 for ; Thu, 26 Jan 2017 11:25:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5c/KHSlB5Go2Ve+oISNxe47HyCwC/xFD9fwvmt3MzuY=; b=ijmlKfp7NJcBaOu4qH31VCRJmVZNaXr1MqtHIpOZazWDoEGwc/6USEZVaokbVU4jjJ 7PGXD+X1LDgZhl2/JL2r3kPA185msjyH5rtvnrpGW00nLPFUoHx1yL//FVGRsCMQfaj8 Jh0UaEB+8477CsnWCR9om1nUSiQXqufoRMOn8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5c/KHSlB5Go2Ve+oISNxe47HyCwC/xFD9fwvmt3MzuY=; b=irouDOqrOGMgVVqjaKVNK8LVmfTgw6GyGnS4IC7WhsllM549MT49WIaYQtrM29bfwR os4yAVd4Dj4bqyZPqTdv/DZqh5gFQD/cbwpmysNzpYgPSisvHKFCdRwFo+Yj44idKW2Y bQ7epQVXT4xOjOXHLNuJzPDupy72koeYBwo9NCUjWSN5AZeLWpnsi4IoBZh1XBuxkD7P wcANP/TwJ82ACbKFxxoUQuio1bxntc1tLhQAtooTx5W4nYxAOSheU+5bU0Bka2bhp15X BmQ/UKZKkMEQ0zYck9j8MSXN8qhUAh0jlHlSSO+fFvzglUwiqNJSzhJ/PLuF3QcQlRv/ JLQQ== X-Gm-Message-State: AIkVDXKAvwziGUQyryilM7PsRBx363txIuCM1DdZooUHeDbPIeKrhmbVZV6tUyzwDp0ijxTV X-Received: by 10.28.132.9 with SMTP id g9mr71384wmd.28.1485458692322; Thu, 26 Jan 2017 11:24:52 -0800 (PST) Received: from localhost.localdomain ([160.163.215.165]) by smtp.gmail.com with ESMTPSA id y30sm4065392wrc.23.2017.01.26.11.24.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Jan 2017 11:24:51 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, matt@codeblueprint.co.uk, mark.rutland@arm.com, will.deacon@arm.com, catalin.marinas@arm.com Subject: [PATCH v3 0/2] efi/arm64: add vmlinux link to PE/COFF debug table Date: Thu, 26 Jan 2017 19:24:44 +0000 Message-Id: <1485458686-32544-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170126_112614_530216_A7F6CE25 X-CRM114-Status: GOOD ( 11.36 ) X-Spam-Score: -1.5 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.5 RCVD_IN_SORBS_SPAM RBL: SORBS: sender is a spam source [74.125.82.45 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.45 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.45 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Much like GNU debug links, PE/COFF binaries can carry the path on the build host to the binary containing the debugging symbols. Since the kernel binary is loaded by UEFI at an a priori unknown offset in the 1:1 mapping of physical memory, having this information is useful for the debugger automation to find the file and the offset, and load the symbols automatically. So if we have debugging symbols to begin with (CONFIG_DEBUG_INFO=y), add the absolute path to vmlinux to the PE/COFF debug table. v3: move the EFI debug table itself into the EFI header, which removes the need for externally visible symbols or changes to the linker script (#2) update commit log to explain that the debug support table is defined in the UEFI spec, and is thus not EDK2/PI specific v2: rebase onto v4.10-rc use strip rather than objcopy for first pass (#1) move debug table inside #ifdef CONFIG_EFI region in head.S (#2) Note that these patches can be merged independently, although they are both required to get the functionality. Ard Biesheuvel (2): efi: libstub: Preserve .debug sections after absolute relocation check efi: arm64: Add vmlinux debug link to the Image binary arch/arm64/kernel/Makefile | 4 ++ arch/arm64/kernel/head.S | 46 +++++++++++++++++++- drivers/firmware/efi/libstub/Makefile | 24 ++++++---- 3 files changed, 65 insertions(+), 9 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel