From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA48EC433E6 for ; Fri, 10 Jul 2020 16:13:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8ABB120720 for ; Fri, 10 Jul 2020 16:13:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GPNFsUHB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="vmf4H6mN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8ABB120720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RX+Pn2z1lH8BoT68A9kE1b2HFhjkScllA2502n0lGAQ=; b=GPNFsUHBqsXVRIRwDi4ktIRB/ 1Io91leSxsOgSWvzuGXcgE2kqicnK8RZ5gQ35c/uDb7aUh1TgQ1j3UFC/vVFQjSSLmlL7353VlXDZ jiNjFAovC6LBmcpgCmjLFwiEGgFLpXTEyWBBQqlp0g6FjrU0JNwlqsJN1laHtIKQvQ+K6BCmWbWAa yJ1kiaAaqlD9fXNK5xWplhMP48/p3yK8jVw72HjYka/9B6iRFNxE9prXtQEJchLGboq/fm8dFywVJ ouu5Y9EPWyCk3r54HdhQkaAKYHLzt0OU4+t8lvTBsRed/OhGAMBcwVpFEIBuoqPc80cM3HU+6zv8O 8K5jBHVmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtvcz-0007AL-Fp; Fri, 10 Jul 2020 16:11:57 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtvcw-00079v-Uc for linux-arm-kernel@lists.infradead.org; Fri, 10 Jul 2020 16:11:55 +0000 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 BFCF2206F4; Fri, 10 Jul 2020 16:11:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594397514; bh=O43lcqu00Mqg3R5RpXDCJIuIY89pnieebyE6gcqE2Ww=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vmf4H6mNompkjBQS3glhbPZRrZFisyB651Ic/Bj48UCLb0XWuZGTE2tvHIYVVn+gu 72H4wz5AeTabktj+he8CxXkEvy7Ov2TWyROgG7sdQq7g6T1QzT14oc54p/VIHcXvge 3OrwPYEGlSCAxPy/btehtuNsskld5s9+xZh9cW4Y= Date: Fri, 10 Jul 2020 17:11:48 +0100 From: Will Deacon To: Kees Cook Subject: Re: [PATCH v3 6/7] arm64: ptrace: Use NO_SYSCALL instead of -1 in syscall_trace_enter() Message-ID: <20200710161148.GC31036@willie-the-truck> References: <20200710130702.30658-1-will@kernel.org> <20200710130702.30658-7-will@kernel.org> <202007100902.425E50F4D1@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202007100902.425E50F4D1@keescook> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200710_121155_089479_15625FC4 X-CRM114-Status: GOOD ( 15.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Luis Machado , catalin.marinas@arm.com, Keno Fischer , kernel-team@android.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jul 10, 2020 at 09:04:08AM -0700, Kees Cook wrote: > On Fri, Jul 10, 2020 at 02:07:01PM +0100, Will Deacon wrote: > > Setting a system call number of -1 is special, as it indicates that the > > current system call should be skipped. > > > > Use NO_SYSCALL instead of -1 when checking for this scenario, which is > > different from the -1 returned due to a seccomp failure. > > I can't understand this paragraph. NO_SYSCALL is -1, so how is this > "different"? > > arch/arm64/include/asm/ptrace.h:#define NO_SYSCALL (-1) > > Do you just mean "stop using a literal '-1'"? Yes, I'm trying to distinguish '-1' when used as a system call number from '-1' when used as the return value of secure_computing() on failure. It's currently all mixed up, and I think it's confusing trying to realise what is a system call number and what is an error code. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel