Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp545873ybm; Fri, 29 May 2020 06:35:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLZX6tXyVu6yKqeHtU82XBKhXzqoUoMex7AtVVfM3flcgJdKLzrWCKTnIEZ+dzcBd+za2r X-Received: by 2002:a05:6402:17ba:: with SMTP id j26mr8452130edy.324.1590759309191; Fri, 29 May 2020 06:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590759309; cv=none; d=google.com; s=arc-20160816; b=FQUxpb+HgvIM5rSl39O/BYhao+XSS9TitbWEgk1XDe3D6GndKx2v5fK2Z/65/GHF2i vXU6kXWcJ/CPcgDW2ydHMyVgjmJhDb7ttQ3lSQwjLESeQGmWiUVzL/cviC0UoHIyvHKM xM/wug4PdBPR2ORz1SWbt4GB5TcLzP3pbVVuRALM0+UUBbXB5V4ODI6Wyg5lPtd1DvKU /8vL1Ha3iZ8hBtYxqboEQighB97HLowb1SvWgqaA16yXSN28Qu1kz1lVDgskGI9DUu6r Tes24ZGhXFWqiLTaNmzhpiW567zEqHWkBkbTJWCQFld3AThg7pchkkLGOTbvxhwfdZok V78Q== 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 :dkim-signature; bh=Ul4bJ2hVr4eFMvgXcJJG3Lk5xnruexNhHNt3lbvkhgo=; b=UZmAWSg9nafIYcsJaDPrdFQaFK0Fi8Ir2EYRwkeYwxS13J5j4gjuC1fyfelRs8glln CmNlefMLEI90MAuLNLjtgcsQ6U9DpiHVXegBnfhQfk/xby6aLvdLd0HCbeCh8psl6J2h Ag6jVYi8Y/3jIpV1vzj4FM/elwmvQpD3X3yrjkuy9RLw5txVXrsfiYfhRkw1zZW4Rq13 YBvNVy09YGsNHNoseKsyw2dP1aNf8dQcLQm5RqWgQwqR95jfMq/kWkr7fOb8YsRK4Ggy AfxC9xhlBQG4eY78+za8Eb953cDniNcEVO8a93pEGFzq/KDtlvVQD7scnPe5B0QgLa6B Xj9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=jomC+3Yp; 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 i10si4816041eja.402.2020.05.29.06.34.37; Fri, 29 May 2020 06:35:09 -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; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=jomC+3Yp; 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 S1727023AbgE2N3g (ORCPT + 99 others); Fri, 29 May 2020 09:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726629AbgE2N3g (ORCPT ); Fri, 29 May 2020 09:29:36 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42CB2C08C5C6 for ; Fri, 29 May 2020 06:29:36 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id k22so1159714pls.10 for ; Fri, 29 May 2020 06:29:36 -0700 (PDT) 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; bh=Ul4bJ2hVr4eFMvgXcJJG3Lk5xnruexNhHNt3lbvkhgo=; b=jomC+3YpX2h5ghollb7vstYdTLJfL89YS4x0N9EguV+ZadSoC1ELNk3f96zkiYdM/1 mLgRfCSD1tbUwhWS+AKmDyYxUDBTyZRmxc0uBjyPyxdHS5uBzFJf2U/C6ecPajFwLT2p RnpGkCPBhOU5Y0RUVaqy0xBuJNiux9pSMfTkkYWWyYSNddeB9CgaV0fMUbEJ2xdL/nZn bH+D2sziqdsrWhf038N8YliE8ILRdpborib0xHrXQJxSs2MiRqYkF4hmIeAOVjELL3sa B7O8Jgi0DVvJPdV7E0GqPlE6sH37A/CkD+R36jyK4QXL0PpMgWvQEoVbTrIAwWvovVac YUiA== 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; bh=Ul4bJ2hVr4eFMvgXcJJG3Lk5xnruexNhHNt3lbvkhgo=; b=htOYS52J2aLcusJ5etqBnKISq0nON25S27d4w/PMvENRF3lT9be0KI8ysAlVxUJMdo QHno7PIgH5HpFWUe5DIXqodIbGO1ojxiaiTHjKELCFHRec800k9Ce4SG/mpgDY8Yrnmc shJ8Hzc8+2ch49XKFTzjrkSmE4Q9h0qfF6aHdQ8UTTUQGFH+UL3jxoSxqLOJMTO4S9he XalMCYApTFV6nOyyz7PubdijBlPOVV2vQgP3JAUNytfJDwckCxF7PNoZLlPK50lwb1d7 Ag/uXIf1nZ8pqEYycieTPzlk1sOplfXWtlDbPXoBpZ8KclNhnmhPr0qFcPiplTHsUtsx EL+g== X-Gm-Message-State: AOAM532eNfGJmPo4VHS0Q7IENlkbREZUXuoF28DXanUXncfTEszlv7gL 7v/cMGYE/FI0ixQMgN/tYBF/zQ== X-Received: by 2002:a17:902:70c2:: with SMTP id l2mr2097683plt.237.1590758975603; Fri, 29 May 2020 06:29:35 -0700 (PDT) Received: from cisco ([2001:420:c0c8:1002::476]) by smtp.gmail.com with ESMTPSA id n19sm7706925pjo.5.2020.05.29.06.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 06:29:34 -0700 (PDT) Date: Fri, 29 May 2020 07:29:37 -0600 From: Tycho Andersen To: Kees Cook Cc: Sargun Dhillon , christian.brauner@ubuntu.com, containers@lists.linux-foundation.org, cyphar@cyphar.com, jannh@google.com, jeffv@google.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, palmer@google.com, rsesek@google.com, Matt Denton Subject: Re: [PATCH v2 3/3] selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD Message-ID: <20200529132937.GD429721@cisco> References: <20200528110858.3265-1-sargun@sargun.me> <20200528110858.3265-4-sargun@sargun.me> <202005290036.3FEFFDA@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202005290036.3FEFFDA@keescook> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 29, 2020 at 12:41:51AM -0700, Kees Cook wrote: > On Thu, May 28, 2020 at 04:08:58AM -0700, Sargun Dhillon wrote: > > + EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0); > > + > > + nextid = req.id + 1; > > + > > + /* Wait for getppid to be called for the second time */ > > + sleep(1); > > I always rebel at finding "sleep" in tests. ;) Is this needed? IIUC, > userspace will immediately see EINPROGRESS after the NOTIF_SEND > finishes, yes? Yes, I think we can just drop this, and I agree it's a good idea to do so :) Tycho