Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4605417ybe; Mon, 16 Sep 2019 15:21:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqyt38P7qHIhwnzxjumBOBF4TiM/9p04Vp0W612WBR+Hz+7hL48yb9Spo9tm6KHMZfP+676u X-Received: by 2002:a17:906:4cca:: with SMTP id q10mr2132317ejt.236.1568672465326; Mon, 16 Sep 2019 15:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568672465; cv=none; d=google.com; s=arc-20160816; b=kbrxdQNpmbxwmiP4qeWI3L5miNmcGzZg3kHmNRS4BKUfTRyd8XhPw+0jTCldhsVFGm Hwi6Ve9JvT0bw5YxOR8jm1a835O3tBkIqWf+CSkvOb2yI77PuO2x4+Hl0KwaxmUvjYgT X6kZuFBY835bbBzowKCs0aatJY8rjt46o+DSnGcsStq0cvLUXCpECeKd6GlObZdugCG4 aEIpM6v82SKef3Jy3nPGjE6Kn5xiWrUfmsnb0LGEwGhK6Zlytwsv0M9lf5NOWV1UOtfH 22U4thGMpOTW2iXa7Yq4MYgOJUw3lljzGQ3xKXQwSdjmDXyspPdlRZ467AmCYYxbAt1z 9ejA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=M+0yFM52HVmjaDEr4JFltfiR77N2huDjDgmHFAJOnOU=; b=g7k9pJnvgpyX9bk2pLPFp0EVGpjrNlYKNN0mo/m2QQefSkoPhA+m9y09mRw3i0rPH2 dvq8ZOpJM7ufmxNVL+Q2cqDEZVQp99mhFZaB5w47mG40BewxBhS3H4CfvZXNbvwc5qsd ptdoI+kZkSa3+kYOQbM1JQZL3K2zsQGm4y4bAWHZNqNno4PXbdojnLwUsGLUjMByYgnw Nu9mV1NXxK8Yp428lFhWUGxLbor96Mog7vc8YBmjTJ2PXivPWHEKp6lVplNcX4sjuV9w 76P3xSCnHCp4387bNuVTqnwU9qzJFAQvRCjWZE4Fl4YEBHKGIuHSo51ALoU8GZUDaOp7 Zu8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vpm6TZBp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16si260984edb.341.2019.09.16.15.20.41; Mon, 16 Sep 2019 15:21:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vpm6TZBp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391435AbfIPUnW (ORCPT + 99 others); Mon, 16 Sep 2019 16:43:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:55128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730610AbfIPUnV (ORCPT ); Mon, 16 Sep 2019 16:43:21 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B88920644; Mon, 16 Sep 2019 20:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568666601; bh=xAmdIKxn1vlp7D2ukzr9l0i4qp4XEa+oNjtGZw6WZaw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vpm6TZBpHuTrr8ztMUu/YYPHUYmg7DHismsZGJAUlj5f3XxO1HV5E8pXSsh4prrdr seUB/1cHIFxAu2CVN0s/IryssXDKtLynvuFJdWdy93t+Q2gWQ9bw4Jx6WIFXlxh2MT tgtPh0YgHLcWtayEArECdhSdRFEmlLXc0ZmygRSg= Date: Mon, 16 Sep 2019 21:43:16 +0100 From: Will Deacon To: Andy Lutomirski Cc: Sami Tolvanen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Kees Cook , X86 ML , LKML , will.deacon@arm.com, mark.rutland@arm.com Subject: Re: [PATCH 3/4] x86: use the correct function type for sys_ni_syscall Message-ID: <20190916204315.vtvlddghswbwlfkg@willie-the-truck> References: <20190913210018.125266-1-samitolvanen@google.com> <20190913210018.125266-4-samitolvanen@google.com> <9E76DD0A-7FB0-4BDB-A8B5-920265337ACB@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9E76DD0A-7FB0-4BDB-A8B5-920265337ACB@amacapital.net> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 13, 2019 at 05:27:40PM -0700, Andy Lutomirski wrote: > > On Sep 13, 2019, at 4:26 PM, Sami Tolvanen wrote: > >> On Fri, Sep 13, 2019 at 3:45 PM Andy Lutomirski wrote: > >> Should this be SYSCALL_DEFINE0? > > > > It can be, and that would also fix the issue. However, it does result > > in unnecessary error injection to be hooked up here, which is why > > arm64 preferred to avoid the macro when I fixed it there. S390 uses > > SYSCALL_DEFINE0 for this though and since sys_ni_syscall always > > returns -ENOSYS, it shouldn't be a huge problem. Thoughts? > > > > I don’t see why all syscalls except these few should have error injection > hooked up. It’s also IMO nicer from a maintenance perspective to have all > syscalls use the same macros. > > Will, is there something I’m missing? There was a reasonable request from Mark (CC'd) not to allow error injection for unimplemented system calls, so that's why we took the approach that we did. There was also a vague plan to fix this for everybody [1] but evidently nobody found the time :( Will [1] https://lore.kernel.org/lkml/20190524215821.GA37129@google.com/T/#m6519b2aad06d8c384de1f55256f08687c83d8796