Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2268304pxu; Sun, 13 Dec 2020 20:06:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpP0pWruZm67aRjS8/u3StmQ7ZaHbitx7ulM3qxFBPkQJsmwR4FpleMkJvs0+JslArKjX/ X-Received: by 2002:a17:906:174f:: with SMTP id d15mr444744eje.15.1607918765309; Sun, 13 Dec 2020 20:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607918765; cv=none; d=google.com; s=arc-20160816; b=q4mUt9XtRS0sF5R6UUzSV/HTb5AyqU0KXA0wzxEowoQgrzkwV+DBqBWuABDcKID4EL Kj2nm8JNILSuTNV4mjEfn+hf9NxWLCuaBfu/x52ZLt324XsmB5tvtWVLWgSBLPfLNTf1 014fXzAG3dY2sasrgIZDvuQEfcZwk3MhoTRvDQ5jHpGOUaIyJk0NCkktEDBFkSwiiGTZ inWGXEAI6GqdDdw7LnloSNG+A7oe8IybSK4/2RrAEnq++ywtDYHCT7Osm3ROk/4SYjyy st2E9fUezst7VFgeRiNvYyq8kcyBkaSoG5DbMa0Gu8cVD/Ow9b1UJtrhE1cjX5ZLt7lp licQ== 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:dkim-signature:date; bh=WbjzMhtuXVehXCq2bgWUZ7+ormn2DFO6tZ3HJLRLpos=; b=GqP8rbNT+pMuPTFQVNbvQygNpAMsBncGKd/Pwi+tTHFMG6ztcbaEd2I+/hu0YJmdzd /VGe4qcrQxnzd6ANHUnLcW93exYW5AiNLrrgLq4BIXVMgcmx4GnoDZ082z+UAePjspzR P0jxODb/2oTO029SpSmT/1bkrwjDHF1nuHO5YL0hWhZS3z9k0cNukI9npLUFuUisnIOT Kcf7AYYx+D9/LzrZb0ruFGfdV07K+oawKyWm60tV5f/fPYORPV+YS5h6fou611nUTLrm niuSAvPYdVoDczS4LwvFD3KEOlL6pjEcIvhsgVvgQdpEGkKVjrgJ+HsEGH5UvKwefWt4 EUPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=flXIgTj5; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g4si9897668eds.170.2020.12.13.20.05.23; Sun, 13 Dec 2020 20:06:05 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=flXIgTj5; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439153AbgLLOAt (ORCPT + 99 others); Sat, 12 Dec 2020 09:00:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:53562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439135AbgLLOAj (ORCPT ); Sat, 12 Dec 2020 09:00:39 -0500 Date: Sat, 12 Dec 2020 15:59:40 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607781598; bh=W+S3uDjo9SUaklycr1VwLEkb3P+e5VKfy1opxSFjfP4=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=flXIgTj5QPdmF322uyfveGkWCvdiCUBTDqJEmaQAdBMU+9OnpTfe38HJDNJgc0lH8 G3M3nYjTvl4Jk0YTIcL5XhPPhChBAc7qxqYwpPq+/oyL9pin060A7R+FLePp8EI92r GwnqdckCsl6axBY1CL4fx8yH/moiz2Z+oLa3jsxNsEo1pT2EOLhqIregvSKc55N4Zj WuUAHrJAd8PgEDWlSYMQSNKmu4qJ1V3ZA+z2Yx8VyWB6hblUmlV0BHoIXeUaszFyMu HjV36aGN0+weJj3fLUwesb3uBHEoXTzG37NgAFnxayD4MEFDMvTjDeUmf4Kr35XObN Un6GIU6DTV1SA== From: Mike Rapoport To: John Hubbard Cc: Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dan Williams , Dave Hansen , David Hildenbrand , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org Subject: Re: [PATCH v14 10/10] secretmem: test: add basic selftest for memfd_secret(2) Message-ID: <20201212135940.GD8946@kernel.org> References: <20201203062949.5484-1-rppt@kernel.org> <20201203062949.5484-11-rppt@kernel.org> <248f928b-1383-48ea-8584-ec10146e60c9@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <248f928b-1383-48ea-8584-ec10146e60c9@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On Fri, Dec 11, 2020 at 10:16:23PM -0800, John Hubbard wrote: > On 12/2/20 10:29 PM, Mike Rapoport wrote: > > From: Mike Rapoport > ... > > +#include "../kselftest.h" > > + > > +#define fail(fmt, ...) ksft_test_result_fail(fmt, ##__VA_ARGS__) > > +#define pass(fmt, ...) ksft_test_result_pass(fmt, ##__VA_ARGS__) > > +#define skip(fmt, ...) ksft_test_result_skip(fmt, ##__VA_ARGS__) > > + > > +#ifdef __NR_memfd_secret > > + > > +#include > > Hi Mike, > > Say, when I tried this out from today's linux-next, I had to delete the > above line. In other words, the following was required in order to build: > > diff --git a/tools/testing/selftests/vm/memfd_secret.c b/tools/testing/selftests/vm/memfd_secret.c > index 79578dfd13e6..c878c2b841fc 100644 > --- a/tools/testing/selftests/vm/memfd_secret.c > +++ b/tools/testing/selftests/vm/memfd_secret.c > @@ -29,8 +29,6 @@ > > #ifdef __NR_memfd_secret > > -#include > - > #define PATTERN 0x55 > > static const int prot = PROT_READ | PROT_WRITE; > > > ...and that makes sense to me, because: > > a) secretmem.h is not in the uapi, which this selftests/vm build system > expects (it runs "make headers_install" for us, which is *not* going > to pick up items in the kernel include dirs), and > > b) There is nothing in secretmem.h that this test uses, anyway! Just these: > > bool vma_is_secretmem(struct vm_area_struct *vma); > bool page_is_secretmem(struct page *page); > bool secretmem_active(void); > > > ...or am I just Doing It Wrong? :) You are perfectly right, I had a stale header in uapi from the prevoius versions, the include in the test remained from then. @Andrew, can you please add the hunk above as a fixup? > thanks, > -- > John Hubbard > NVIDIA -- Sincerely yours, Mike.