lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVn7ERrXZBbzLZxWFnUhZdXectLMDoVKucte5Zr-U3Mow@mail.gmail.com>
Date:	Thu, 6 Nov 2014 09:02:59 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Ben Hutchings <ben@...adent.org.uk>
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, Nov 6, 2014 at 4:53 AM, Ben Hutchings <ben@...adent.org.uk> wrote:

> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2455,6 +2455,14 @@ config X86_X32
>           elf32_x86_64 support enabled to compile a kernel with this
>           option set.
>
> +config X86_X32_DISABLED
> +       bool "x32 ABI disabled by default"
> +       depends on X86_X32
> +       default n
> +       help
> +         Disable the x32 ABI unless explicitly enabled using the
> +         kernel paramter "syscall.x32=y".

parameter


> 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

> +
> +       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.

> +       }
> +#ifndef CONFIG_X86_X32_DISABLED
> +       else
> +               pr_info("Disabled x32 syscalls\n");
> +#endif
> +
> +       return 0;
> +}
> +late_initcall(x32_enable);
> +
> +#endif

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ