From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D28B1C56202 for ; Fri, 20 Nov 2020 21:16:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 72E3222264 for ; Fri, 20 Nov 2020 21:16:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="dU4KoiHZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728060AbgKTVQA (ORCPT ); Fri, 20 Nov 2020 16:16:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727974AbgKTVQA (ORCPT ); Fri, 20 Nov 2020 16:16:00 -0500 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAFB5C061A48 for ; Fri, 20 Nov 2020 13:15:59 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id r18so8382017pgu.6 for ; Fri, 20 Nov 2020 13:15:59 -0800 (PST) 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=h3PVNgWJ4wv679ueVcfOMGTzPLuWakBRGW5tpcXVwpU=; b=dU4KoiHZzIEflMXxYsdAq02/ZtKHAbVYN3DUKz1jjW6FqozuzDqj1HhoL1AotmA6iH J0FPfOX8vroNiQrqM3+Mg92Tbbg8Ta4YWvs2XOfQEnQO7II6Vndq8Xm0uvHveSP/s0Nq YqotYUJAiv3Sjru2HYlJJBB0l/Fq8aCCvoJwg= 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=h3PVNgWJ4wv679ueVcfOMGTzPLuWakBRGW5tpcXVwpU=; b=bVoC/IkelPZrfeJ/ZjyIvBfnWVEQV/3NdFWgMHBkrfnANNdVLKiLvrqv3NMtqZ3Znz d09Ooyvywl/JVY6TfvyI6Vm+MyW3qrrZw7yNDpwoZyJCI5zH4WYoLuE++0MWIchIZyUJ Qyp3LUhLNKuGiljMgcXEE1RzrU8WyQtolBt5kN58cq60Ky2P7NZ1879uydWoDIuBPWX4 x3O+ev9T62ruBM1IL1zGAKpVRsR+ZbqTC3kdUauXfV62mimKVS09SLXK3sUFFEIvTsHY LKxOZfPiNyEHX5+hx80rpFc2WpcayIdIiuvvljlsJ0N+0NWJj/i73G1C92kRsrNOKkQN XPgQ== X-Gm-Message-State: AOAM530eEigxhz0oURQ6u/B4dPa4BaKUcKrpadwgM4i2ZefzL9oH+kUX kCnxc3MNTTFBzSLDfbKIC1inew== X-Google-Smtp-Source: ABdhPJxKoNsqmJfw8FXBuNWzYTFCvMP4QSPsIPE4HroDYde9n5FBnmXaYeQPf9Hkrj1TBoT0dMj64g== X-Received: by 2002:aa7:8ac1:0:b029:197:7198:e943 with SMTP id b1-20020aa78ac10000b02901977198e943mr14806170pfd.58.1605906959108; Fri, 20 Nov 2020 13:15:59 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id k9sm4598556pfi.188.2020.11.20.13.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2020 13:15:58 -0800 (PST) Date: Fri, 20 Nov 2020 13:15:57 -0800 From: Kees Cook To: Christian Brauner Cc: Alexander Viro , Christoph Hellwig , linux-fsdevel@vger.kernel.org, John Johansen , James Morris , Mimi Zohar , Dmitry Kasatkin , Stephen Smalley , Casey Schaufler , Arnd Bergmann , Andreas Dilger , OGAWA Hirofumi , Geoffrey Thomas , Mrunal Patel , Josh Triplett , Andy Lutomirski , Theodore Tso , Alban Crequy , Tycho Andersen , David Howells , James Bottomley , Jann Horn , Seth Forshee , =?iso-8859-1?Q?St=E9phane?= Graber , Aleksa Sarai , Lennart Poettering , "Eric W. Biederman" , smbarber@chromium.org, Phil Estes , Serge Hallyn , Todd Kjos , Jonathan Corbet , containers@lists.linux-foundation.org, linux-security-module@vger.kernel.org, linux-api@vger.kernel.org, linux-ext4@vger.kernel.org, linux-audit@redhat.com, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, Christoph Hellwig Subject: Re: [PATCH v2 39/39] tests: add vfs/idmapped mounts test suite Message-ID: <202011201300.B158F1E4B@keescook> References: <20201115103718.298186-1-christian.brauner@ubuntu.com> <20201115103718.298186-40-christian.brauner@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201115103718.298186-40-christian.brauner@ubuntu.com> Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On Sun, Nov 15, 2020 at 11:37:18AM +0100, Christian Brauner wrote: > This adds a whole test suite for idmapped mounts but in order to ensure that > there are no regression for the vfs itself it also includes tests for correct > functionality on non-idmapped mounts. The following tests are currently > available with more to come in the future: Awesome! :) Some glitches in the build, though... something about the ordering or the Make rules produces odd results on a failure: $ make gcc -g -I../../../../usr/include/ -Wall -O2 -pthread xattr.c internal.h utils.c utils.h -lcap -o /home/kees/src/linux-build/seccomp/tools/testing/selftests/idmap_mounts/xattr gcc -g -I../../../../usr/include/ -Wall -O2 -pthread core.c internal.h utils.c utils.h -lcap -o /home/kees/src/linux-build/seccomp/tools/testing/selftests/idmap_mounts/core core.c:19:10: fatal error: sys/acl.h: No such file or directory 19 | #include | ^~~~~~~~~~~ compilation terminated. make: *** [../lib.mk:139: /home/kees/src/linux-build/seccomp/tools/testing/selftests/idmap_mounts/core] Error 1 $ make make: Nothing to be done for 'all'. $ file xattr core xattr: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=7a3c1951e54f20e657b4181c1be77c7183a54f81, for GNU/Linux 3.2.0, with debug_info, not stripped core: GCC precompiled header (version 014) for C Even after I install libacl1-dev, I still get a "core" file output which breaks attempts to build again. :) Is there any way to have the test suite not depend on __NR_mount_setattr? Running this test on older kernels fails everything. -- Kees Cook