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 5B594C433F5 for ; Tue, 12 Oct 2021 06:05:23 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6B8961076 for ; Tue, 12 Oct 2021 06:05:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B6B8961076 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HT4rx2v8yz3c98 for ; Tue, 12 Oct 2021 17:05:21 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=ff8FjRke; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmx.de (client-ip=212.227.15.18; helo=mout.gmx.net; envelope-from=deller@gmx.de; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=ff8FjRke; dkim-atps=neutral Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HT4r81bx5z2xXb for ; Tue, 12 Oct 2021 17:04:39 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1634018618; bh=t9NgUWQCN+x3V7Hp4Nfn0+U2T6Ph1w/p+Efg9vnjBf8=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=ff8FjRkeCGbDpe/67S+poZ4/cjMzIGK70KzKAoKGGO3UvGG+Ix7k9hOGT/JA5zFVb b0wSwWqJ8dMxsjQlVFW3HytK5O2ttt/GMmp/w5AxEKZod1TvXVGZhceo9V7kW7X6iz hClSRgqyy8hhts09vENLoYs8936bTXAsRMicxeAY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.20.60] ([92.116.128.177]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mplc7-1n5vBn0vWP-00q9gl; Tue, 12 Oct 2021 08:03:38 +0200 Message-ID: <91b38fce-8a5c-ccc7-fba5-b75b9769d4fc@gmx.de> Date: Tue, 12 Oct 2021 08:02:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH v1 04/10] asm-generic: Use HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR to define associated stubs Content-Language: en-US To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Andrew Morton , "James E.J. Bottomley" , Arnd Bergmann , Kees Cook , Greg Kroah-Hartman References: <8db2a3ca2b26a8325c671baa3e0492914597f079.1633964380.git.christophe.leroy@csgroup.eu> From: Helge Deller In-Reply-To: <8db2a3ca2b26a8325c671baa3e0492914597f079.1633964380.git.christophe.leroy@csgroup.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:3FVNBuFx64HT0tuoJYG2SIgMIMfL8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3qjJZvf5eBIaPEg6RELwFbj+f/k+jXImqEP4Lv5TkXZN5TJPsYmeqz3KbIKRv aBxuKiJNOBszOzO9VQWnHjxLXwClcL+tjwXNS3XwX8UEU8VrsmzWpMMZOW3nTJ2nwzDjzWQWx BGOQ0y8GPQD+KVYUN628i7hwI6ntwrNiecBM4JjoWqV/ZT9rsaIS4dasc+sUpXJasDDp26unL sDC01ifkzZiOzrrT/B31TP0moswG49S/dABdQ4qrLmnrxnobAtogIGonFxz2l341BK4NOCN+S /UisBwh5D8+KG4= X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 10/11/21 17:25, Christophe Leroy wrote: > Use HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR instead of 'dereference_functio= n_descriptor' > to know whether arch has function descriptors. > > Signed-off-by: Christophe Leroy > --- > arch/ia64/include/asm/sections.h | 4 ++-- > arch/parisc/include/asm/sections.h | 6 ++++-- > arch/powerpc/include/asm/sections.h | 6 ++++-- > include/asm-generic/sections.h | 3 ++- > 4 files changed, 12 insertions(+), 7 deletions(-) > > diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/se= ctions.h > index 35f24e52149a..80f5868afb06 100644 > --- a/arch/ia64/include/asm/sections.h > +++ b/arch/ia64/include/asm/sections.h > @@ -7,6 +7,8 @@ > * David Mosberger-Tang > */ > > +#define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 > + > #include > #include > #include > @@ -27,8 +29,6 @@ extern char __start_gate_brl_fsys_bubble_down_patchlis= t[], __end_gate_brl_fsys_b > extern char __start_unwind[], __end_unwind[]; > extern char __start_ivt_text[], __end_ivt_text[]; > > -#define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 > - > #undef dereference_function_descriptor > static inline void *dereference_function_descriptor(void *ptr) > { > diff --git a/arch/parisc/include/asm/sections.h b/arch/parisc/include/as= m/sections.h > index bb52aea0cb21..2e781ee19b66 100644 > --- a/arch/parisc/include/asm/sections.h > +++ b/arch/parisc/include/asm/sections.h > @@ -2,6 +2,10 @@ > #ifndef _PARISC_SECTIONS_H > #define _PARISC_SECTIONS_H > > +#ifdef CONFIG_64BIT > +#define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 > +#endif > + > /* nothing to see, move along */ > #include > > @@ -9,8 +13,6 @@ extern char __alt_instructions[], __alt_instructions_en= d[]; > > #ifdef CONFIG_64BIT > > -#define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 > - > #undef dereference_function_descriptor > void *dereference_function_descriptor(void *); > > diff --git a/arch/powerpc/include/asm/sections.h b/arch/powerpc/include/= asm/sections.h > index 32e7035863ac..b7f1ba04e756 100644 > --- a/arch/powerpc/include/asm/sections.h > +++ b/arch/powerpc/include/asm/sections.h > @@ -8,6 +8,10 @@ > > #define arch_is_kernel_initmem_freed arch_is_kernel_initmem_freed > > +#ifdef PPC64_ELF_ABI_v1 > +#define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 > +#endif > + > #include > > extern bool init_mem_is_free; > @@ -69,8 +73,6 @@ static inline int overlaps_kernel_text(unsigned long s= tart, unsigned long end) > > #ifdef PPC64_ELF_ABI_v1 > > -#define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1 > - > #undef dereference_function_descriptor > static inline void *dereference_function_descriptor(void *ptr) > { > diff --git a/include/asm-generic/sections.h b/include/asm-generic/sectio= ns.h > index d16302d3eb59..1db5cfd69817 100644 > --- a/include/asm-generic/sections.h > +++ b/include/asm-generic/sections.h > @@ -59,7 +59,8 @@ extern char __noinstr_text_start[], __noinstr_text_end= []; > extern __visible const void __nosave_begin, __nosave_end; > > /* Function descriptor handling (if any). Override in asm/sections.h *= / > -#ifndef dereference_function_descriptor > +#ifdef HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR > +#else why not #ifndef HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR instead of #if/#else ? > #define dereference_function_descriptor(p) ((void *)(p)) > #define dereference_kernel_function_descriptor(p) ((void *)(p)) > #endif >