From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933345AbbBII4b (ORCPT ); Mon, 9 Feb 2015 03:56:31 -0500 Received: from mail-bl2on0141.outbound.protection.outlook.com ([65.55.169.141]:44930 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933073AbbBII4Z (ORCPT ); Mon, 9 Feb 2015 03:56:25 -0500 Message-ID: <54D87624.7080101@freescale.com> Date: Mon, 9 Feb 2015 10:56:04 +0200 From: Purcareata Bogdan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bogdan Purcareata , , , CC: , , Subject: Re: [RFC][PATCH 1/3] powerpc: Don't force ENOSYS as error on syscall fail References: <1423468516-8688-1-git-send-email-bogdan.purcareata@freescale.com> <1423468516-8688-2-git-send-email-bogdan.purcareata@freescale.com> In-Reply-To: <1423468516-8688-2-git-send-email-bogdan.purcareata@freescale.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.88.166.1] X-ClientProxiedBy: DB4PR05CA0012.eurprd05.prod.outlook.com (25.160.40.22) To BL2PR03MB178.namprd03.prod.outlook.com (10.255.230.150) Authentication-Results: linux.vnet.ibm.com; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB178; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004);SRVR:BL2PR03MB178; X-Forefront-PRVS: 04825EA361 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(6049001)(51704005)(24454002)(92566002)(80316001)(23746002)(65956001)(87976001)(2950100001)(66066001)(47776003)(19580405001)(19580395003)(50466002)(2201001)(77096005)(59896002)(33656002)(86362001)(36756003)(42186005)(122386002)(40100003)(77156002)(62966003)(46102003)(87266999)(65816999)(50986999)(54356999)(76176999)(42262002)(2101003);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB178;H:[10.171.74.27];FPR:;SPF:None;MLV:sfv;LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB178; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2015 08:56:21.4110 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB178 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Obvious mistake on my behalf to send the patch with lines commented out. I will fix it in v2. On 09.02.2015 09:55, Bogdan Purcareata wrote: > In certain scenarios - e.g. seccomp filtering with ERRNO as default action - > the system call fails for other reasons than the syscall not being available. > The seccomp filter can be configured to store a user-defined error code on > return from a blacklisted syscall. > > The RFC is this: are there currently any user-space scenarios where it is > required that the system call return ENOSYS as error code on failure, no matter > the circumstances? I don't want to break userspace requirements. I have not > added code to force this error code in situations different than > secure_computing failure, in order to keep overhead at a minimum. > > Signed-off-by: Bogdan Purcareata > --- > arch/powerpc/kernel/entry_32.S | 3 ++- > arch/powerpc/kernel/entry_64.S | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S > index 59848e5..52e48dd 100644 > --- a/arch/powerpc/kernel/entry_32.S > +++ b/arch/powerpc/kernel/entry_32.S > @@ -425,7 +425,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX) > b 1b > #endif /* CONFIG_44x */ > > -66: li r3,-ENOSYS > +66: > +# li r3,-ENOSYS > b ret_from_syscall > > .globl ret_from_fork > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S > index e6bfe8e..80db02e 100644 > --- a/arch/powerpc/kernel/entry_64.S > +++ b/arch/powerpc/kernel/entry_64.S > @@ -269,7 +269,7 @@ syscall_dotrace: > b .Lsyscall_dotrace_cont > > syscall_enosys: > - li r3,-ENOSYS > +# li r3,-ENOSYS > b syscall_exit > > syscall_exit_work: >