Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1619910

Re: [PATCH] x86/vdso: ensure vdso32_enabled gets set to valid values only

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/vdso: ensure vdso32_enabled gets set to valid values only
Date 2017-04-10 15:20 +0200
Message-ID <tuHoD-18n-47@gated-at.bofh.it> (permalink)
References <tsZSF-7nH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 5 Apr 2017, Mathias Krause wrote:
> @@ -62,13 +64,18 @@ int __init sysenter_setup(void)
>  /* Register vsyscall32 into the ABI table */
>  #include <linux/sysctl.h>
>  
> +static const int zero;
> +static const int one = 1;
> +
>  static struct ctl_table abi_table2[] = {
>  	{
>  		.procname	= "vsyscall32",
>  		.data		= &vdso32_enabled,
>  		.maxlen		= sizeof(int),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec
> +		.proc_handler	= proc_dointvec_minmax,
> +		.extra1		= (int *)&zero,
> +		.extra2		= (int *)&one,

This is still bustable. Let's start with: vdso32_enabled = false

    arch_setup_additional_pages()
	--> No mapping

					sysctl.vsysscall32()
					  --> vdso32_enabled = true

    create_elf_tables()
	if (vdso32_enabled) {
	   --> Add VDSO entry with NULL pointer

The vdso map code needs to store a flag in current which can be checked in
ARCH_DLINFO_IA32.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/vdso: ensure vdso32_enabled gets set to valid values only Mathias Krause <minipli@googlemail.com> - 2017-04-05 22:40 +0200
  Re: [PATCH] x86/vdso: ensure vdso32_enabled gets set to valid values only Andy Lutomirski <luto@kernel.org> - 2017-04-06 18:10 +0200
  Re: [PATCH] x86/vdso: ensure vdso32_enabled gets set to valid values  only Thomas Gleixner <tglx@linutronix.de> - 2017-04-10 15:20 +0200
    Re: [PATCH] x86/vdso: ensure vdso32_enabled gets set to valid values  only Thomas Gleixner <tglx@linutronix.de> - 2017-04-10 15:50 +0200

csiph-web