From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4C219C4332F for ; Thu, 29 Dec 2022 17:25:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Mime-Version:Message-ID:To:From:CC:In-Reply-To: Subject:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References:List-Owner; bh=zZUkQBnUMEEUQILtnRMWsyY17tUfNUNE+bYL67l7TKA=; b=zFjFDGBzQTKWDAU5advBN+ZOfF E68Ra7sElaFaTpswAs+WHN9Ekg/8HIYDSLxD+F3+TJ7nubojdTMo96hv/kv4o+gbBW76T9oRNjdtV GVW3PQ3Y8tOrQ3XvpL3Jf3zWv1G75BZzWWdXBK6LLqNkzodGncsVrnVebxVujqKr/JK8dMgTNeGlR /EdZhm1VxAfHstzUGiL15o/VdxyVQKKqd+POYQsdTm0ZIj0P5dWkNZEdUIOWgHaJqeUUuxwLPXaIS RWcDSf0/2iSZYCcb72kBcEIjWUr1pVgq3CLq2VO+6N0v84maqTN/IteHfyQsQOp4I1Z7ZBidMKnxf SpF05TNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pAwdv-000IyN-A4; Thu, 29 Dec 2022 17:24:35 +0000 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pAvfo-00HPzS-Ue for linux-arm-kernel@lists.infradead.org; Thu, 29 Dec 2022 16:22:31 +0000 Received: by mail-pg1-x530.google.com with SMTP id r18so12651484pgr.12 for ; Thu, 29 Dec 2022 08:22:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=lGyrD0+PhkAL5dbAeObFs9RwoqBo5ONG0NwovuaDsrM=; b=dahVygbdXamhJiKEgN7Jyg1lXYgvfTSo1DMUkYl6yXrdIMvfnyRS0HpjAJGhYD3IFg E+JY0GnUUwwkM2h9ox2Zgy/UxJJ4gx7kMRbUi8BoQs1MkH7ANMKs27AnO7PEO784TqXp ruuAqGepnkn93qVt3OFjdbG1AsqdvffnpusA3lSTC6zFKd8HiqB0qYg9fELjUJN4UbO/ 3lnm7IU3UfXKaT3AUgnmQMHaYpOZ2VZND7TcbraC5FIjkTHVAEIVzHPRo5TQwNIMJbMP q3kZJpTtujX11O+tGSd8oHpehkbK7CbScXp9TvIT0cj2FcWn3tOzaHwI3gNMSd/9wBDx rNGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lGyrD0+PhkAL5dbAeObFs9RwoqBo5ONG0NwovuaDsrM=; b=waBuT3wYCoWC0dEGwxvXUEwp828HiCHlbZ/db2BcFuNhLFgESOBVprcK7RAZkHkEiT kQYBrbm8YuMRYMhzORyplL7XIFnWOEh4S0+w9L8/8KyYlQDT9SeC5RO6Ez3JCGdMWw27 /n/EMq4V8zFGn5q3YyIlJ76Lin+TsWBpOTJcM+RhZQGWa33GFsxQ8386ObYz6dWzpv5A n/E1qcRBaYm9Z4aNFD1/tEqwqYxYybkVlMXlAjrDExV8ORl/jT7al+bbSSbOkMKyGmkr AOPhaUeMlA4pa9wyQXtauGY68Bg5v7UtVuIVhBDC7VqbqkuxqTh4o2o5RDHBe4k83s7v wrFg== X-Gm-Message-State: AFqh2kofTF7mbgY6T70DyZZBnWVI2IHL96RvGbxoJj55xq0j2unNbUGf QnChIJiL+dLDMnc4XV5iI6pSVg== X-Google-Smtp-Source: AMrXdXvpdMbR8CMYmi4dUk/9PgGNumQG+p4T2pa56FD3JYpViB2+8Ov5fWBEh9VYECa0d3vj+bwoEw== X-Received: by 2002:aa7:99cb:0:b0:580:d188:f516 with SMTP id v11-20020aa799cb000000b00580d188f516mr22924872pfi.19.1672330945228; Thu, 29 Dec 2022 08:22:25 -0800 (PST) Received: from localhost ([135.180.226.51]) by smtp.gmail.com with ESMTPSA id x185-20020a6286c2000000b0056bfebfa6e4sm12277463pfd.190.2022.12.29.08.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 08:22:24 -0800 (PST) Date: Thu, 29 Dec 2022 08:22:24 -0800 (PST) X-Google-Original-Date: Thu, 29 Dec 2022 07:53:04 PST (-0800) Subject: Re: [PATCH v2] vdso: Improve cmd_vdso_check to check all dynamic relocations In-Reply-To: <20221221235147.45lkqmosndritfpe@google.com> CC: christophe.leroy@csgroup.eu, luto@kernel.org, tglx@linutronix.de, vincenzo.frascino@arm.com, Arnd Bergmann , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, linux-mips@vger.kernel.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org From: Palmer Dabbelt To: maskray@google.com Message-ID: Mime-Version: 1.0 (MHng) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221229_082229_294636_33D6B9DB X-CRM114-Status: GOOD ( 23.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 21 Dec 2022 15:51:47 PST (-0800), maskray@google.com wrote: > The actual intention is that no dynamic relocation exists. However, some > GNU ld ports produce unneeded R_*_NONE. (If a port fails to determine > the exact .rel[a].dyn size, the trailing zeros become R_*_NONE > relocations. E.g. ld's powerpc port recently fixed > https://sourceware.org/bugzilla/show_bug.cgi?id=29540) R_*_NONE are > generally no-op in the dynamic loaders. So just ignore them. > > With the change, we can remove ARCH_REL_TYPE_ABS. ARCH_REL_TYPE_ABS is a > bit misnomer as ports may check RELAVETIVE/GLOB_DAT/JUMP_SLOT which are > not called "absolute relocations". (The patch is motivated by the arm64 > port missing R_AARCH64_RELATIVE.) > > Signed-off-by: Fangrui Song > Reviewed-by: Christophe Leroy > --- > Change from v1: > * rebase after 8ac3b5cd3e0521d92f9755e90d140382fc292510 (lib/vdso: use "grep -E" instead of "egrep") > * change the commit message to mention an example GNU ld bug; no longer say the patch fixes a deprecated egrep use > --- > arch/arm/vdso/Makefile | 3 --- > arch/arm64/kernel/vdso/Makefile | 3 --- > arch/arm64/kernel/vdso32/Makefile | 3 --- > arch/csky/kernel/vdso/Makefile | 3 --- > arch/loongarch/vdso/Makefile | 3 --- > arch/mips/vdso/Makefile | 3 --- > arch/powerpc/kernel/vdso/Makefile | 1 - > arch/riscv/kernel/vdso/Makefile | 3 --- > arch/s390/kernel/vdso32/Makefile | 2 -- > arch/s390/kernel/vdso64/Makefile | 2 -- > arch/x86/entry/vdso/Makefile | 4 ---- > lib/vdso/Makefile | 13 ++++--------- > 12 files changed, 4 insertions(+), 39 deletions(-) [snip] > diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile > index 06e6b27f3bcc..d85c37e11b21 100644 > --- a/arch/riscv/kernel/vdso/Makefile > +++ b/arch/riscv/kernel/vdso/Makefile > @@ -1,9 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0-only > # Copied from arch/tile/kernel/vdso/Makefile > > -# Absolute relocation type $(ARCH_REL_TYPE_ABS) needs to be defined before > -# the inclusion of generic Makefile. > -ARCH_REL_TYPE_ABS := R_RISCV_32|R_RISCV_64|R_RISCV_JUMP_SLOT > include $(srctree)/lib/vdso/Makefile > # Symbols present in the vdso > vdso-syms = rt_sigreturn Acked-by: Palmer Dabbelt # RISC-V Thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel