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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F1FAC433EF for ; Tue, 12 Oct 2021 07:10:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0E05760EB4 for ; Tue, 12 Oct 2021 07:10:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0E05760EB4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 8F1816B006C; Tue, 12 Oct 2021 03:10:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 898B16B0071; Tue, 12 Oct 2021 03:10:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 787796B0073; Tue, 12 Oct 2021 03:10:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id 6AC626B006C for ; Tue, 12 Oct 2021 03:10:41 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 34E0030178 for ; Tue, 12 Oct 2021 07:10:41 +0000 (UTC) X-FDA: 78686912682.31.6F61E6A Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by imf27.hostedemail.com (Postfix) with ESMTP id 29E907000CAF for ; Tue, 12 Oct 2021 07:10:40 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4HT6JC4hV3z4xbT; Tue, 12 Oct 2021 18:10:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1634022636; bh=ZYvG5vqpEVtFsi2i8PDCJ+ItpwALv0k7O1f+80SFrLE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=rRwZvaVEkjdhrKAOp6diupDVvQZ7hXvLlOSoI+G2mukZWZFsN0eEU06RIDbHspKjs ohYnOZrJlr3f6adzvVRf8A4tSsKLfC7WVT/S7692qI01dvIlmOy8Dysfr86uJgy9Gt djKTiV2y9Pj8qtTeJQAPPX3dNSFSCXxSuoBvSda0cjjclcohiQ6lYRdKfh2nEuxdj/ hrjop70jfHtkPQpQ/vA9zlLreU6hcaGPNRsmwihNYJW1h5pp66jzfp+84nEMubWGpB TjuTt7dqbGcp56zjRh3S7ZLFQax2txG9i3NYKxN9PVox4BrvUZQ0Tme/n+o+5ZJi6O ijoJZj4FLkcXw== From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Andrew Morton , "James E.J. Bottomley" , Helge Deller , Arnd Bergmann , Kees Cook , Greg Kroah-Hartman Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v1 01/10] powerpc: Move 'struct ppc64_opd_entry' back into asm/elf.h In-Reply-To: <8ff3ec195d695033b652e9971fba2dc5528f7151.1633964380.git.christophe.leroy@csgroup.eu> References: <8ff3ec195d695033b652e9971fba2dc5528f7151.1633964380.git.christophe.leroy@csgroup.eu> Date: Tue, 12 Oct 2021 18:10:32 +1100 Message-ID: <878ryy7m6v.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 29E907000CAF X-Stat-Signature: 49ru8zb86wis6yikyp3yro6ud3hcsz4r Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=rRwZvaVE; spf=pass (imf27.hostedemail.com: domain of mpe@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=mpe@ellerman.id.au; dmarc=none X-Rspamd-Server: rspam06 X-HE-Tag: 1634022640-243806 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Christophe Leroy writes: > 'struct ppc64_opd_entry' doesn't belong to uapi/asm/elf.h Agree, but ... > It was initially in module_64.c and commit 2d291e902791 ("Fix compile > failure with non modular builds") moved it into asm/elf.h > > But it was by mistake added outside of __KERNEL__ section, > therefore commit c3617f72036c ("UAPI: (Scripted) Disintegrate > arch/powerpc/include/asm") moved it to uapi/asm/elf.h ... it's been visible to userspace since the first commit moved it, ~13 years ago in 2008, v2.6.27. > Move it back into asm/elf.h, this brings it back in line with > IA64 and PARISC architectures. Removing it from the uapi header risks breaking userspace, I doubt anything uses it, but who knows. Given how long it's been there I think it's a bit risky to remove it :/ > diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h > index b8425e3cfd81..64b523848cd7 100644 > --- a/arch/powerpc/include/asm/elf.h > +++ b/arch/powerpc/include/asm/elf.h > @@ -176,4 +176,11 @@ do { \ > /* Relocate the kernel image to @final_address */ > void relocate(unsigned long final_address); > > +/* There's actually a third entry here, but it's unused */ > +struct ppc64_opd_entry > +{ > + unsigned long funcaddr; > + unsigned long r2; > +}; > + > #endif /* _ASM_POWERPC_ELF_H */ > diff --git a/arch/powerpc/include/uapi/asm/elf.h b/arch/powerpc/include/uapi/asm/elf.h > index 860c59291bfc..308857123a08 100644 > --- a/arch/powerpc/include/uapi/asm/elf.h > +++ b/arch/powerpc/include/uapi/asm/elf.h > @@ -289,12 +289,4 @@ typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; > /* Keep this the last entry. */ > #define R_PPC64_NUM 253 > > -/* There's actually a third entry here, but it's unused */ > -struct ppc64_opd_entry > -{ > - unsigned long funcaddr; > - unsigned long r2; > -}; Rather than removing it we can make it uapi only with: #ifndef __KERNEL__ /* There's actually a third entry here, but it's unused */ struct ppc64_opd_entry { unsigned long funcaddr; unsigned long r2; }; #endif And then we can do whatever we want with the kernel internal version. cheers