From patchwork Thu Mar 1 17:19:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 130353 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3064153edc; Thu, 1 Mar 2018 09:19:17 -0800 (PST) X-Google-Smtp-Source: AG47ELuq4v+uZIkMwRPaCysTmG+DqMcvwwKmdtxNGEAqPtF4tGKIXfjCw+vIHSNKouDo1SY3K4yI X-Received: by 10.99.114.80 with SMTP id c16mr2127842pgn.436.1519924756976; Thu, 01 Mar 2018 09:19:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519924756; cv=none; d=google.com; s=arc-20160816; b=hIx6FPiMAWX++zt/mBDzZVQjbhobWBcbB9QE+eoUCyNyIQ9rd3YG6dLR0AzUhKRxkR M8S6iMoGsoP/NX436e4gvOmEh6fbupz6vb3i1dGg60LS4IsSfPDgtfa8/APpCKnpEqOB IwV9+wfE/uqEnUU5o1Yp2+YNYjkgMolmGUQ7rJaj/S47jfMa+EsgGmUGyoXUO2/OHaV4 kI2nYHot9BA+FAtMPICi0wGXTd5ZSBrD4E8BkM5BhxQmmb8Z6yNTOseyfpvEIf1kw1hz iEzPY6MnXACsz7F7UXS2cUgLmNzl6RIomSy6Yz//6UWyisNPNlOgO1efnf+pRwxRXdmb lP0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=TPiSNlfmV9xYTJaNXzlYVJwC8XW/x8rdDWyigoglJvw=; b=GaRcrykVvbm6s7PmPAD7eBK693kOWJBA57tqy5O4NXeJ5Tqz9Chkbjl8oiPIfC+nLL asVY3Cq8o3UtFyFa+tobrDlVA+B/aqNecxVSHqC+gf1/t0YgJHuR7jIl1CK6rc7VAbvo TeXkTksoB+yq1TyW8wjdljqG3VAF2MSlkAtfRtf1pY625It1ePK5JhuJbiUIPrw7al1s u+t5f/BE6V+PUjfdpQ7S+DUewoyHsOGLUSv8A38FSJiJw3njBEuar33OufRSTMpTl1Oj JCw7iZG7tw9gg+47ZqYtIU2XhcEjDqRnYx465u/OaExkM1TsHVXKQ9AmkuIF4sseUt1a NfZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IGKKHxxa; 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 j9si3260376pfh.200.2018.03.01.09.19.16; Thu, 01 Mar 2018 09:19:16 -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=IGKKHxxa; 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 S1033368AbeCARTM (ORCPT + 28 others); Thu, 1 Mar 2018 12:19:12 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:54090 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032995AbeCARTL (ORCPT ); Thu, 1 Mar 2018 12:19:11 -0500 Received: by mail-wm0-f66.google.com with SMTP id t74so13636677wme.3 for ; Thu, 01 Mar 2018 09:19:10 -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=TPiSNlfmV9xYTJaNXzlYVJwC8XW/x8rdDWyigoglJvw=; b=IGKKHxxaEwGuPPM4N0vzQCd7nMwkKaA33PaCcpnO4oGuDZ6i90lEe3XId2l5Z6Du+N carzoQrECQxAo3SPZ+tEUjaP8Fw1JypKMWY2r2aSKrmlMu/foKhYDTfJnKBc+u0ObSQ1 epri4GA/KW9dAoRropjw/KciToIc2jGH/TuP0= 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=TPiSNlfmV9xYTJaNXzlYVJwC8XW/x8rdDWyigoglJvw=; b=QHdaByh5kpvXhJk/W0tcW5GDbZQp3t7inYWoULvHcidXgXox4OKZ4EROVfySBbd52I zZOINQP2DG5ILPObyt5ZPGE/CKRcEwkWiCim7eOnKA2kBQHatJri6kKG1AyAMQBr4+Cc P6FT/hSJBDncIPEcUhTrTtZIx0eo8xsT1OSWH0ijEbEp/EbBSZu/xu3o5fuZBoHoXM7T /RJvwFZ0A4whVqw96zWyLsBoPmF4wDLEPlwOOyakAyW2C+EcUNrbTVoj3Scu/p9B2N9n 8VN3WEzSyGFalNCqjNpAPW+MaGFs3NpDjFqRmxtd/hvyGSx1Nk/VtMdrkKg7LgycCCU3 2qEg== X-Gm-Message-State: AElRT7GBGu2WclhexhRyr1tyrIBxTChuREK0cGo/EpBdh1RwCMVm/PmT xMbU9o+0ZMijT+ZWRnxSKoT3l59bB5A= X-Received: by 10.28.234.197 with SMTP id g66mr2360345wmi.10.1519924749870; Thu, 01 Mar 2018 09:19:09 -0800 (PST) Received: from localhost.localdomain ([196.71.216.221]) by smtp.gmail.com with ESMTPSA id f3sm3595118wre.72.2018.03.01.09.19.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 09:19:09 -0800 (PST) From: Ard Biesheuvel To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: will.deacon@arm.com, catalin.marinas@arm.com, Ard Biesheuvel Subject: [PATCH] scripts/kallsyms: filter arm64's __efistub_ symbols Date: Thu, 1 Mar 2018 17:19:01 +0000 Message-Id: <20180301171901.1134-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On arm64, the EFI stub and the kernel proper are essentially the same binary, although the EFI stub executes at a different virtual address as the kernel. For this reason, the EFI stub is restricted in the symbols it can link to, which is ensured by prefixing all EFI stub symbols with __efistub_ (and emitting __efistub_ prefixed aliases for routines that may be shared between the core kernel and the stub) These symbols are leaking into kallsyms, polluting the namespace, so let's filter them explicitly. Signed-off-by: Ard Biesheuvel --- scripts/kallsyms.c | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 9ee9bf7fd1a2..1dd24c5b9b47 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -221,6 +221,7 @@ static int symbol_valid(struct sym_entry *s) static char *special_prefixes[] = { "__crc_", /* modversions */ + "__efistub_", /* arm64 EFI stub namespace */ NULL }; static char *special_suffixes[] = {