Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp11038431ybl; Fri, 27 Dec 2019 06:40:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwCV3UCDrZG0ttIZHr35uRqIHg3aaFigRhGSBHFXkiqkDugPgeRzxLlRrL1O0mkKi1TYzhB X-Received: by 2002:a05:6830:1b7b:: with SMTP id d27mr59494488ote.78.1577457654762; Fri, 27 Dec 2019 06:40:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577457654; cv=none; d=google.com; s=arc-20160816; b=onJ88tBWu5ZkTyC+Qk3tCwhGcUb/1iiOTVf6fOHHj6kB74vpzz1uYf5A+SCGlksRbj XZLSWZcGhFv1lwb0BCL0Va4DIV5uxQYamklrt31zxx/rIvKtRuos6r+I2JxdYPPXXOU/ VaXVo+0wCSh3vjPgF3NnNRJ88Vsu+le/tWOn5mdw7harfd0u/OJTDCFtCSxQSKRRjXlB 3tYxpZMYqxjOEOG2B14P7ICobLGGIf6iUoPAWCgE87NRhNNbBS9WPsVpTgK3T6DwcTfe UJctCNKSNZB5DhyWtQH3zzkyw2z+ZswWjxc2EZd5I7yrgts6/5grxQtH7sbdyQSF4Vpg DQng== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lvrY2X8neN6Fjh9epCxv4wrPLNMXaY60K4+iw2mR7EM=; b=wxH5OlwTbKxY4sAC7G2QAeQgSlVdQMrpVX+FoKFCJomZq3JcfaTzpMIwEqV1X9Cj/r lhJSJhGhqVxyX6EUYcC2XbdzS9d1q20BBSqmv8nLbc64NjppLvzl58GarMZNqZhX7Pxy Kk7ndK4w2xrYMz39smM/+GxZ14E7LWzGLz7S9d37JuSFrDGZstxeiLIIG+sU7eQPfu9W iKqGSbirBBpWze0clgjpxkdPL3kqQpLaSQraBg9EoqPoGhvjWU+fR6HElmHVopDA8lfj 1gYcSHE7fV5SpVKqqVbAZty/HnejbnFDxIhAhpeOH7ovk17AmnuS+iSgu58b7w8wBIz1 wPPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=i7vfF3dB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si16461752oij.270.2019.12.27.06.40.39; Fri, 27 Dec 2019 06:40:54 -0800 (PST) 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=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=i7vfF3dB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726579AbfL0Oio (ORCPT + 99 others); Fri, 27 Dec 2019 09:38:44 -0500 Received: from mail-il1-f196.google.com ([209.85.166.196]:35349 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726379AbfL0Oio (ORCPT ); Fri, 27 Dec 2019 09:38:44 -0500 Received: by mail-il1-f196.google.com with SMTP id g12so22606763ild.2 for ; Fri, 27 Dec 2019 06:38:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho-ws.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lvrY2X8neN6Fjh9epCxv4wrPLNMXaY60K4+iw2mR7EM=; b=i7vfF3dBn33jGoHplLM77elKqkiESz4qNt1BaztIETFBTJ5whdWgvCQSIPH8PFHaj/ 8xVhhasADArasVg28n6s2Vc2qCBYZRJ1I3OPal7D5IAeg6MX1gGAC6HzVEGJQGPQL1FQ ge2D+F/t9Bc32VCU4LFWZ8uhHF1gAFZZzoBl1RtoQ2K6utroEUbYNGWEG8dx52CwHpfe Sky6mJ4/1BoPz1ifOt8hXx3P/V0jH36JBrI/l6JGugppwab+fOYcUd0l9M3KcTDcQltv AJWIcsCEKRWjRYqoEv8v4cSQ8SoF2PDWW+zl6GknlPKhMT7rRDPCuvGJNiYa8EoOQM1f FufQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lvrY2X8neN6Fjh9epCxv4wrPLNMXaY60K4+iw2mR7EM=; b=hdlMH07iLLB2M+qwZ/jmgsuNRhVFA3oNorLKjdwgudqeGNijpxZmcU+7GNmJP7Xlz1 4BYEa3MpEAmwDUEEePI7n8zDcsOTfqDV9bujgwjldmE9LuXL4MA2ohNWRKE+l6kk/+X8 z7NTt0VKtvACTtHz9wwV3007Ez8rGfebH/1pERGmVu+5WDKXP7/ThqWNIlkqRXy44l+E ra1efsMySxjC2w66cFqgNeDbjpJ4+A7vl+WgAabptJRQEnwYC9AJC3P4TJWMP415JC/C 8Tq0voy/KBX0o1Z3RQQmlMKalLtkMNqF1K783n1Y33GCNM5AnbWbxSJaQETB0mBxZRZH jkfQ== X-Gm-Message-State: APjAAAWS9FdPszzwSJHw/39yvDAowZKnRwpDJw2HWO0WHAnbM6CXXfUS wBtGBEQe/l1/3X9ieXSxHFAqiA== X-Received: by 2002:a92:5d03:: with SMTP id r3mr41644046ilb.278.1577457522670; Fri, 27 Dec 2019 06:38:42 -0800 (PST) Received: from cisco ([2601:282:902:b340:f166:b50c:bba2:408]) by smtp.gmail.com with ESMTPSA id 81sm13304729ilx.40.2019.12.27.06.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Dec 2019 06:38:42 -0800 (PST) Date: Fri, 27 Dec 2019 07:38:39 -0700 From: Tycho Andersen To: Sargun Dhillon Cc: Christian Brauner , Aleksa Sarai , LKML , Linux API , Jann Horn , Kees Cook Subject: Re: [PATCH] seccomp: Check flags on seccomp_notif is unset Message-ID: <20191227143839.GB15663@cisco> References: <20191225214530.GA27780@ircssh-2.c.rugged-nimbus-611.internal> <20191226115245.usf7z5dkui7ndp4w@wittgenstein> <20191226143229.sbopynwut2hhsiwn@yavin.dot.cyphar.com> <57C06925-0CC6-4251-AD57-8FF1BC28F049@ubuntu.com> <20191227022446.37e64ag4uaqms2w4@yavin.dot.cyphar.com> <20191227023131.klnobtlfgeqcmvbb@yavin.dot.cyphar.com> <20191227114725.xsacnaoaaxdv6yg3@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 27, 2019 at 09:22:20AM -0500, Sargun Dhillon wrote: > Just doing a simple copy_from_user, and for now, calling memchr_inv > on the whole thing. We can drop the memset, and just leave a note to > indicate that if unpadded fields are introduced in the future, this structure > must be manually zeroed out. Although, this might be laying a trap for > ourselves. Yes, please keep the memset(). Tycho