Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933162AbbKGXYw (ORCPT ); Sat, 7 Nov 2015 18:24:52 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:63687 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933124AbbKGXYv (ORCPT ); Sat, 7 Nov 2015 18:24:51 -0500 From: Arnd Bergmann To: Octavian Purdila Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, thehajime@gmail.com Subject: Re: [RFC PATCH 08/28] lkl: system call interface and application API Date: Sun, 08 Nov 2015 00:24:42 +0100 Message-ID: <4119283.3hnNZZdIi2@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1446582059-17355-9-git-send-email-octavian.purdila@intel.com> References: <1446582059-17355-1-git-send-email-octavian.purdila@intel.com> <1446582059-17355-9-git-send-email-octavian.purdila@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:gG/Ge2tVi69dgRZssGGhv4nDxPIdxrWkHJoFeauCtl6WbGDlv06 UJyYi9Ll7izwvqAqqR+OwipIHIzwCz8NH71sXSZ4eHFDaH5Kk2eDTN9obuIqMYU5GB+imrJ cBjCPQ5VX1uVDMQt/fnC4k3YTggl7PIlYMCqRa9roi4pXniRTHvpxH2Ld1YDcvUB69dM7Bv 5PtNbPnlOEGM/5Uaeq0aw== X-UI-Out-Filterresults: notjunk:1;V01:K0:eSqOmVrhtDA=:hTyzv0QMZWKXemDIbYWgiD c0Qc6Xq57QArtsmR/qyAodCTo7ZWORk33729vWBF44z4vBmJCmO/klCX3dEmAfXBaHQ+RMGi3 uoK505aRS8JJdmu+6yFY8ryoYfwmh3QRaJYW5aas/BzapRpVs3TMz5WTacFLb7iUd/xEuxD07 Bssbk0qDSM/qfdTltJL+1W3kBM1coceUB0kQGPDXmQYWM5MZ0zgk5G40H/3QWfwzJk4y/PEOx iBIxRNDbFTjKTkJmYdw/ti0Qk5NvkD0kb6JP0u5CeXWZdC0U4eV9pzoit6nSSNhwe8XoH2orh IF/Uj3Z/KvbiPfVmVN41ugvnta8nxejs+RSepnlNZWKk+L3zONyuGR76sNU5LHYrFmqPQAXis UCkXgcOVWFzUScqigL2oUHjamielT7N38W8n69M5S7FCCQcdQhLJ69yeYz9yc/DWrRrQKnd5F e9Gjp11gEioWXSnNdiOhxFWb8YDEQt/5hmYXWgxNBwsdPqolazs10MdN2oB/MQ6o6BeT+EWly ZgUwPDmn/VdOyYBHIFt6ZZhrgKFe+VFpeY5BXBfz/vuGN+xB2/4u4Zig030O3nQ6/yIIt5qjz Pm8du/3aQe2559riUieO7iZqWej19LOyf/WVe/8cFoi4enBYeAhTU1fJ0TtuSrtzDcf8mwPkF dWgm72VHBP3pKml64ctBWefnO0ch1BIEVZwZcj0QxwAVJZZO67SZ0Cido/PuLC+ArYNkC46Cw 5nR+8vZCMznPstlx Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1555 Lines: 49 On Tuesday 03 November 2015 22:20:39 Octavian Purdila wrote: > + > +/* > + * Unsupported system calls due to lack of support in LKL (e.g. related to > + * virtual memory, signal, user processes). We also only support 64bit version > + * of system calls where we have two version to keep the same APi across 32 and > + * 64 bit hosts. > + */ > +#define __NR_restart_syscall 0 > +#define __NR_exit 0 > +#define __NR_fork 0 > +#define __NR_execve 0 > +#define __NR_ptrace 0 > +#define __NR_alarm 0 > +#define __NR_pause 0 Why are these not #undef? > diff --git a/arch/lkl/include/uapi/asm/unistd.h b/arch/lkl/include/uapi/asm/unistd.h > new file mode 100644 > index 0000000..68b5423 > --- /dev/null > +++ b/arch/lkl/include/uapi/asm/unistd.h > @@ -0,0 +1,256 @@ > +#ifndef _ASM_UAPI_LKL_UNISTD_H > +#define _ASM_UAPI_LKL_UNISTD_H > + > +#ifdef __KERNEL__ > +#define __NR_ni_syscall 0 > +#define __NR_reboot 1 > +#endif > +#define __NR_getpid 2 > +#define __NR_write 3 > +#define __NR_close 4 > +#define __NR_unlink 5 > +#define __NR_open 6 > +#define __NR_poll 7 Could you use the standard numbers from include/uapi/asm-generic/unistd.h? Maybe include that header and then #undef the ones you don't support? That would avoid having to assign a new number of each future syscall that gets added. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/