From: Kees Cook <keescook@chromium.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Guenter Roeck <groeck@google.com>,
kernelci@groups.io,
Guillaume Tucker <guillaume.tucker@collabora.com>,
Mike Rapoport <rppt@linux.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>, Mark Brown <broonie@kernel.org>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
Matt Hart <matthew.hart@linaro.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Kevin Hilman <khilman@baylibre.com>,
Enric Balletbo i Serra <enric.balletbo@collabora.com>,
Nicholas Piggin <npiggin@gmail.com>,
Dominik Brodowski <linux@dominikbrodowski.net>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Adrian Reber <adrian@lisas.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Linux MM <linux-mm@kvack.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Richard Guy Briggs <rgb@redhat.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
info@kernelci.org
Subject: Re: next/master boot bisection: next-20190215 on beaglebone-black
Date: Tue, 16 Apr 2019 22:30:53 -0500 [thread overview]
Message-ID: <CAGXu5jL=QibF4GLC6uy9pUoXLxVwXZ7X-PPr5v9nAw01h8bKZg@mail.gmail.com> (raw)
In-Reply-To: <CABXOdTeu0WTv9b+0eLHC+0K+HdNQsRTAUaWyxXAbKxQyy_19PQ@mail.gmail.com>
On Tue, Apr 16, 2019 at 4:04 PM Guenter Roeck <groeck@google.com> wrote:
>
> On Tue, Apr 16, 2019 at 1:37 PM Dan Williams <dan.j.williams@intel.com> wrote:
> > Ah, no, the problem is that jump_label_init() is called by
> > setup_arch() on x86, and smp_prepare_boot_cpu() on powerpc, but not
> > until after parse_args() on ARM.
> >
> Anywhere but arm64, x86, and ppc, really.
>
> $ git grep jump_label_init arch
> arch/arm64/kernel/smp.c: jump_label_init();
> arch/powerpc/lib/feature-fixups.c: jump_label_init();
> arch/x86/kernel/setup.c: jump_label_init();
Oooh, nice. Yeah, so, this is already a bug for "hardened_usercopy=0"
which sets static branches too.
> > Given it appears to be safe to call jump_label_init() early how about
> > something like the following?
> >
> > diff --git a/init/main.c b/init/main.c
> > index 598e278b46f7..7d4025d665eb 100644
> > --- a/init/main.c
> > +++ b/init/main.c
> > @@ -582,6 +582,8 @@ asmlinkage __visible void __init start_kernel(void)
> > page_alloc_init();
> >
> > pr_notice("Kernel command line: %s\n", boot_command_line);
> > + /* parameters may set static keys */
> > + jump_label_init();
> > parse_early_param();
> > after_dashes = parse_args("Booting kernel",
> > static_command_line, __start___param,
> > @@ -591,8 +593,6 @@ asmlinkage __visible void __init start_kernel(void)
> > parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
> > NULL, set_init_arg);
> >
> > - jump_label_init();
> > -
>
> That should work, unless there was a reason to have it that late. It
> doesn't look like that was the case, but I may be missing something.
Yes please. :) Let's fix it like you've suggested.
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
next prev parent reply other threads:[~2019-04-17 3:36 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 18:20 kernelci.org bot
2019-02-15 18:43 ` Andrew Morton
2019-02-15 18:51 ` Mark Brown
2019-02-15 19:00 ` Andrew Morton
2019-02-16 6:21 ` Stephen Rothwell
2019-02-26 23:59 ` Andrew Morton
2019-02-27 0:04 ` Dan Williams
2019-02-28 23:14 ` Andrew Morton
2019-02-28 23:55 ` Dan Williams
2019-03-01 8:25 ` Guillaume Tucker
2019-03-01 10:40 ` Mike Rapoport
2019-03-01 11:49 ` Mark Brown
2019-03-01 20:41 ` Andrew Morton
2019-03-01 21:04 ` Guillaume Tucker
2019-03-01 23:23 ` Dan Williams
2019-03-06 10:14 ` Guillaume Tucker
2019-03-06 14:05 ` Mike Rapoport
2019-03-07 9:16 ` Guillaume Tucker
2019-03-07 15:43 ` Dan Williams
2019-04-10 22:52 ` Kees Cook
2019-04-11 16:42 ` Guenter Roeck
2019-04-11 17:35 ` Kees Cook
2019-04-11 20:08 ` Guenter Roeck
2019-04-11 20:22 ` Dan Williams
2019-04-11 20:53 ` Guenter Roeck
2019-04-16 18:54 ` Dan Williams
2019-04-16 19:17 ` Mathieu Desnoyers
2019-04-16 19:25 ` Mathieu Desnoyers
2019-04-16 19:45 ` Mathieu Desnoyers
2019-04-16 19:33 ` Guenter Roeck
2019-04-16 20:37 ` Dan Williams
2019-04-16 21:04 ` Guenter Roeck
2019-04-17 3:30 ` Kees Cook [this message]
2019-04-16 20:05 ` Mathieu Desnoyers
2019-04-11 20:49 ` Mike Rapoport
2019-03-01 11:45 ` Mark Brown
2019-03-01 9:02 ` Vlastimil Babka
2019-02-18 9:44 ` Michal Hocko
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='CAGXu5jL=QibF4GLC6uy9pUoXLxVwXZ7X-PPr5v9nAw01h8bKZg@mail.gmail.com' \
--to=keescook@chromium.org \
--cc=adrian@lisas.de \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=enric.balletbo@collabora.com \
--cc=groeck@google.com \
--cc=guillaume.tucker@collabora.com \
--cc=hannes@cmpxchg.org \
--cc=info@kernelci.org \
--cc=kernelci@groups.io \
--cc=khilman@baylibre.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@dominikbrodowski.net \
--cc=mathieu.desnoyers@efficios.com \
--cc=matthew.hart@linaro.org \
--cc=mhocko@suse.com \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rgb@redhat.com \
--cc=rppt@linux.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=tomeu.vizoso@collabora.com \
--cc=yamada.masahiro@socionext.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