From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965197AbcKWPP4 (ORCPT ); Wed, 23 Nov 2016 10:15:56 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:17991 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936122AbcKWPPx (ORCPT ); Wed, 23 Nov 2016 10:15:53 -0500 X-Greylist: delayed 673 seconds by postgrey-1.27 at vger.kernel.org; Wed, 23 Nov 2016 10:15:53 EST X-IronPort-Anti-Spam-Filtered: false X-IronPort-AV: E=Sophos;i="5.31,538,1473120000"; d="scan'208";a="239375783" From: alexander.levin@verizon.com X-Host: discovery.odc.vzwcorp.com To: Steven Rostedt CC: "dvyukov@google.com" , "tglx@linutronix.de" , "scientist@fb.com" , "glider@google.com" , "andreyknvl@google.com" , "arnd@arndb.de" , "mathieu.desnoyers@efficios.com" , "daniel.vetter@ffwll.ch" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC 1/3] abi_spec: basic definitions of constraints, args and syscalls Thread-Topic: [RFC 1/3] abi_spec: basic definitions of constraints, args and syscalls Thread-Index: AQHSRZq8uxu0rmdLr0eXaTDvGZOYQw== Date: Wed, 23 Nov 2016 15:03:23 +0000 Message-ID: <20161123150330.GE3218@sasha-lappy> References: <1479317803-17220-1-git-send-email-alexander.levin@verizon.com> <1479317803-17220-2-git-send-email-alexander.levin@verizon.com> <20161121104102.2b244311@gandalf.local.home> In-Reply-To: <20161121104102.2b244311@gandalf.local.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mutt/1.5.24 (2015-08-30) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] Content-Type: text/plain; charset="us-ascii" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uANFG0Ax017982 On Mon, Nov 21, 2016 at 10:41:02AM -0500, Steven Rostedt wrote: > On Wed, 16 Nov 2016 17:37:00 +0000 > alexander.levin@verizon.com wrote: > > > This is a very simple definition of the syscall ABI we can build on. The idea > > is to have a generic description of syscalls, their arguments and return > > values we can use to audit the kernel's implementation vs the specs. > > > > Signed-off-by: Sasha Levin > > --- > > include/uapi/linux/abi_spec.h | 58 +++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 58 insertions(+) > > create mode 100644 include/uapi/linux/abi_spec.h > > > > diff --git a/include/uapi/linux/abi_spec.h b/include/uapi/linux/abi_spec.h > > new file mode 100644 > > index 0000000..ad1a992 > > --- /dev/null > > +++ b/include/uapi/linux/abi_spec.h > > @@ -0,0 +1,58 @@ > > +#ifndef ABI_SPEC_H_ > > +#define ABI_SPEC_H_ > > + > > +#include > > +#include > > +#define MAX_CONSTRAINTS 10 > > +#define MAX_ARGS 10 > > + > > I'm curious to where you picked the number 10 from? Actually, I was > doing some work with the syscall_get_arguments() and the max syscall > arguments is currently set to 6. Anything greater causes a bug. It's really just made up, but I wanted it to be higher than 6 because: - The "6" limit is only per-arch, so there might be something that wants more than 6 args? - This should also work for ioctls in the future. -- Thanks, Sasha