From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755201AbbAGXSL (ORCPT ); Wed, 7 Jan 2015 18:18:11 -0500 Received: from mga02.intel.com ([134.134.136.20]:45750 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbbAGXSK (ORCPT ); Wed, 7 Jan 2015 18:18:10 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,717,1413270000"; d="scan'208";a="666104746" Message-ID: <54ADBEB1.7000902@linux.intel.com> Date: Wed, 07 Jan 2015 15:18:09 -0800 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Andy Lutomirski CC: Andi Kleen , "linux-kernel@vger.kernel.org" , X86 ML , Thomas Gleixner Subject: Re: [PATCH 3.19 3/3] x86, mpx: Change the MPX enable/disable API to arch_prctl References: <54A64E6D.1020304@linux.intel.com> <87mw5x0xjz.fsf@tassilo.jf.intel.com> <54AAFFA3.6000901@linux.intel.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/05/2015 03:04 PM, Andy Lutomirski wrote: > Anyway, if it's actually a problem to change it, I have no real > problem keeping it, but I think we *really* need to validate the rest > of the arguments at the very least. If we "validate" the arguments like you suggested, then a call like this: prctl(PR_MPX_DISABLE_MANAGEMENT); ends up returning -EINVAL: > prctl(0x2b /* PR_??? */, 0x7fffffd3, 0x7f360955e9e0, 0x2c, 0x7f3609314840) = -1 EINVAL (Invalid argument) A quick grep through ltp and some other source I have laying around does *not* show folks adding 0's to these calls for "empty" arguments. Is this really something we want to do? prctl(PR_MPX_DISABLE_MANAGEMENT, 0, 0, 0, 0);