* Fw: next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68)
@ 2020-06-05 1:52 Stephen Rothwell
2020-06-05 8:38 ` Peter Zijlstra
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2020-06-05 1:52 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Ingo Molnar, kernelci.org bot, linux-next
[-- Attachment #1: Type: text/plain, Size: 3031 bytes --]
Commit
a148866489fb ("sched: Replace rq::wake_list")
added
BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) !=
offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist));
in kernel/smp.c. This seems to be failing - at least for gcc-8 (I
haven't seen any failures in my linux-next testing).
The pending-fixes branch in linux-next isjust Linus' tree plus the
branches of fixes for Linus' tree.
Begin forwarded message:
Date: Thu, 04 Jun 2020 18:15:15 -0700 (PDT)
From: "kernelci.org bot" <bot@kernelci.org>
To: linux-next@vger.kernel.org
Subject: next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68)
next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68)
Full Build Summary: https://kernelci.org/build/next/branch/pending-fixes/kernel/v5.7-8671-g086779e58c68/
Tree: next
Branch: pending-fixes
Git Describe: v5.7-8671-g086779e58c68
Git Commit: 086779e58c6867c3f8488d6729e267094a0cd826
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Built: 7 unique architectures
Build Failures Detected:
arm64:
allmodconfig: (gcc-8) FAIL
x86_64:
allmodconfig: (gcc-8) FAIL
Errors summary:
1 include/linux/compiler.h:403:38: error: call to ‘__compiletime_assert_399’ declared with attribute error: BUILD_BUG_ON failed: offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) != offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist)
1 include/linux/compiler.h:403:38: error: call to ‘__compiletime_assert_134’ declared with attribute error: BUILD_BUG_ON failed: offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) != offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist)
--------------------------------------------------------------------------------
allmodconfig (arm64, gcc-8) — FAIL, 1 error, 0 warnings, 0 section mismatches
Errors:
include/linux/compiler.h:403:38: error: call to ‘__compiletime_assert_134’ declared with attribute error: BUILD_BUG_ON failed: offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) != offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist)
--------------------------------------------------------------------------------
allmodconfig (x86_64, gcc-8) — FAIL, 1 error, 0 warnings, 0 section mismatches
Errors:
include/linux/compiler.h:403:38: error: call to ‘__compiletime_assert_399’ declared with attribute error: BUILD_BUG_ON failed: offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) != offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist)
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fw: next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68)
2020-06-05 1:52 Fw: next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68) Stephen Rothwell
@ 2020-06-05 8:38 ` Peter Zijlstra
2020-06-05 14:36 ` Kees Cook
0 siblings, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2020-06-05 8:38 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Ingo Molnar, kernelci.org bot, linux-next
On Fri, Jun 05, 2020 at 11:52:13AM +1000, Stephen Rothwell wrote:
> Commit
>
> a148866489fb ("sched: Replace rq::wake_list")
>
> added
>
> BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) !=
> offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist));
>
> in kernel/smp.c. This seems to be failing - at least for gcc-8 (I
> haven't seen any failures in my linux-next testing).
CONFIG_GCC_PLUGIN_RANDSTRUCT=y
working on it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fw: next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68)
2020-06-05 8:38 ` Peter Zijlstra
@ 2020-06-05 14:36 ` Kees Cook
2020-06-05 14:47 ` Peter Zijlstra
0 siblings, 1 reply; 4+ messages in thread
From: Kees Cook @ 2020-06-05 14:36 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Stephen Rothwell, Ingo Molnar, kernelci.org bot, linux-next
On Fri, Jun 05, 2020 at 10:38:55AM +0200, Peter Zijlstra wrote:
> On Fri, Jun 05, 2020 at 11:52:13AM +1000, Stephen Rothwell wrote:
> > Commit
> >
> > a148866489fb ("sched: Replace rq::wake_list")
> >
> > added
> >
> > BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) !=
> > offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist));
> >
> > in kernel/smp.c. This seems to be failing - at least for gcc-8 (I
> > haven't seen any failures in my linux-next testing).
>
> CONFIG_GCC_PLUGIN_RANDSTRUCT=y
(FWIW, the plugins will only be enabled if the gcc plugins-dev package is
installed)
> working on it.
Either of these solutions should fix it. I'm not sure which is
preferred.
Collect them into a separate anonymous struct to keep them together
under randomization:
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 613bf7a21ae2..0f90239501c8 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -654,8 +654,11 @@ struct task_struct {
unsigned int ptrace;
#ifdef CONFIG_SMP
- struct llist_node wake_entry;
- unsigned int wake_entry_type;
+ /* Keep these members together under __randomize_struct. */
+ struct {
+ struct llist_node wake_entry;
+ unsigned int wake_entry_type;
+ };
int on_cpu;
#ifdef CONFIG_THREAD_INFO_IN_TASK
/* Current CPU: */
or just explicitly move them out of the randomized section:
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 613bf7a21ae2..f97b41ce1b13 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -641,6 +641,10 @@ struct task_struct {
/* -1 unrunnable, 0 runnable, >0 stopped: */
volatile long state;
+#ifdef CONFIG_SMP
+ struct llist_node wake_entry;
+ unsigned int wake_entry_type;
+#endif
/*
* This begins the randomizable portion of task_struct. Only
* scheduling-critical items should be added above here.
@@ -654,8 +658,6 @@ struct task_struct {
unsigned int ptrace;
#ifdef CONFIG_SMP
- struct llist_node wake_entry;
- unsigned int wake_entry_type;
int on_cpu;
#ifdef CONFIG_THREAD_INFO_IN_TASK
/* Current CPU: */
--
Kees Cook
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Fw: next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68)
2020-06-05 14:36 ` Kees Cook
@ 2020-06-05 14:47 ` Peter Zijlstra
0 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2020-06-05 14:47 UTC (permalink / raw)
To: Kees Cook; +Cc: Stephen Rothwell, Ingo Molnar, kernelci.org bot, linux-next
On Fri, Jun 05, 2020 at 07:36:02AM -0700, Kees Cook wrote:
> On Fri, Jun 05, 2020 at 10:38:55AM +0200, Peter Zijlstra wrote:
> > On Fri, Jun 05, 2020 at 11:52:13AM +1000, Stephen Rothwell wrote:
> > > Commit
> > >
> > > a148866489fb ("sched: Replace rq::wake_list")
> > >
> > > added
> > >
> > > BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) !=
> > > offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist));
> > >
> > > in kernel/smp.c. This seems to be failing - at least for gcc-8 (I
> > > haven't seen any failures in my linux-next testing).
> >
> > CONFIG_GCC_PLUGIN_RANDSTRUCT=y
>
> (FWIW, the plugins will only be enabled if the gcc plugins-dev package is
> installed)
Which I hadn't, which is why I'd never seen it. I have now.
> > working on it.
>
> Either of these solutions should fix it. I'm not sure which is
> preferred.
I posted in another thread that had earlier raised the issue:
https://lkml.kernel.org/r/20200605093704.GB2948@hirez.programming.kicks-ass.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-05 14:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 1:52 Fw: next/pending-fixes build: 162 builds: 2 failed, 160 passed, 2 errors, 109 warnings (v5.7-8671-g086779e58c68) Stephen Rothwell
2020-06-05 8:38 ` Peter Zijlstra
2020-06-05 14:36 ` Kees Cook
2020-06-05 14:47 ` Peter Zijlstra
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).