diff options
author | Daniel Tobias | 2020-05-20 21:43:35 +1000 |
---|---|---|
committer | Daniel Tobias | 2020-05-20 21:45:03 +1000 |
commit | ce13168268716366ee8ccc5b389dbcd485207524 (patch) | |
tree | e91b299456edd4d604d0865426d5fd9344f824f4 | |
parent | 7edc086797c70dfb826d771c0688f6fefabb8b90 (diff) | |
download | aur-ce13168268716366ee8ccc5b389dbcd485207524.tar.gz |
4.19.124, drop GCC10 patches that are now upstream
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | gcc-10-avoid-shadowing-standard-library-free-in-crypto.patch | 87 | ||||
-rw-r--r-- | gcc-10-drop_monitor-work-around-stringop-overflow-wa.patch | 73 | ||||
-rw-r--r-- | gcc-10-netfilter-conntrack-avoid-zero-length-bounds-.patch | 66 | ||||
-rw-r--r-- | gcc-10-warnings-fix-low-hanging-fruit.patch | 50 | ||||
-rw-r--r-- | gcc-10-x86-fix-early-boot-crash-third-try.patch | 144 |
7 files changed, 8 insertions, 448 deletions
@@ -1,7 +1,7 @@ pkgbase = linux-lts419 pkgdesc = LTS 4.19 Linux - pkgver = 4.19.123 - pkgrel = 2 + pkgver = 4.19.124 + pkgrel = 1 url = https://www.kernel.org/ arch = x86_64 license = GPL2 @@ -15,23 +15,13 @@ pkgbase = linux-lts419 makedepends = imagemagick options = !strip source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.19.tar.xz - source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.19.123.xz + source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.19.124.xz source = config source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - source = gcc-10-avoid-shadowing-standard-library-free-in-crypto.patch - source = gcc-10-drop_monitor-work-around-stringop-overflow-wa.patch - source = gcc-10-netfilter-conntrack-avoid-zero-length-bounds-.patch - source = gcc-10-warnings-fix-low-hanging-fruit.patch - source = gcc-10-x86-fix-early-boot-crash-third-try.patch sha256sums = 0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1 - sha256sums = 56f4e052883a0030958bb0abfc54a1a28b3867090c9c8a563c203826deaf1ece + sha256sums = 3f0f43ca3cb4eba7441d57cd3f9bb3d27721f8ffcef2d64469faaff2846f7f95 sha256sums = 4e68572e7cc4c5368f0236e0792660ae8498373988625dca46e509399a7eaea6 sha256sums = a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2 - sha256sums = bf1ece4b16b233283d82d97b478012bfbb72e48604b55f78ce1ac076b0f9bcb4 - sha256sums = 25517134bfb5eba79cea86fcd777a4a6a1d6cbfb2ee57656d8ffc6a910a0dfc3 - sha256sums = ed3d9ee9c55e0b33aa7e4b75305e2d43f94aef071a90c276957e17483334710a - sha256sums = 81193a452440cf2040266ad33d204193176d0079d4ed3f7b92eaf45e0638a976 - sha256sums = 59c0397a8556f518e89a3349e41b9eea983ee7d6e10afc39c9371edefd39a9ae pkgname = linux-lts419 pkgdesc = The LTS 4.19 Linux kernel and modules @@ -3,8 +3,8 @@ pkgbase=linux-lts419 _basever=4.19 _srcname=linux-$_basever -pkgver=${_basever}.123 -pkgrel=2 +pkgver=${_basever}.124 +pkgrel=1 pkgdesc='LTS 4.19 Linux' url="https://www.kernel.org/" arch=(x86_64) @@ -19,11 +19,6 @@ source=( https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-${pkgver}.xz #signature is mising config # the main kernel config file 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - gcc-10-avoid-shadowing-standard-library-free-in-crypto.patch - gcc-10-drop_monitor-work-around-stringop-overflow-wa.patch - gcc-10-netfilter-conntrack-avoid-zero-length-bounds-.patch - gcc-10-warnings-fix-low-hanging-fruit.patch - gcc-10-x86-fix-early-boot-crash-third-try.patch ) #validpgpkeys=( # 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -31,14 +26,9 @@ source=( #) # https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc sha256sums=('0c68f5655528aed4f99dae71a5b259edc93239fa899e2df79c055275c21749a1' - '56f4e052883a0030958bb0abfc54a1a28b3867090c9c8a563c203826deaf1ece' + '3f0f43ca3cb4eba7441d57cd3f9bb3d27721f8ffcef2d64469faaff2846f7f95' '4e68572e7cc4c5368f0236e0792660ae8498373988625dca46e509399a7eaea6' - 'a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2' - 'bf1ece4b16b233283d82d97b478012bfbb72e48604b55f78ce1ac076b0f9bcb4' - '25517134bfb5eba79cea86fcd777a4a6a1d6cbfb2ee57656d8ffc6a910a0dfc3' - 'ed3d9ee9c55e0b33aa7e4b75305e2d43f94aef071a90c276957e17483334710a' - '81193a452440cf2040266ad33d204193176d0079d4ed3f7b92eaf45e0638a976' - '59c0397a8556f518e89a3349e41b9eea983ee7d6e10afc39c9371edefd39a9ae') + 'a13581d3c6dc595206e4fe7fcf6b542e7a1bdbe96101f0f010fc5be49f99baf2') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase diff --git a/gcc-10-avoid-shadowing-standard-library-free-in-crypto.patch b/gcc-10-avoid-shadowing-standard-library-free-in-crypto.patch deleted file mode 100644 index e556f3f92262..000000000000 --- a/gcc-10-avoid-shadowing-standard-library-free-in-crypto.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 1a263ae60b04de959d9ce9caea4889385eefcc7b Mon Sep 17 00:00:00 2001 -From: Linus Torvalds <torvalds@linux-foundation.org> -Date: Sat, 9 May 2020 15:58:04 -0700 -Subject: gcc-10: avoid shadowing standard library 'free()' in crypto -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Linus Torvalds <torvalds@linux-foundation.org> - -commit 1a263ae60b04de959d9ce9caea4889385eefcc7b upstream. - -gcc-10 has started warning about conflicting types for a few new -built-in functions, particularly 'free()'. - -This results in warnings like: - - crypto/xts.c:325:13: warning: conflicting types for built-in function ‘free’; expected ‘void(void *)’ [-Wbuiltin-declaration-mismatch] - -because the crypto layer had its local freeing functions called -'free()'. - -Gcc-10 is in the wrong here, since that function is marked 'static', and -thus there is no chance of confusion with any standard library function -namespace. - -But the simplest thing to do is to just use a different name here, and -avoid this gcc mis-feature. - -[ Side note: gcc knowing about 'free()' is in itself not the - mis-feature: the semantics of 'free()' are special enough that a - compiler can validly do special things when seeing it. - - So the mis-feature here is that gcc thinks that 'free()' is some - restricted name, and you can't shadow it as a local static function. - - Making the special 'free()' semantics be a function attribute rather - than tied to the name would be the much better model ] - -Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - crypto/lrw.c | 4 ++-- - crypto/xts.c | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - ---- a/crypto/lrw.c -+++ b/crypto/lrw.c -@@ -453,7 +453,7 @@ static void exit_tfm(struct crypto_skcip - crypto_free_skcipher(ctx->child); - } - --static void free(struct skcipher_instance *inst) -+static void free_inst(struct skcipher_instance *inst) - { - crypto_drop_skcipher(skcipher_instance_ctx(inst)); - kfree(inst); -@@ -565,7 +565,7 @@ static int create(struct crypto_template - inst->alg.encrypt = encrypt; - inst->alg.decrypt = decrypt; - -- inst->free = free; -+ inst->free = free_inst; - - err = skcipher_register_instance(tmpl, inst); - if (err) ---- a/crypto/xts.c -+++ b/crypto/xts.c -@@ -393,7 +393,7 @@ static void exit_tfm(struct crypto_skcip - crypto_free_cipher(ctx->tweak); - } - --static void free(struct skcipher_instance *inst) -+static void free_inst(struct skcipher_instance *inst) - { - crypto_drop_skcipher(skcipher_instance_ctx(inst)); - kfree(inst); -@@ -504,7 +504,7 @@ static int create(struct crypto_template - inst->alg.encrypt = encrypt; - inst->alg.decrypt = decrypt; - -- inst->free = free; -+ inst->free = free_inst; - - err = skcipher_register_instance(tmpl, inst); - if (err) diff --git a/gcc-10-drop_monitor-work-around-stringop-overflow-wa.patch b/gcc-10-drop_monitor-work-around-stringop-overflow-wa.patch deleted file mode 100644 index 8aaeaf34bf69..000000000000 --- a/gcc-10-drop_monitor-work-around-stringop-overflow-wa.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 440d43ac6705396c96694a30847a6728da79a76d Mon Sep 17 00:00:00 2001 -From: Sasha Levin <sashal@kernel.org> -Date: Thu, 30 Apr 2020 23:30:49 +0200 -Subject: drop_monitor: work around gcc-10 stringop-overflow warning - -From: Arnd Bergmann <arnd@arndb.de> - -[ Upstream commit dc30b4059f6e2abf3712ab537c8718562b21c45d ] - -The current gcc-10 snapshot produces a false-positive warning: - -net/core/drop_monitor.c: In function 'trace_drop_common.constprop': -cc1: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=] -In file included from net/core/drop_monitor.c:23: -include/uapi/linux/net_dropmon.h:36:8: note: at offset 0 to object 'entries' with size 4 declared here - 36 | __u32 entries; - | ^~~~~~~ - -I reported this in the gcc bugzilla, but in case it does not get -fixed in the release, work around it by using a temporary variable. - -Fixes: 9a8afc8d3962 ("Network Drop Monitor: Adding drop monitor implementation & Netlink protocol") -Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94881 -Signed-off-by: Arnd Bergmann <arnd@arndb.de> -Acked-by: Neil Horman <nhorman@tuxdriver.com> -Signed-off-by: David S. Miller <davem@davemloft.net> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - net/core/drop_monitor.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c -index c7785efeea577..3978a5e8d261c 100644 ---- a/net/core/drop_monitor.c -+++ b/net/core/drop_monitor.c -@@ -154,6 +154,7 @@ static void sched_send_work(struct timer_list *t) - static void trace_drop_common(struct sk_buff *skb, void *location) - { - struct net_dm_alert_msg *msg; -+ struct net_dm_drop_point *point; - struct nlmsghdr *nlh; - struct nlattr *nla; - int i; -@@ -172,11 +173,13 @@ static void trace_drop_common(struct sk_buff *skb, void *location) - nlh = (struct nlmsghdr *)dskb->data; - nla = genlmsg_data(nlmsg_data(nlh)); - msg = nla_data(nla); -+ point = msg->points; - for (i = 0; i < msg->entries; i++) { -- if (!memcmp(&location, msg->points[i].pc, sizeof(void *))) { -- msg->points[i].count++; -+ if (!memcmp(&location, &point->pc, sizeof(void *))) { -+ point->count++; - goto out; - } -+ point++; - } - if (msg->entries == dm_hit_limit) - goto out; -@@ -185,8 +188,8 @@ static void trace_drop_common(struct sk_buff *skb, void *location) - */ - __nla_reserve_nohdr(dskb, sizeof(struct net_dm_drop_point)); - nla->nla_len += NLA_ALIGN(sizeof(struct net_dm_drop_point)); -- memcpy(msg->points[msg->entries].pc, &location, sizeof(void *)); -- msg->points[msg->entries].count = 1; -+ memcpy(point->pc, &location, sizeof(void *)); -+ point->count = 1; - msg->entries++; - - if (!timer_pending(&data->send_timer)) { --- -2.20.1 - diff --git a/gcc-10-netfilter-conntrack-avoid-zero-length-bounds-.patch b/gcc-10-netfilter-conntrack-avoid-zero-length-bounds-.patch deleted file mode 100644 index 7f2817624be3..000000000000 --- a/gcc-10-netfilter-conntrack-avoid-zero-length-bounds-.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 81a29e2184eb24bc468233eacc09e59dadf0c95d Mon Sep 17 00:00:00 2001 -From: Sasha Levin <sashal@kernel.org> -Date: Thu, 30 Apr 2020 23:30:48 +0200 -Subject: netfilter: conntrack: avoid gcc-10 zero-length-bounds warning - -From: Arnd Bergmann <arnd@arndb.de> - -[ Upstream commit 2c407aca64977ede9b9f35158e919773cae2082f ] - -gcc-10 warns around a suspicious access to an empty struct member: - -net/netfilter/nf_conntrack_core.c: In function '__nf_conntrack_alloc': -net/netfilter/nf_conntrack_core.c:1522:9: warning: array subscript 0 is outside the bounds of an interior zero-length array 'u8[0]' {aka 'unsigned char[0]'} [-Wzero-length-bounds] - 1522 | memset(&ct->__nfct_init_offset[0], 0, - | ^~~~~~~~~~~~~~~~~~~~~~~~~~ -In file included from net/netfilter/nf_conntrack_core.c:37: -include/net/netfilter/nf_conntrack.h:90:5: note: while referencing '__nfct_init_offset' - 90 | u8 __nfct_init_offset[0]; - | ^~~~~~~~~~~~~~~~~~ - -The code is correct but a bit unusual. Rework it slightly in a way that -does not trigger the warning, using an empty struct instead of an empty -array. There are probably more elegant ways to do this, but this is the -smallest change. - -Fixes: c41884ce0562 ("netfilter: conntrack: avoid zeroing timer") -Signed-off-by: Arnd Bergmann <arnd@arndb.de> -Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> -Signed-off-by: Sasha Levin <sashal@kernel.org> ---- - include/net/netfilter/nf_conntrack.h | 2 +- - net/netfilter/nf_conntrack_core.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h -index f45141bdbb837..ac4d70aeee129 100644 ---- a/include/net/netfilter/nf_conntrack.h -+++ b/include/net/netfilter/nf_conntrack.h -@@ -85,7 +85,7 @@ struct nf_conn { - struct hlist_node nat_bysource; - #endif - /* all members below initialized via memset */ -- u8 __nfct_init_offset[0]; -+ struct { } __nfct_init_offset; - - /* If we were expected by an expectation, this will be it */ - struct nf_conn *master; -diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c -index c6073d17c3244..ad1da6b2fb607 100644 ---- a/net/netfilter/nf_conntrack_core.c -+++ b/net/netfilter/nf_conntrack_core.c -@@ -1352,9 +1352,9 @@ __nf_conntrack_alloc(struct net *net, - *(unsigned long *)(&ct->tuplehash[IP_CT_DIR_REPLY].hnnode.pprev) = hash; - ct->status = 0; - write_pnet(&ct->ct_net, net); -- memset(&ct->__nfct_init_offset[0], 0, -+ memset(&ct->__nfct_init_offset, 0, - offsetof(struct nf_conn, proto) - -- offsetof(struct nf_conn, __nfct_init_offset[0])); -+ offsetof(struct nf_conn, __nfct_init_offset)); - - nf_ct_zone_add(ct, zone); - --- -2.20.1 - diff --git a/gcc-10-warnings-fix-low-hanging-fruit.patch b/gcc-10-warnings-fix-low-hanging-fruit.patch deleted file mode 100644 index a8a51ee681f0..000000000000 --- a/gcc-10-warnings-fix-low-hanging-fruit.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 9d82973e032e246ff5663c9805fbb5407ae932e3 Mon Sep 17 00:00:00 2001 -From: Linus Torvalds <torvalds@linux-foundation.org> -Date: Mon, 4 May 2020 09:16:37 -0700 -Subject: gcc-10 warnings: fix low-hanging fruit - -From: Linus Torvalds <torvalds@linux-foundation.org> - -commit 9d82973e032e246ff5663c9805fbb5407ae932e3 upstream. - -Due to a bug-report that was compiler-dependent, I updated one of my -machines to gcc-10. That shows a lot of new warnings. Happily they -seem to be mostly the valid kind, but it's going to cause a round of -churn for getting rid of them.. - -This is the really low-hanging fruit of removing a couple of zero-sized -arrays in some core code. We have had a round of these patches before, -and we'll have many more coming, and there is nothing special about -these except that they were particularly trivial, and triggered more -warnings than most. - -Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - include/linux/fs.h | 2 +- - include/linux/tty.h | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - ---- a/include/linux/fs.h -+++ b/include/linux/fs.h -@@ -934,7 +934,7 @@ struct file_handle { - __u32 handle_bytes; - int handle_type; - /* file identifier */ -- unsigned char f_handle[0]; -+ unsigned char f_handle[]; - }; - - static inline struct file *get_file(struct file *f) ---- a/include/linux/tty.h -+++ b/include/linux/tty.h -@@ -66,7 +66,7 @@ struct tty_buffer { - int read; - int flags; - /* Data points here */ -- unsigned long data[0]; -+ unsigned long data[]; - }; - - /* Values for .flags field of tty_buffer */ diff --git a/gcc-10-x86-fix-early-boot-crash-third-try.patch b/gcc-10-x86-fix-early-boot-crash-third-try.patch deleted file mode 100644 index df7fb67304c7..000000000000 --- a/gcc-10-x86-fix-early-boot-crash-third-try.patch +++ /dev/null @@ -1,144 +0,0 @@ -From a9a3ed1eff3601b63aea4fb462d8b3b92c7c1e7e Mon Sep 17 00:00:00 2001 -From: Borislav Petkov <bp@suse.de> -Date: Wed, 22 Apr 2020 18:11:30 +0200 -Subject: x86: Fix early boot crash on gcc-10, third try -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Borislav Petkov <bp@suse.de> - -commit a9a3ed1eff3601b63aea4fb462d8b3b92c7c1e7e upstream. - -... or the odyssey of trying to disable the stack protector for the -function which generates the stack canary value. - -The whole story started with Sergei reporting a boot crash with a kernel -built with gcc-10: - - Kernel panic — not syncing: stack-protector: Kernel stack is corrupted in: start_secondary - CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.6.0-rc5—00235—gfffb08b37df9 #139 - Hardware name: Gigabyte Technology Co., Ltd. To be filled by O.E.M./H77M—D3H, BIOS F12 11/14/2013 - Call Trace: - dump_stack - panic - ? start_secondary - __stack_chk_fail - start_secondary - secondary_startup_64 - -—-[ end Kernel panic — not syncing: stack—protector: Kernel stack is corrupted in: start_secondary - -This happens because gcc-10 tail-call optimizes the last function call -in start_secondary() - cpu_startup_entry() - and thus emits a stack -canary check which fails because the canary value changes after the -boot_init_stack_canary() call. - -To fix that, the initial attempt was to mark the one function which -generates the stack canary with: - - __attribute__((optimize("-fno-stack-protector"))) ... start_secondary(void *unused) - -however, using the optimize attribute doesn't work cumulatively -as the attribute does not add to but rather replaces previously -supplied optimization options - roughly all -fxxx options. - -The key one among them being -fno-omit-frame-pointer and thus leading to -not present frame pointer - frame pointer which the kernel needs. - -The next attempt to prevent compilers from tail-call optimizing -the last function call cpu_startup_entry(), shy of carving out -start_secondary() into a separate compilation unit and building it with --fno-stack-protector, was to add an empty asm(""). - -This current solution was short and sweet, and reportedly, is supported -by both compilers but we didn't get very far this time: future (LTO?) -optimization passes could potentially eliminate this, which leads us -to the third attempt: having an actual memory barrier there which the -compiler cannot ignore or move around etc. - -That should hold for a long time, but hey we said that about the other -two solutions too so... - -Reported-by: Sergei Trofimovich <slyfox@gentoo.org> -Signed-off-by: Borislav Petkov <bp@suse.de> -Tested-by: Kalle Valo <kvalo@codeaurora.org> -Cc: <stable@vger.kernel.org> -Link: https://lkml.kernel.org/r/20200314164451.346497-1-slyfox@gentoo.org -Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> - ---- - arch/x86/include/asm/stackprotector.h | 7 ++++++- - arch/x86/kernel/smpboot.c | 8 ++++++++ - arch/x86/xen/smp_pv.c | 1 + - include/linux/compiler.h | 6 ++++++ - init/main.c | 2 ++ - 5 files changed, 23 insertions(+), 1 deletion(-) - ---- a/arch/x86/include/asm/stackprotector.h -+++ b/arch/x86/include/asm/stackprotector.h -@@ -55,8 +55,13 @@ - /* - * Initialize the stackprotector canary value. - * -- * NOTE: this must only be called from functions that never return, -+ * NOTE: this must only be called from functions that never return - * and it must always be inlined. -+ * -+ * In addition, it should be called from a compilation unit for which -+ * stack protector is disabled. Alternatively, the caller should not end -+ * with a function call which gets tail-call optimized as that would -+ * lead to checking a modified canary value. - */ - static __always_inline void boot_init_stack_canary(void) - { ---- a/arch/x86/kernel/smpboot.c -+++ b/arch/x86/kernel/smpboot.c -@@ -269,6 +269,14 @@ static void notrace start_secondary(void - - wmb(); - cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); -+ -+ /* -+ * Prevent tail call to cpu_startup_entry() because the stack protector -+ * guard has been changed a couple of function calls up, in -+ * boot_init_stack_canary() and must not be checked before tail calling -+ * another function. -+ */ -+ prevent_tail_call_optimization(); - } - - /** ---- a/arch/x86/xen/smp_pv.c -+++ b/arch/x86/xen/smp_pv.c -@@ -89,6 +89,7 @@ asmlinkage __visible void cpu_bringup_an - { - cpu_bringup(); - cpu_startup_entry(CPUHP_AP_ONLINE_IDLE); -+ prevent_tail_call_optimization(); - } - - void xen_smp_intr_free_pv(unsigned int cpu) ---- a/include/linux/compiler.h -+++ b/include/linux/compiler.h -@@ -351,4 +351,10 @@ static inline void *offset_to_ptr(const - compiletime_assert(__native_word(t), \ - "Need native word sized stores/loads for atomicity.") - -+/* -+ * This is needed in functions which generate the stack canary, see -+ * arch/x86/kernel/smpboot.c::start_secondary() for an example. -+ */ -+#define prevent_tail_call_optimization() mb() -+ - #endif /* __LINUX_COMPILER_H */ ---- a/init/main.c -+++ b/init/main.c -@@ -735,6 +735,8 @@ asmlinkage __visible void __init start_k - - /* Do the rest non-__init'ed, we're now alive */ - rest_init(); -+ -+ prevent_tail_call_optimization(); - } - - /* Call all constructor functions linked into the kernel. */ |