Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3107849pxk; Tue, 15 Sep 2020 10:12:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgbx0oew0uv36kufMejtKF8tuqiviFv2e+nESVZZcFznjX+VVbEzJom13tPZ2vQpD4bNrn X-Received: by 2002:a50:fd87:: with SMTP id o7mr23009550edt.180.1600189962378; Tue, 15 Sep 2020 10:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600189962; cv=none; d=google.com; s=arc-20160816; b=ymwsjO60DAwNupyb9OdxnfpN5IoS9sP5Ta/F8/weredcBX0vEEN2EOkxbLpWjYQO2D zu9ehGdCZXuzWKx2jyPZOdB1BS0X4Xqr1uTDprs5uILn5Xhnziu3AYf4EWfuzA6XZQK9 yWuQ8Vc4Szc7DvStpdaeN/+hEu0I7Cp868PNS7aGgSYRMigOPp1pr7KHxuJd4/qP/80M YJ8CorTGT1loLtYrzTmYnW2BvGOlsFMZ/3wNVh62Kd/k8BA8dzeonCWhUd+w0YK66HGM ZPjxKoqZkfjlXYFUQXoWiVjjaXj02S+nurXROLSRUBSlPfwWAoEDfGPgckVbEI9w/dSI OSkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=hQIYcVcfAYlIFbfqyjHqcKle6ea8CWwQJdsqrF2At1E=; b=caGLE89yQAvsxe77Xq4sXU2l4fW03DdQvArtNkIdW/JtNUd1X+flD/nDjwzsdI9YJD x4rxg5SqjwJQ85m2/E5R4PuPJXWYIEBai2DH3D4b2zvBSvHa2LQUle5BncGfzY2TjXje 9R/1fHZp3kY7uvQzCd+SmQSh7aX1Y/5aOweUBNi6s1/zHW+hhjJAX3ha2pTNFCCx5Pl3 s5IGivTd6QxkGs3S9LnRq0hr6+EEf+P2wEnfyga/wF43Xg4/f5vqJA0SioU5Da8+LYpY 5lWHwNjD319Vsl0OPfeVq9L1B7Pd5iyfmRpOXFPzyzBG5gpQiNjAZwlFs/Kx3t9PXf22 YKIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p10si9901259edh.108.2020.09.15.10.11.55; Tue, 15 Sep 2020 10:12:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbgIORH1 (ORCPT + 99 others); Tue, 15 Sep 2020 13:07:27 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49527 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727658AbgIOQWP (ORCPT ); Tue, 15 Sep 2020 12:22:15 -0400 Received: from ip5f5af089.dynamic.kabel-deutschland.de ([95.90.240.137] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kIDYD-0007Hd-J1; Tue, 15 Sep 2020 16:11:25 +0000 Date: Tue, 15 Sep 2020 18:11:24 +0200 From: Christian Brauner To: Kees Cook Cc: linux-kernel@vger.kernel.org, Thadeu Lima de Souza Cascardo , Max Filippov , Michael Ellerman , Christian Brauner , Andy Lutomirski , Will Drewry , linux-kselftest@vger.kernel.org, linux-mips@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 11/15] selftests/seccomp: Remove SYSCALL_NUM_RET_SHARE_REG in favor of SYSCALL_RET_SET Message-ID: <20200915161124.oqgoiegni3jqwtno@wittgenstein> References: <20200912110820.597135-1-keescook@chromium.org> <20200912110820.597135-12-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200912110820.597135-12-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 12, 2020 at 04:08:16AM -0700, Kees Cook wrote: > Instead of special-casing the specific case of shared registers, create > a default SYSCALL_RET_SET() macro (mirroring SYSCALL_NUM_SET()), that > writes to the SYSCALL_RET register. For architectures that can't set the > return value (for whatever reason), they can define SYSCALL_RET_SET() > without an associated SYSCALL_RET() macro. This also paves the way for > architectures that need to do special things to set the return value > (e.g. powerpc). > > Signed-off-by: Kees Cook > --- Looks good! Acked-by: Christian Brauner