All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, X86 ML <x86@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Mathias Krause <minipli@googlemail.com>
Subject: Re: [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling
Date: Mon, 10 Apr 2017 08:55:42 -0700	[thread overview]
Message-ID: <CALCETrU2JOa0Roz_-Vtpq_NZJNFPf-fY=JxeZ+nsA0BMRqtHCg@mail.gmail.com> (raw)
In-Reply-To: <20170410151723.692402894@linutronix.de>

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

  reply	other threads:[~2017-04-10 15:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 15:14 [patch 0/3] x86/vdso: Fix enable inconsistencies and cleanup Thomas Gleixner
2017-04-10 15:14 ` [patch 1/3] x86/vdso: Ensure vdso32_enabled gets set to valid values only Thomas Gleixner
2017-04-10 16:34   ` [tip:x86/urgent] " tip-bot for Mathias Krause
2017-04-10 15:14 ` [patch 2/3] x86/vdso: Plug race between mapping and ELF header setup Thomas Gleixner
2017-04-10 15:56   ` Andy Lutomirski
2017-04-10 16:34   ` [tip:x86/urgent] " tip-bot for Thomas Gleixner
2017-04-10 15:14 ` [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling Thomas Gleixner
2017-04-10 15:55   ` Andy Lutomirski [this message]
2017-04-10 16:25     ` Thomas Gleixner
  -- strict thread matches above, loose matches on Subject: below --
2017-04-05 20:36 [PATCH] x86/vdso: ensure vdso32_enabled gets set to valid values only Mathias Krause
2017-04-06 15:59 ` Andy Lutomirski
2017-04-10 13:13 ` Thomas Gleixner
2017-04-10 13:41   ` Thomas Gleixner

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='CALCETrU2JOa0Roz_-Vtpq_NZJNFPf-fY=JxeZ+nsA0BMRqtHCg@mail.gmail.com' \
    --to=luto@amacapital.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minipli@googlemail.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.