bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sedat Dilek <sedat.dilek@gmail.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: akpm@linux-foundation.org, jpoimboe@redhat.com, yhs@fb.com,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Clang-Built-Linux ML <clang-built-linux@googlegroups.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Armijn Hemel <armijn@tjaldur.nl>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Allison Randal <allison@lohutok.net>,
	Juergen Gross <jgross@suse.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	Brijesh Singh <brijesh.singh@amd.com>,
	Enrico Weigelt <info@metux.net>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Hannes Reinecke <hare@suse.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Pu Wen <puwen@hygon.cn>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH 11/16] x86: prefer __section from compiler_attributes.h
Date: Mon, 19 Aug 2019 19:59:29 +0200	[thread overview]
Message-ID: <CA+icZUX=BPPH7rH13OkDzmc1L42hxcWDw+c_G7sf7G8wcHiPAQ@mail.gmail.com> (raw)
In-Reply-To: <20190812215052.71840-11-ndesaulniers@google.com>

On Mon, Aug 12, 2019 at 11:52 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
> Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Tested-by: Sedat Dilek <sedat.dilek@gmail.com> [ Linux v5.3-rc5 ]

Patchset "for-5.3/x86-section-name-escaping":

include/linux/compiler.h: remove unused KENTRY macro
include/linux: prefer __section from compiler_attributes.h
include/asm-generic: prefer __section from compiler_attributes.h
x86: prefer __section from compiler_attributes.h

Thanks.

- Sedat -

> ---
>  arch/x86/include/asm/cache.h       | 2 +-
>  arch/x86/include/asm/intel-mid.h   | 2 +-
>  arch/x86/include/asm/iommu_table.h | 5 ++---
>  arch/x86/include/asm/irqflags.h    | 2 +-
>  arch/x86/include/asm/mem_encrypt.h | 2 +-
>  arch/x86/kernel/cpu/cpu.h          | 3 +--
>  6 files changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h
> index abe08690a887..bb9f4bf4ec02 100644
> --- a/arch/x86/include/asm/cache.h
> +++ b/arch/x86/include/asm/cache.h
> @@ -8,7 +8,7 @@
>  #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
>  #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
>
> -#define __read_mostly __attribute__((__section__(".data..read_mostly")))
> +#define __read_mostly __section(.data..read_mostly)
>
>  #define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
>  #define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
> diff --git a/arch/x86/include/asm/intel-mid.h b/arch/x86/include/asm/intel-mid.h
> index 8e5af119dc2d..f51f04aefe1b 100644
> --- a/arch/x86/include/asm/intel-mid.h
> +++ b/arch/x86/include/asm/intel-mid.h
> @@ -43,7 +43,7 @@ struct devs_id {
>
>  #define sfi_device(i)                                                          \
>         static const struct devs_id *const __intel_mid_sfi_##i##_dev __used     \
> -       __attribute__((__section__(".x86_intel_mid_dev.init"))) = &i
> +       __section(.x86_intel_mid_dev.init) = &i
>
>  /**
>  * struct mid_sd_board_info - template for SD device creation
> diff --git a/arch/x86/include/asm/iommu_table.h b/arch/x86/include/asm/iommu_table.h
> index 1fb3fd1a83c2..7d190710eb92 100644
> --- a/arch/x86/include/asm/iommu_table.h
> +++ b/arch/x86/include/asm/iommu_table.h
> @@ -50,9 +50,8 @@ struct iommu_table_entry {
>
>  #define __IOMMU_INIT(_detect, _depend, _early_init, _late_init, _finish)\
>         static const struct iommu_table_entry                           \
> -               __iommu_entry_##_detect __used                          \
> -       __attribute__ ((unused, __section__(".iommu_table"),            \
> -                       aligned((sizeof(void *)))))     \
> +               __iommu_entry_##_detect __used __section(.iommu_table)  \
> +               __aligned((sizeof(void *)))                             \
>         = {_detect, _depend, _early_init, _late_init,                   \
>            _finish ? IOMMU_FINISH_IF_DETECTED : 0}
>  /*
> diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
> index 8a0e56e1dcc9..68db90bca813 100644
> --- a/arch/x86/include/asm/irqflags.h
> +++ b/arch/x86/include/asm/irqflags.h
> @@ -9,7 +9,7 @@
>  #include <asm/nospec-branch.h>
>
>  /* Provide __cpuidle; we can't safely include <linux/cpu.h> */
> -#define __cpuidle __attribute__((__section__(".cpuidle.text")))
> +#define __cpuidle __section(.cpuidle.text)
>
>  /*
>   * Interrupt control:
> diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h
> index 0c196c47d621..db2cd3709148 100644
> --- a/arch/x86/include/asm/mem_encrypt.h
> +++ b/arch/x86/include/asm/mem_encrypt.h
> @@ -50,7 +50,7 @@ void __init mem_encrypt_free_decrypted_mem(void);
>  bool sme_active(void);
>  bool sev_active(void);
>
> -#define __bss_decrypted __attribute__((__section__(".bss..decrypted")))
> +#define __bss_decrypted __section(.bss..decrypted)
>
>  #else  /* !CONFIG_AMD_MEM_ENCRYPT */
>
> diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
> index c0e2407abdd6..7ff9dc41a603 100644
> --- a/arch/x86/kernel/cpu/cpu.h
> +++ b/arch/x86/kernel/cpu/cpu.h
> @@ -38,8 +38,7 @@ struct _tlb_table {
>
>  #define cpu_dev_register(cpu_devX) \
>         static const struct cpu_dev *const __cpu_dev_##cpu_devX __used \
> -       __attribute__((__section__(".x86_cpu_dev.init"))) = \
> -       &cpu_devX;
> +       __section(.x86_cpu_dev.init) = &cpu_devX;
>
>  extern const struct cpu_dev *const __x86_cpu_dev_start[],
>                             *const __x86_cpu_dev_end[];
> --
> 2.23.0.rc1.153.gdeed80330f-goog
>

  parent reply	other threads:[~2019-08-19 17:59 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 21:50 [PATCH 01/16] s390/boot: fix section name escaping Nick Desaulniers
2019-08-12 21:50 ` [PATCH 02/16] arc: prefer __section from compiler_attributes.h Nick Desaulniers
2019-08-12 21:50 ` [PATCH 03/16] parisc: " Nick Desaulniers
2019-08-12 21:50 ` [PATCH 04/16] um: " Nick Desaulniers
2019-08-12 21:50 ` [PATCH 05/16] sh: " Nick Desaulniers
2019-08-13  8:51   ` Yoshinori Sato
2019-08-12 21:50 ` [PATCH 06/16] ia64: " Nick Desaulniers
2019-08-12 21:50 ` [PATCH 07/16] arm: " Nick Desaulniers
2019-08-12 21:50 ` [PATCH 08/16] mips: " Nick Desaulniers
2019-08-15  9:38   ` Paul Burton
2019-08-27  0:19     ` Nick Desaulniers
2019-08-12 21:50 ` [PATCH 09/16] sparc: " Nick Desaulniers
2019-08-12 22:13   ` David Miller
2019-08-12 21:50 ` [PATCH 10/16] powerpc: prefer __section and __printf " Nick Desaulniers
2020-04-01 12:53   ` Michael Ellerman
2020-04-01 13:18     ` Miguel Ojeda
2019-08-12 21:50 ` [PATCH 11/16] x86: prefer __section " Nick Desaulniers
2019-08-19 10:31   ` Thomas Gleixner
2019-08-19 17:59   ` Sedat Dilek [this message]
2019-08-12 21:50 ` [PATCH 12/16] arm64: " Nick Desaulniers
2019-08-13  8:27   ` Will Deacon
2019-08-13 12:36     ` Miguel Ojeda
2019-08-13 17:08       ` Will Deacon
2019-08-14 22:20         ` Nick Desaulniers
2019-08-15  9:08           ` Miguel Ojeda
2019-08-15  9:12             ` Miguel Ojeda
2019-08-23 19:35               ` Miguel Ojeda
2019-08-24 11:25                 ` Will Deacon
2019-08-24 12:48                   ` Miguel Ojeda
2019-08-26 17:03                     ` Nick Desaulniers
2019-08-12 21:50 ` [PATCH 13/16] include/asm-generic: " Nick Desaulniers
2019-08-13  7:57   ` Arnd Bergmann
2019-08-19 17:52   ` Naveen N. Rao
2019-08-19 17:56     ` Sedat Dilek
2019-08-12 21:50 ` [PATCH 14/16] include/linux: " Nick Desaulniers
2019-08-13  8:31   ` Ard Biesheuvel
2019-08-13  8:32   ` Will Deacon
2019-08-24 12:51     ` Miguel Ojeda
2019-08-27  8:21       ` Will Deacon
2019-08-19 18:05   ` Sedat Dilek
2019-08-12 21:50 ` [PATCH 15/16] include/linux/compiler.h: remove unused KENTRY macro Nick Desaulniers
2019-08-19 18:03   ` Sedat Dilek
2019-08-12 21:50 ` [PATCH 16/16] compiler_attributes.h: add note about __section Nick Desaulniers
2019-08-19 18:01   ` Sedat Dilek
2019-08-12 21:50 ` [PATCH 00/16] treewide: prefer __section from compiler_attributes.h Nick Desaulniers
2019-08-13 12:18   ` Miguel Ojeda
2019-08-19 18:18   ` Sedat Dilek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+icZUX=BPPH7rH13OkDzmc1L42hxcWDw+c_G7sf7G8wcHiPAQ@mail.gmail.com' \
    --to=sedat.dilek@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=allison@lohutok.net \
    --cc=armijn@tjaldur.nl \
    --cc=ast@kernel.org \
    --cc=bp@alien8.de \
    --cc=bpf@vger.kernel.org \
    --cc=brijesh.singh@amd.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=daniel@iogearbox.net \
    --cc=frederic@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hare@suse.com \
    --cc=hpa@zytor.com \
    --cc=info@metux.net \
    --cc=jgross@suse.com \
    --cc=jpoimboe@redhat.com \
    --cc=kafai@fb.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mingo@redhat.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=puwen@hygon.cn \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=songliubraving@fb.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).