Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1588912rwj; Sun, 18 Dec 2022 11:13:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf45A9IBkG2V2NiGkda0KfTpmhSzUrMDBVWfIH51NTVbbkuqL7Ns6f4kgL2bDd5IVizZ/0f/ X-Received: by 2002:a17:90a:8a13:b0:219:3bd3:e81a with SMTP id w19-20020a17090a8a1300b002193bd3e81amr40761913pjn.42.1671390811180; Sun, 18 Dec 2022 11:13:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671390811; cv=none; d=google.com; s=arc-20160816; b=f2/3votUfmgWVuyWE5A+h1QH9VGBKr0IlHsjjKxMCmiALFqa8++oYXXWgE3N+R7zTh yV/nvJce8GTKA+iYhQ8zkZ5nnyYVJ3aSfenOKqgbxmbBMbDKnecxuqe6siqxwDKmDskt qUv89OTZAFVq2OrvuJUA0Gxe/XlmIUlYMDQl2PlTA5CP+DS+hANVudXHn4SqGagkJAHP sCs/8nUrM/vaC7K7J/iY/zCvzS5LCgxkH/yvV6psZkPDEQdcUjfVeA6LRJ5bY7eehB6X aX6iGaAD792AQAcVOrYbI05TVFTsdMFwFKSjFIkLq9QSVCbggc4Jr24u9SwPOUH2AiqR 1Q5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=G6KoHvcGTx1RcWeXNiJbyqXJGMqsYoj3r/slahxN0do=; b=ua2SAkTvpnrU2UAQMion2iCOKk3xNMwNHbzOeL/Uo/Qgaes2QNv+syftwprPpQAmRf CzJE3qfY1vhrsX0mArjdvA8Bo9lBV8+8TTMsY/2eN1v60FTcy0ojGmimXLk2NKcaMtL/ S0mMdgODtgV3l2Eyr8uhnJAjYJ+LX6eMR5qmFwEwHIXis9AKGbkxNyY/2T3h1L4Zi4WW LVgoeRFWuJOOiB+EjVEHjwjFyhAc/99ltteE5g5J2qwCvxyp+zUF2KsVzpkmaNlk3LCJ mle+IfC3NBqC8GEYRdab/pY1avqOGK2W7Hi3KnyKYz1jQCt755tCF1vHctU2oXwtsyTz JDlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=AXETmQ2+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i21-20020a17090acf9500b002198ffdbebcsi13607688pju.111.2022.12.18.11.13.20; Sun, 18 Dec 2022 11:13:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=AXETmQ2+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbiLRSeQ (ORCPT + 72 others); Sun, 18 Dec 2022 13:34:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiLRSdr (ORCPT ); Sun, 18 Dec 2022 13:33:47 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8CBEE7F for ; Sun, 18 Dec 2022 10:31:51 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id s9so6742467qtx.6 for ; Sun, 18 Dec 2022 10:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=G6KoHvcGTx1RcWeXNiJbyqXJGMqsYoj3r/slahxN0do=; b=AXETmQ2+NJJH9dhNzAPwQ0s/HvEQF7jcqqUCJVlG45c91ucHbLsnCqKo61bi/1AxsV WbR8WRagXpTp0rVjwLIGQM30a1S47wrJW+Z1j9N+MPtFq9WWws7hma6/BRHw66QW8T4q G67j+3VBYBNneXjsrJNhe2zVwMTBr7TMKLIr0VHkXMfEE3awqCSAUF2M6Sc52bhm+mFh YKlC38KVcYTaDIXKmZQdv5bEnmiiBi+jROD5I/dc3yzAGrlFvxG4ikTdVFfY177W3DhC xki87bEvgwQydNUbKwT9qKQ+0846myxixMIMjFqKO6k3hZUiG0ixF+V8OxXRwD2vw8pf FXXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G6KoHvcGTx1RcWeXNiJbyqXJGMqsYoj3r/slahxN0do=; b=4eMn+I1Wazs+VWGwk0r1tnfbzzrAG4i7+X5RMSfJ8MmPgzmyZuWXjds5XTpbP4n5Aw 5JLZB3KOqAjp/Qj5TXSYtWehB4FGI8c2ANvfoXu6hMsGhbHZQ0Bpnc2FGdYtdS6ZP3/3 K1wlL6z9b1I+mypFfXLHzKb6fymJcV8shSLeEWNPBPrNDhpR3r55NMf1hsQg48bWJg7K t3p9Akpzh5CCK5LyWE4g3xDdRigFy0xJ2CazIZnsZp0P4NrMqpzHvH40XtzGEtMtfST1 j/XogutzwZ6rMDxrgMFBDhkXLd8IDVtwNUiqz+cGWIu6X/bL/04g6B5KfxFnuOOvpnT0 gtNQ== X-Gm-Message-State: ANoB5pmQ7zSLEbkgZU0kkxyUdrPcds+xM2E79iezf9nMqgSNd9JaqBfn ipyFj4dWuhslYQJ57PKhHK95bca1SX9wekYVhNFDrg== X-Received: by 2002:ac8:754e:0:b0:3a7:e16a:6a7 with SMTP id b14-20020ac8754e000000b003a7e16a06a7mr17572456qtr.288.1671388310693; Sun, 18 Dec 2022 10:31:50 -0800 (PST) MIME-Version: 1.0 References: <20220830193701.1702962-1-maskray@google.com> <20220910075316.no72fdyqjvunomwm@google.com> <9ce45cd2-dcd8-11f8-e496-7efe3649e241@csgroup.eu> <20221115004625.x4wl6zbg4iiuxl5t@google.com> <3ec9737e-3d1a-c014-b91a-0e2d406a3b3d@csgroup.eu> In-Reply-To: <3ec9737e-3d1a-c014-b91a-0e2d406a3b3d@csgroup.eu> From: Fangrui Song Date: Sun, 18 Dec 2022 10:31:39 -0800 Message-ID: Subject: Re: [PATCH] vdso: Improve cmd_vdso_check to check all dynamic relocations To: Christophe Leroy , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino Cc: "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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 4, 2022 at 8:58 AM Christophe Leroy wrote: > > > > Le 04/12/2022 =C3=A0 05:50, Fangrui Song a =C3=A9crit : > > On Mon, Nov 14, 2022 at 4:46 PM Fangrui Song wrote= : > >> > >> On 2022-11-14, Christophe Leroy wrote: > >>> > >>> > >>> Le 28/09/2022 =C3=A0 07:25, Fangrui Song a =C3=A9crit : > >>>> On Sat, Sep 10, 2022 at 12:53 AM Fangrui Song w= rote: > >>>>> > >>>>> On 2022-08-30, Fangrui Song wrote: > >>>>>> The actual intention is that no dynamic relocation exists. However= , some > >>>>>> GNU ld ports produce unneeded R_*_NONE. (If a port is not care eno= ugh to > >>>>>> determine the exact .rel[a].dyn size, the trailing zeros become R_= *_NONE > >>>>>> relocations. E.g. powerpc64le ld as of 2.38 has the issue with > >>>>>> defconfig.) R_*_NONE are generally no-op in the dynamic loaders. S= o just > >>>>>> ignore them. > >>>>>> > >>>>>> With the change, we can remove ARCH_REL_TYPE_ABS. ARCH_REL_TYPE_AB= S is a > >>>>>> bit misnomer as ports may check RELAVETIVE/GLOB_DAT/JUMP_SLOT whic= h are > >>>>>> not called "absolute relocations". (The patch is motivated by the = arm64 > >>>>>> port missing R_AARCH64_RELATIVE.) > >>>>>> > >>>>>> While here, replace "egrep" with "grep" as "egrep" is deprecated i= n GNU > >>>>>> grep 3.7. > >>>>>> > >>>>>> Signed-off-by: Fangrui Song > >>>>>> --- > >>>>>> [...] > >>>>>> > >>>>> > >>>>> Ping. > >>>> > >>>> Ping^2 :) > >>> > >>> Can you explain which ARCH_REL_TYPE_ABS can be removed with this chan= ge ? > >>> How is the verification done if ARCH_REL_TYPE_ABS is removed ? > >> > >> All ARCH_REL_TYPE_ABS relocation types can be removed. As explained, t= he > >> real intention is to check no dynamic relocation, and this is done by > >> the new > > Well, there was a typo in my question, I wanted to ask 'why', not 'which'= . > > >> > >> cmd_vdso_check =3D if $(READELF) -rW $@ | grep -v _NONE | grep -q = "R_\w*_"; \ > >> > >> in this patch. > >> > >> grep -v _NONE is to work around some GNU ld ports (and likely older re= leases > >> of some ports even if their latest versions are fixed) which produce > >> unneeded R_*_NONE dynamic relocations. > > > > Ping :) > > Ok, that seems to work on powerpc. > > Reviewed-by: Christophe Leroy Thanks. Can a maintainer pick up this commit?