From patchwork Fri Nov 30 11:35:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152523 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3546833ljp; Fri, 30 Nov 2018 03:36:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/V0zbE1G4S5bmTQ6QOvjyM/YYzF75vAWUTDVEgeJuCT9fv+zH/Et+PO+893CylGVlq5O88u X-Received: by 2002:a62:30c3:: with SMTP id w186mr5281751pfw.39.1543577769901; Fri, 30 Nov 2018 03:36:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543577769; cv=none; d=google.com; s=arc-20160816; b=LgR1qbabgjqSJrNy8hMa43su+Cu/0S5lMmZRrkYyccRzD3TDHLQnF4onf4fgC7wspn RGcsXLkubvbs3vtf7PLJ0GTRNzyw/UZ0PNN9m6jGqHwON0sGWwaSNlf0koikg6H6eq1w 0ztEcK+5ptNFWKlpj5GhTdaUCyilT7nhXJdSCl9MzNfD1n3HA0mCA/0s7CWP5fC3R1ZW 7dZLSbRMuOJPgdkCeFBEJebCYlG0leBpCTb0aI395zcWXk4DJN2ltImeLd2t4BzmZDJN Wv74KF1y+ub+MmKttTrN9VDuE6YYPwop0+ZgE/eW8esfUJtb7WB65dKBoi6zsGclt/qS ckrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2DrRwlNhWmcexXHUFa6mLLJUB8elF/12TyOVEW08kM4=; b=AUXMLkdxQJBUUnydR9+rih7B+02sxWexoSIbUbvPVGbGgAQsX5b30vhrxuGoeqgDKg BtnX7B3weWUxLBLLuM1EQbz2U8jQTx/6kbHXVlM4KXuwbzC32WwZfjJFdkhF91WC3DaD i3/6VHqAWp05hh58VGjIZT8tvFmdNRnUCNCR6dg6nverAn6IRA6opOYid5Z5frIcDtCE Kewael3laN2WIqjaFU8U2uoQVN/ztS661k/WOf07kidPKr92l2gmp0/31xsgIFQpYBw6 H/Pv1s5pimXpePmJfs29RZ3Py/46S58ZC1BDwKQAvnGX5jNPPSVph7IWkkkvhzW1+sww YtnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TLoQF32h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k190si4520422pgd.64.2018.11.30.03.36.09; Fri, 30 Nov 2018 03:36:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TLoQF32h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726589AbeK3WpF (ORCPT + 32 others); Fri, 30 Nov 2018 17:45:05 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50232 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbeK3WpF (ORCPT ); Fri, 30 Nov 2018 17:45:05 -0500 Received: by mail-wm1-f67.google.com with SMTP id 125so5476656wmh.0 for ; Fri, 30 Nov 2018 03:36:04 -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:mime-version :content-transfer-encoding; bh=2DrRwlNhWmcexXHUFa6mLLJUB8elF/12TyOVEW08kM4=; b=TLoQF32hR6MENnF9NLW/wA6P7TTyThwtxte6UePfPsozjdaakL9CRsG0sdAY/uI9US zO1jbujBRtunInp3UY+EvWSj9kmBVPJFRWsVJZO/vqn4Y9SpAwCnE1ikFPE9I4wUkQ0L OaQlFDHJDwUEFetDyLz5oiVl2RDwuVrbZCu4M= 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:mime-version :content-transfer-encoding; bh=2DrRwlNhWmcexXHUFa6mLLJUB8elF/12TyOVEW08kM4=; b=UZ41mM7ZZJN/znBVyGml0YU7B0FsXDi4OV5igQFhlzwbkMI9r/3M6bUorDuxFqC/6J /AMprQLvhxyX3lO2DDKASh4/HN7I6d0k136R2JazQlBzMII1kb8Ql491mLPO1VrHj3I5 XXH2n3dzjlZjd9JZcuxnEncI4qloX8Wgrqy8Sawpoi8zLaF0BBZTsLk0mVj5sasm54yx NdkdYqA+ITzrx9oFg9qycrBngyJ92eImzjcyfC6EsbM2iwTnMFWvkelE33I6dxAYZpIA 5ixXIrPmzKqfZFaoffGJdGZwh6xSiKaznXHw/VejKOPt1E7ksgraTL1mgli0aby0jl0t oZFA== X-Gm-Message-State: AA+aEWaC/QZzD30Om9JzskEpw9c9pz8e7kWRhTyB7Q80kVzBPkscfAEv 5Q2vNwP/q9tYhmVaLz3Fcyvz5g== X-Received: by 2002:a1c:aa92:: with SMTP id t140mr5144570wme.36.1543577763727; Fri, 30 Nov 2018 03:36:03 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:f070:d240:312e:9f99]) by smtp.gmail.com with ESMTPSA id a12sm4390887wro.18.2018.11.30.03.36.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 03:36:02 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, will.deacon@arm.com, catalin.marinas@arm.com, Ard Biesheuvel , Nick Desaulniers Subject: [PATCH] arm64: drop linker script hack to hide __efistub_ symbols Date: Fri, 30 Nov 2018 12:35:58 +0100 Message-Id: <20181130113558.15198-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 1212f7a16af4 ("scripts/kallsyms: filter arm64's __efistub_ symbols") updated the kallsyms code to filter out symbols with the __efistub_ prefix explicitly, so we no longer require the hack in our linker script to emit them as absolute symbols. Cc: Nick Desaulniers Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/image.h | 46 +++++++++++++++------------------------ 1 file changed, 18 insertions(+), 28 deletions(-) -- 2.19.1 Tested-by: Nick Desaulniers diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h index a820ed07fb80..8da289dc843a 100644 --- a/arch/arm64/kernel/image.h +++ b/arch/arm64/kernel/image.h @@ -75,16 +75,6 @@ __efistub_stext_offset = stext - _text; -/* - * Prevent the symbol aliases below from being emitted into the kallsyms - * table, by forcing them to be absolute symbols (which are conveniently - * ignored by scripts/kallsyms) rather than section relative symbols. - * The distinction is only relevant for partial linking, and only for symbols - * that are defined within a section declaration (which is not the case for - * the definitions below) so the resulting values will be identical. - */ -#define KALLSYMS_HIDE(sym) ABSOLUTE(sym) - /* * The EFI stub has its own symbol namespace prefixed by __efistub_, to * isolate it from the kernel proper. The following symbols are legally @@ -94,28 +84,28 @@ __efistub_stext_offset = stext - _text; * linked at. The routines below are all implemented in assembler in a * position independent manner */ -__efistub_memcmp = KALLSYMS_HIDE(__pi_memcmp); -__efistub_memchr = KALLSYMS_HIDE(__pi_memchr); -__efistub_memcpy = KALLSYMS_HIDE(__pi_memcpy); -__efistub_memmove = KALLSYMS_HIDE(__pi_memmove); -__efistub_memset = KALLSYMS_HIDE(__pi_memset); -__efistub_strlen = KALLSYMS_HIDE(__pi_strlen); -__efistub_strnlen = KALLSYMS_HIDE(__pi_strnlen); -__efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); -__efistub_strncmp = KALLSYMS_HIDE(__pi_strncmp); -__efistub_strrchr = KALLSYMS_HIDE(__pi_strrchr); -__efistub___flush_dcache_area = KALLSYMS_HIDE(__pi___flush_dcache_area); +__efistub_memcmp = __pi_memcmp; +__efistub_memchr = __pi_memchr; +__efistub_memcpy = __pi_memcpy; +__efistub_memmove = __pi_memmove; +__efistub_memset = __pi_memset; +__efistub_strlen = __pi_strlen; +__efistub_strnlen = __pi_strnlen; +__efistub_strcmp = __pi_strcmp; +__efistub_strncmp = __pi_strncmp; +__efistub_strrchr = __pi_strrchr; +__efistub___flush_dcache_area = __pi___flush_dcache_area; #ifdef CONFIG_KASAN -__efistub___memcpy = KALLSYMS_HIDE(__pi_memcpy); -__efistub___memmove = KALLSYMS_HIDE(__pi_memmove); -__efistub___memset = KALLSYMS_HIDE(__pi_memset); +__efistub___memcpy = __pi_memcpy; +__efistub___memmove = __pi_memmove; +__efistub___memset = __pi_memset; #endif -__efistub__text = KALLSYMS_HIDE(_text); -__efistub__end = KALLSYMS_HIDE(_end); -__efistub__edata = KALLSYMS_HIDE(_edata); -__efistub_screen_info = KALLSYMS_HIDE(screen_info); +__efistub__text = _text; +__efistub__end = _end; +__efistub__edata = _edata; +__efistub_screen_info = screen_info; #endif