+ linux-inith-include-linux-build_bugh-and-linux-stringifyh.patch added to mm-nonmm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: linux/init.h: include <linux/build_bug.h> and <linux/stringify.h>
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     linux-inith-include-linux-build_bugh-and-linux-stringifyh.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/linux-inith-include-linux-build_bugh-and-linux-stringifyh.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Subject: linux/init.h: include <linux/build_bug.h> and <linux/stringify.h>
Date: Sun, 13 Nov 2022 20:08:02 +0900

With CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y, the following code fails to
build:

  ---------------->8----------------
  #include <linux/init.h>

  int foo(void) { return 0; }
  core_initcall(foo);
  ---------------->8----------------

Include <linux/build_bug.h> for static_assert() and <linux/stringify.h>
for __stringify().

Link: https://lkml.kernel.org/r/20221113110802.3760705-1-masahiroy@xxxxxxxxxx
Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Cc: Jiangshan Yi <yijiangshan@xxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> # build-tested
Cc: Sami Tolvanen <samitolvanen@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/init.h |    2 ++
 1 file changed, 2 insertions(+)

--- a/include/linux/init.h~linux-inith-include-linux-build_bugh-and-linux-stringifyh
+++ a/include/linux/init.h
@@ -2,7 +2,9 @@
 #ifndef _LINUX_INIT_H
 #define _LINUX_INIT_H
 
+#include <linux/build_bug.h>
 #include <linux/compiler.h>
+#include <linux/stringify.h>
 #include <linux/types.h>
 
 /* Built-in __init functions needn't be compiled with retpoline */
_

Patches currently in -mm which might be from masahiroy@xxxxxxxxxx are

linux-inith-include-linux-build_bugh-and-linux-stringifyh.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux