lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Jan 2021 16:32:32 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Christian Brauner <christian.brauner@...ntu.com>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Christoph Hellwig <hch@...radead.org>,
        linux-fsdevel@...r.kernel.org
Cc:     John Johansen <john.johansen@...onical.com>,
        James Morris <jmorris@...ei.org>,
        Mimi Zohar <zohar@...ux.ibm.com>,
        Dmitry Kasatkin <dmitry.kasatkin@...il.com>,
        Stephen Smalley <stephen.smalley.work@...il.com>,
        Casey Schaufler <casey@...aufler-ca.com>,
        Arnd Bergmann <arnd@...db.de>,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
        Geoffrey Thomas <geofft@...reload.com>,
        Mrunal Patel <mpatel@...hat.com>,
        Josh Triplett <josh@...htriplett.org>,
        Andy Lutomirski <luto@...nel.org>,
        Theodore Tso <tytso@....edu>, Alban Crequy <alban@...volk.io>,
        Tycho Andersen <tycho@...ho.ws>,
        David Howells <dhowells@...hat.com>,
        James Bottomley <James.Bottomley@...senpartnership.com>,
        Seth Forshee <seth.forshee@...onical.com>,
        Stéphane Graber <stgraber@...ntu.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Aleksa Sarai <cyphar@...har.com>,
        Lennart Poettering <lennart@...ttering.net>,
        "Eric W. Biederman" <ebiederm@...ssion.com>, smbarber@...omium.org,
        Phil Estes <estesp@...il.com>, Serge Hallyn <serge@...lyn.com>,
        Kees Cook <keescook@...omium.org>,
        Todd Kjos <tkjos@...gle.com>, Paul Moore <paul@...l-moore.com>,
        Jonathan Corbet <corbet@....net>,
        containers@...ts.linux-foundation.org,
        linux-security-module@...r.kernel.org, linux-api@...r.kernel.org,
        linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org,
        linux-integrity@...r.kernel.org, selinux@...r.kernel.org,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v5 41/42] tests: extend mount_setattr tests

Hi,


On 1/12/21 2:01 PM, Christian Brauner wrote:
> ---
> /* v2 */
> patch introduced
> 
> /* v3 */
> - Christoph Hellwig <hch@....de>, Darrick J. Wong <darrick.wong@...cle.com>:
>   - Port main test-suite to xfstests.
> 
> /* v4 */
> unchanged
> 
> /* v5 */
> base-commit: 7c53f6b671f4aba70ff15e1b05148b10d58c2837
> ---
>  .../mount_setattr/mount_setattr_test.c        | 483 ++++++++++++++++++
>  1 file changed, 483 insertions(+)
> 
> diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> index 447b91c05cbd..4e94e566e040 100644
> --- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> +++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c
> @@ -108,15 +108,57 @@ struct mount_attr {
>  	__u64 attr_set;
>  	__u64 attr_clr;
>  	__u64 propagation;
> +	__u64 userns_fd;
>  };
>  #endif

...


Does "/**" have any special meaning inside tools/testing/ and the
selftest framework?  (I don't see any other such users.)

If not, can you just use the usual "/*" instead? (multiple locations)


> +/**
> + * Validate that negative fd values are rejected.
> + */
> +TEST_F(mount_setattr_idmapped, invalid_fd_negative)
> +{
...

> +}
> +
> +/**
> + * Validate that excessively large fd values are rejected.
> + */
> +TEST_F(mount_setattr_idmapped, invalid_fd_large)
> +{
...

> +}
> +
> +/**
> + * Validate that closed fd values are rejected.
> + */
> +TEST_F(mount_setattr_idmapped, invalid_fd_closed)
> +{
...

> +	}
> +}
> +
> +/**
> + * Validate that the initial user namespace is rejected.
> + */
> +TEST_F(mount_setattr_idmapped, invalid_fd_initial_userns)
> +{
...

> +/**
> + * Validate that an attached mount in our mount namespace can be idmapped.
> + * (The kernel enforces that the mount's mount namespace and the caller's mount
> + *  namespace match.)
> + */
> +TEST_F(mount_setattr_idmapped, attached_mount_inside_current_mount_namespace)
> +{
> +}
> +
> +/**
> + * Validate that idmapping a mount is rejected if the mount's mount namespace
> + * and our mount namespace don't match.
> + * (The kernel enforces that the mount's mount namespace and the caller's mount
> + *  namespace match.)
> + */
> +TEST_F(mount_setattr_idmapped, attached_mount_outside_current_mount_namespace)
> +{
...

> +}
> +
> +/**
> + * Validate that an attached mount in our mount namespace can be idmapped.
> + */
> +TEST_F(mount_setattr_idmapped, detached_mount_inside_current_mount_namespace)
> +{
...

> +}
> +
> +/**
> + * Validate that a detached mount not in our mount namespace can be idmapped.
> + */
> +TEST_F(mount_setattr_idmapped, detached_mount_outside_current_mount_namespace)
> +{
...

> +}
> +
> +/**
> + * Validate that currently changing the idmapping of an idmapped mount fails.
> + */
> +TEST_F(mount_setattr_idmapped, change_idmapping)
> +{


thanks.
-- 
~Randy
You can't do anything without having to do something else first.
-- Belefant's Law

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ