Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752642AbdDJQZr (ORCPT ); Mon, 10 Apr 2017 12:25:47 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:51864 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002AbdDJQZq (ORCPT ); Mon, 10 Apr 2017 12:25:46 -0400 Date: Mon, 10 Apr 2017 18:25:44 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: LKML , X86 ML , Peter Zijlstra , Mathias Krause Subject: Re: [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling In-Reply-To: Message-ID: References: <20170410151426.808543816@linutronix.de> <20170410151723.692402894@linutronix.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 644 Lines: 19 On Mon, 10 Apr 2017, Andy Lutomirski wrote: > On Mon, Apr 10, 2017 at 8:14 AM, Thomas Gleixner 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(). Dammit, thought about it and then got lazy. :( Thanks, tglx