Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3376280pxk; Mon, 28 Sep 2020 16:16:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUKIdy38hWn6XVN0E4+SJi+1py3TD8UEuR4mvofA0+loXWuCaq3a0buL0GGjxnw+cRw/Fq X-Received: by 2002:aa7:c98d:: with SMTP id c13mr332124edt.199.1601334968369; Mon, 28 Sep 2020 16:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601334968; cv=none; d=google.com; s=arc-20160816; b=jKGNr3IT77GWzomMn6Rf6mb5KQk4A+Yow9zfUBp/5epSLtMiNQ/V1AdGSYEnrRALBR SHHh2jpTqKhNrGYVX14pjAMoOpAul5mFZmB+4MkAl8I9ZVA5XzMiQyzirrmP3GkXTf+F mJKx7ZRAoNft8dbmGRmeuay963ZHU9YRS09eC4ChG7W869+6cy/XY4fJ9oMwf5Ufho6j OjS2jyeDrx/DtRsGD5OxFwu54K6rMGcBxT7DeQ+3afkEz66YDZuzHenAxK+76QAuzmny 2FWcX2xyLZgJX3eRbd/5nmkxES1XX9pt5ebdFVtsU3bP/mAuPgMNFcqvlWuPvs0tSfJM r/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NftyTi1bwuaE14e4XfgcQF93EOxKUsMOEEQqaDTCXJ4=; b=Ml7KbwxOeBSR97nevLWbR16dkzOCW6TFKSuKw/6KF58zroUJp82n+UXr1PYJfqjbAm SmOg37SfqnyJeTL+jQHAv1F4HUnjKERr4INmhF105QtttL4dgWz7xm+2I4lGs4gIHaWC CDthfgbQA4MdbhBrFm27PLWMLdDzwFrhkfx5nfq+wqfShF5iC+QG0cbELJXHNFSZOA+2 DKLy06IPyO+ePl3iAu/rzbjGmW3Auug7oVCMrBwHViOjEXbBcJ0yaNCiZKN17K5HU5DY MgLVasuiQsLSJIrhyIrMGCWilQr4PA1WUfVHWk/dG3Q67OavJQ0yvePSDwfTeAyptnZo 695A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gb3PRHEL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t6si1487352ejs.530.2020.09.28.16.15.11; Mon, 28 Sep 2020 16:16:08 -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=@chromium.org header.s=google header.b=gb3PRHEL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726930AbgI1XNK (ORCPT + 99 others); Mon, 28 Sep 2020 19:13:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726901AbgI1XNJ (ORCPT ); Mon, 28 Sep 2020 19:13:09 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 953CDC05BD22 for ; Mon, 28 Sep 2020 16:13:09 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id d9so2651585pfd.3 for ; Mon, 28 Sep 2020 16:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NftyTi1bwuaE14e4XfgcQF93EOxKUsMOEEQqaDTCXJ4=; b=gb3PRHELtfh8s0n7btbKHS7gdHecLDH27/WSx/dTaEZqzwAyfLHcApZT5c+IqoShdm 0LEtidHDj3nYkCuzJeB2PL+jPZX/ntrn70g8bHDhQFR+CUPr0IDYs3hxi4tZpkrlg6d9 hrDzPZTP54zHmpmIZZBNppWuJmHgMncA/mXvQ= 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=NftyTi1bwuaE14e4XfgcQF93EOxKUsMOEEQqaDTCXJ4=; b=Xxlq0P9ZriHrxF5cnnuV2e7+Z9C4PP1l4hmyXFGeueTB0HMzTbIx3xqRjYxS7qDIbP 3VV7dKfyuD9n6XybJPhAk2/2zd5CqzmBmXXRleJYGVt7IW7e2BDLKAi8vFoRNYT6kXoh TLpUrw8YZyEErZK2iXn9X/S6YxV5gmCIjPcGgzRdEp2767G7f7q1VUxJ0VIQb1JoVgof 9HGeeHs+8MpYGncZz955QyLTOarUuQ05gf+pjzLDekHI3v1iQoxiT8K83i2lbBNFZPvV Q/0rwtzJ+Twap+EMYy8M2/scBcd/pZZKq9mz2peWA3SrJBBRVf3YXYGYDG8tPoQ+Z2wj 4rnw== X-Gm-Message-State: AOAM531mnpQDqG++LjR89BJcakvVrp1CG+U4+lKQ1D9iwwjKvBUzresW Nd8Auu1RWIJeV3AuIX6YPJMnOw== X-Received: by 2002:a65:494e:: with SMTP id q14mr1006851pgs.281.1601334788954; Mon, 28 Sep 2020 16:13:08 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z23sm2835217pfj.177.2020.09.28.16.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 16:13:08 -0700 (PDT) Date: Mon, 28 Sep 2020 16:13:07 -0700 From: Kees Cook To: Shuah Khan Cc: corbet@lwn.net, gregkh@linuxfoundation.org, shuah@kernel.org, rafael@kernel.org, johannes@sipsolutions.net, lenb@kernel.org, james.morse@arm.com, tony.luck@intel.com, bp@alien8.de, arve@android.com, tkjos@android.com, maco@android.com, joel@joelfernandes.org, christian@brauner.io, hridya@google.com, surenb@google.com, minyard@acm.org, arnd@arndb.de, mchehab@kernel.org, rric@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-acpi@vger.kernel.org, devel@driverdev.osuosl.org, openipmi-developer@lists.sourceforge.net, linux-edac@vger.kernel.org Subject: Re: [PATCH 00/11] Introduce Simple atomic and non-atomic counters Message-ID: <202009281612.EDC1C0078@keescook> References: <202009260923.9A2606CFF6@keescook> <3929a023-eb7a-509c-50e1-ee72dca05191@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3929a023-eb7a-509c-50e1-ee72dca05191@linuxfoundation.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 28, 2020 at 04:41:47PM -0600, Shuah Khan wrote: > On 9/26/20 10:29 AM, Kees Cook wrote: > > On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote: > > > 7. Verified that the test module compiles in kunit env. and test > > > module can be loaded to run the test. > > > > I meant write it using KUnit interfaces (e.g. KUNIT_EXPECT*(), > > kunit_test_suite(), etc): > > https://www.kernel.org/doc/html/latest/dev-tools/kunit/ > > > > Though I see the docs are still not updated[1] to reflect the Kconfig > > (CONFIG_foo_KUNIT_TEST) and file naming conventions (foo_kunit.c). > > > > I would like to be able to run this test outside Kunit env., hence the > choice to go with a module and kselftest script. It makes it easier to > test as part of my workflow as opposed to doing a kunit and build and > running it that way. It does -- you just load it normally like before and it prints out everything just fine. This is how I use the lib/test_user_copy.c and lib/test_overflow.c before/after their conversions. -- Kees Cook