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


Groups > linux.kernel > #1620132

Re: [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling
Date 2017-04-10 18:00 +0200
Message-ID <tuJTu-2D4-65@gated-at.bofh.it> (permalink)
References <tuJgJ-2nZ-1@gated-at.bofh.it> <tuJgK-2nZ-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Apr 10, 2017 at 8:14 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> +static int vdso32_sysctl;
> +
> +static int vdso_update_handler(struct ctl_table *table, int write,
> +                              void __user *buffer, size_t *lenp,
> +                              loff_t *ppos)
> +{
> +       int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);

Using a global for the temporary is gross and mildly racy.  I would
just open-code the conversion.  Or, even better, add proc_dobool().

I'm not convinced that the current patch is a cleanup.

--Andy

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


Thread

[patch 0/3] x86/vdso: Fix enable inconsistencies and cleanup Thomas Gleixner <tglx@linutronix.de> - 2017-04-10 17:20 +0200
  [patch 2/3] x86/vdso: Plug race between mapping and ELF header setup Thomas Gleixner <tglx@linutronix.de> - 2017-04-10 17:20 +0200
    Re: [patch 2/3] x86/vdso: Plug race between mapping and ELF header setup Andy Lutomirski <luto@amacapital.net> - 2017-04-10 18:00 +0200
    [tip:x86/urgent] x86/vdso: Plug race between mapping and ELF header  setup tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-04-10 20:00 +0200
  [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling Thomas Gleixner <tglx@linutronix.de> - 2017-04-10 17:20 +0200
    Re: [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling Andy Lutomirski <luto@amacapital.net> - 2017-04-10 18:00 +0200
      Re: [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling Thomas Gleixner <tglx@linutronix.de> - 2017-04-10 18:30 +0200
  [patch 1/3] x86/vdso: Ensure vdso32_enabled gets set to valid values  only Thomas Gleixner <tglx@linutronix.de> - 2017-04-10 17:20 +0200
    [tip:x86/urgent] x86/vdso: Ensure vdso32_enabled gets set to valid  values only tip-bot for Mathias Krause <tipbot@zytor.com> - 2017-04-10 18:40 +0200

csiph-web