Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1061103rdg; Wed, 11 Oct 2023 13:13:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtmOz6/FpxHV4d9NhRqnVouGWPbBXNprPpqiXpnRygomN15oYqvaaSXd3PpLPPDciNhNOQ X-Received: by 2002:a05:6a21:6da0:b0:14d:446f:7212 with SMTP id wl32-20020a056a216da000b0014d446f7212mr28489016pzb.46.1697055199593; Wed, 11 Oct 2023 13:13:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697055199; cv=none; d=google.com; s=arc-20160816; b=Bm0MO+d/gn6muRb55G9lPRCpxRYzGi0j6ODXFMnPuHkGb/y5+euIoTQ9djatkl7KG/ 6+V3NhWygEF49kJSXpwpkdJ+5fe1s/oIGJlXJfMMgo1L4N1r5NRgzOLOd3jmxO55iDb4 8STqxcHvbUjRB65bHXinj+Nd0yD+rggfE2R0gtBw1YySYCbtuVmmDaASDuXEYBz92JXH yFsnwXU0CUa833PYdkpE/4dVXX6xrr+0NO+1BnZ6Eggf0CtbHnv+5WMXtI8Btw6sWY77 Owur2AYGClyY1q0qIV9Ib49aqxFZgusxc22dY8BWiLsmTy9l1z/3syEWWt3lb5Je3Iy2 NxWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:jabber-id:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VzSU/o88PzZiExnPcM/bY7It0yCjkhHXIN37mxIPysU=; fh=1FO0+bAP3EjVEd5w4LWyx9w9Li1fgkwJ6yzro5vJ0ME=; b=TK+YSITEYdisS3oKalAHLBUNV+ZNFfcT4NuKexuJyB1RM895E1505is5/L2fk0lBbh Go7PnowBLcNkJIdS/vY7dcZIy1X4AFnjHUQSePlncsEXiJY74ugG8xrfarHgIR8APZuQ F3iPM9mh83lfFy8/A2hwKwXJun/BSf7ED5UYtr8PVUvbm24XuLelo/lSlj1m22zOUCQT vYijvoG+taFa56GPbRx2lGsqzbvkZ3gLwMSxZNGddKVtbraz2zJA+JjlVOuUx65i03XI 9h2oipploKC/e6z7/tHXyYGXgzRNEGICQE2pz+5p/mh+1tKgxT+FEuyJDoCLwe0RjKge 2vYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fjasle.eu header.s=mail header.b=5WImRH0w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fjasle.eu Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bq16-20020a056a02045000b0059d25cedc78si624741pgb.499.2023.10.11.13.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 13:13:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@fjasle.eu header.s=mail header.b=5WImRH0w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fjasle.eu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C48AA8198765; Wed, 11 Oct 2023 13:13:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346890AbjJKUNE (ORCPT + 99 others); Wed, 11 Oct 2023 16:13:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233303AbjJKUNC (ORCPT ); Wed, 11 Oct 2023 16:13:02 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2413C4; Wed, 11 Oct 2023 13:12:53 -0700 (PDT) Received: from leknes.fjasle.eu ([46.142.98.201]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N8XkP-1rd3321Guf-014Paf; Wed, 11 Oct 2023 22:10:25 +0200 Received: from localhost.fjasle.eu (kirkenes.fjasle.eu [10.10.0.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by leknes.fjasle.eu (Postfix) with ESMTPS id 9DCA03F840; Wed, 11 Oct 2023 22:10:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fjasle.eu; s=mail; t=1697055016; bh=5Fr/47OcVCuPllaYQgCL+zdi7dPjAjL3MNWZhdULIc8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=5WImRH0w1AH69SJDHrWAjBqhWAtqvRtsHukVpQNPqSKcrMzjMa8QWAh7Sy2kg/Nii cNKr21hCCqvUTUPfee6kxSqzD2EW093Yu8e5H/j30R+OnBFpAlQ1Wl4y/NvNCujB6z 7ZYgYAxnN9X+ortJfAYnkbWwxYwRsiCYWqBUTebE= Received: by localhost.fjasle.eu (Postfix, from userid 1000) id ABC4A251E; Wed, 11 Oct 2023 22:10:14 +0200 (CEST) Date: Wed, 11 Oct 2023 22:10:14 +0200 From: Nicolas Schier To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, loongarch@lists.linux.dev, sparclinux@vger.kernel.org, x86@kernel.org, Albert Ou , Alexander Gordeev , Andy Lutomirski , Borislav Petkov , Catalin Marinas , Christian Borntraeger , Dave Hansen , "David S. Miller" , Guo Ren , "H. Peter Anvin" , Heiko Carstens , Huacai Chen , Ingo Molnar , Nathan Chancellor , Nick Desaulniers , Palmer Dabbelt , Paul Walmsley , Russell King , Sven Schnelle , Thomas Gleixner , Vasily Gorbik , WANG Xuerui , Will Deacon Subject: Re: [PATCH 4/5] kbuild: unify vdso_install rules Message-ID: References: <20231009124210.1064021-1-masahiroy@kernel.org> <20231009124210.1064021-4-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20231009124210.1064021-4-masahiroy@kernel.org> X-Operating-System: Debian GNU/Linux trixie/sid Jabber-ID: nicolas@jabber.no X-Provags-ID: V03:K1:GUfrfLlCUzJuMEjs4zRXdY1OuzE+qTNGx7LxKM1S1e9ReRxprWw QTcaTBx+t0EkTRqYWkYL67T9+ycHGZaqicx6qJ56Gqgjv4SNCVgkolt4r+0ZEgWqOlo+M4w O8j6dJv9DPnZVx+Re6NhFwDsF9/Jz5Qda20FlFD/v/59oC+e5T2V9+yc9jzxg8tnQCrfW6W OrXnxMb3y1nL8PBSSLcbA== UI-OutboundReport: notjunk:1;M01:P0:qNyXQk5UllI=;y8DdQd/Ft0LT6jsPRdxBN+G4s3G /dPQre51e0CezAsPaxbY0go4zVXCq8l3VMpkyVphD4Ebwcnjz+yzK136vs00yapmqCWX36hT/ NXmFHSZPlveUU24GlvQpwQSfgBPFheOuYdWZ35ro+lccjF8o31Ku/tPMdS9Pujb2cTCvxqNt1 YOrApfMBQsAPir8jbcWo2AgKTVph8uZ3jsZ3LCAcswn+cdhrq42B/LqbewNWUjiiwo5NovQ7X KczDAQqgpbn9krt6MUFokSGSf3DvdFlDVMUKZGZgwbrZfOPuw/cOsdtbQ2xOIFPb8FOeGaU4s RgBvvpLkUenKwOP64pryV/oQxby40IsynMJSdNBalDtN4+OBMp7xTvp4Yf3o+vZDiq4u+MezG QfVIdR7NUXg8uRejQT7mhDc1iQdstXDgUTjxcYZ1i4wAdVyM+mlbmvg8RMHvE3TEUtYJu0ncX tRgSfaauZifFKtrHuhbLXLavl3huWpgpu0RWAGz81ZsUpOhWCICM/mHV4FcpbP5T9CWTiBkis mPZHClPSJs65ACtPtoxIsDkhpilDa5GshzZto25RU4ZIGsjGoqzVgp0iOnsXVecB/pM4AUuou mwDo2Ma5gAipHcCF5iRss67DeGqV71qkwu/ptgiyW2DxZvLGkUr/h6qanW5CpLU4MHrTsm8hK Cp+rJaZ5AYXBRGNj214Og75oBWIjsHuD4DYBxg8+rXMpyOx+x5ZtTkbWOnLFu8FwD89cmvH9v KY3zlZ2a/om9/rt6NHMJllhWVKYOei5LUAspSIVv6BwmkUXg+6sT/x1OpzQmUUNpemJ733l0v CkyBea3IC9dW/+Z7vwOLn8v7m049Ze4jE2lDVYGp9qKvbSMV/X2j9My9xYcX70Pb5JlP7OLGG PMQHHGIOP5jvwVQ== X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 11 Oct 2023 13:13:16 -0700 (PDT) X-Spam-Level: ** On Mon 09 Oct 2023 21:42:09 GMT, Masahiro Yamada wrote: > Currently, there is no standard implementation for vdso_install, > leading to various issues: > > 1. Code duplication > > Many architectures duplicate similar code just for copying files > to the install destination. > > Some architectures (arm, sparc, x86) create build-id symlinks, > introducing more code duplication. > > 2. Accidental updates of in-tree build artifacts > > The vdso_install rule depends on the vdso files to install. > It may update in-tree build artifacts. This can be problematic, > as explained in commit 19514fc665ff ("arm, kbuild: make > "make install" not depend on vmlinux"). > > 3. Broken code in some architectures > > Makefile code is often copied from one architecture to another > without proper adaptation or testing. > > The previous commits removed broken code from csky, UML, and parisc. > > Another issue is that 'make vdso_install' for ARCH=s390 installs > vdso64, but not vdso32. > > To address these problems, this commit introduces the generic vdso_install. > > Architectures that support vdso_install need to define vdso-install-y > in arch/*/Makefile. > > vdso-install-y lists the files to install. For example, arch/x86/Makefile > looks like this: > > vdso-install-$(CONFIG_X86_64) += arch/x86/entry/vdso/vdso64.so.dbg > vdso-install-$(CONFIG_X86_X32_ABI) += arch/x86/entry/vdso/vdsox32.so.dbg > vdso-install-$(CONFIG_X86_32) += arch/x86/entry/vdso/vdso32.so.dbg > vdso-install-$(CONFIG_IA32_EMULATION) += arch/x86/entry/vdso/vdso32.so.dbg > > These files will be installed to $(MODLIB)/vdso/ with the .dbg suffix, > if exists, stripped away. > > vdso-install-y can optionally take the second field after the colon > separator. This is needed because some architectures install vdso > files as a different base name. > > The following is a snippet from arch/arm64/Makefile. > > vdso-install-$(CONFIG_COMPAT_VDSO) += arch/arm64/kernel/vdso32/vdso.so.dbg:vdso32.so > > This will rename vdso.so.dbg to vdso32.so during installation. If such > architectures change their implementation so that the file names match, > this workaround will go away. > > Signed-off-by: Masahiro Yamada > --- Thanks for cleaning this up! Reviewed-by: Nicolas Schier