[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1415291113.3398.63.camel@decadent.org.uk>
Date: Thu, 06 Nov 2014 16:25:13 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: the arch/x86 maintainers <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][PATCH] x86: Make x32 syscall support conditional on a
kernel parameter
On Thu, 2014-11-06 at 09:02 +0100, Geert Uytterhoeven wrote:
> On Thu, Nov 6, 2014 at 4:53 AM, Ben Hutchings <ben@...adent.org.uk> wrote:
[...]
> > diff --git a/arch/x86/kernel/syscall_64.c b/arch/x86/kernel/syscall_64.c
> > index 4ac730b..7a6e66f 100644
> > --- a/arch/x86/kernel/syscall_64.c
> > +++ b/arch/x86/kernel/syscall_64.c
>
> > +static int __init x32_enable(void)
> > +{
> > + BUG_ON(system_call_fast_compare_end - system_call_fast_compare != 10);
> > + BUG_ON(system_call_trace_compare_end - system_call_trace_compare != 10);
> > + BUG_ON(system_call_mask_compare_end - system_call_mask_compare != 10);
>
> BUILD_BUG_ON
No, these can't be evaluated at compile time because the symbols are
external.
> > +
> > + if (x32_enabled) {
> > + text_poke_early(system_call_fast_compare,
> > + system_call_mask_compare, 10);
> > + text_poke_early(system_call_trace_compare,
> > + system_call_mask_compare, 10);
> > +#ifdef CONFIG_X86_X32_DISABLED
> > + pr_info("Enabled x32 syscalls\n");
> > +#endif
>
> I don't think it hurts to print this unconditionally.
[...]
It seemed like it would be unnecessary noise in an x32-only system.
Ben.
--
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists