Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754271AbeAJB0r (ORCPT + 1 other); Tue, 9 Jan 2018 20:26:47 -0500 Received: from mail-pl0-f50.google.com ([209.85.160.50]:37316 "EHLO mail-pl0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbeAJB0p (ORCPT ); Tue, 9 Jan 2018 20:26:45 -0500 X-Google-Smtp-Source: ACJfBovzJqCpDNd1EDue4jGi+q3B2e/WeDIlFHI9YdY5ZHpJMJZ3xt7Ie5Asxnp24kI24/UVg/PhmA== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v1 6/8] x86/entry/clearregs: Add number of arguments to syscall tables From: Andy Lutomirski X-Mailer: iPhone Mail (15C153) In-Reply-To: <20180110010328.22163-7-andi@firstfloor.org> Date: Tue, 9 Jan 2018 17:26:43 -0800 Cc: tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, dwmw@amazon.co.uk, pjt@google.com, luto@kernel.org, peterz@infradead.org, thomas.lendacky@amd.com, tim.c.chen@linux.intel.com, gregkh@linux-foundation.org, dave.hansen@intel.com, jikos@kernel.org, Andi Kleen Content-Transfer-Encoding: 8BIT Message-Id: References: <20180110010328.22163-1-andi@firstfloor.org> <20180110010328.22163-7-andi@firstfloor.org> To: Andi Kleen Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > On Jan 9, 2018, at 5:03 PM, Andi Kleen wrote: > > From: Andi Kleen > > In order to sanitize the system call arguments properly > we need to know the number of syscall arguments for each > syscall. Add a new column to the 32bit and 64bit syscall > tables to list the number of arguments. > Surely we can do this in the SYSCALL_DEFINE macros. Or at least statically check it. Also, what attack are we protecting against anyway?