04 Jul, 2020

1 commit

  • Something changed recently to uncover this warning:

    samples/vfs/test-statx.c:24:15: warning: `struct foo' declared inside parameter list will not be visible outside of this definition or declaration
    24 | #define statx foo
    | ^~~

    Which is due the use of "struct statx" (here, "struct foo") in a function
    prototype argument list before it has been defined:

    int
    # 56 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h"
    foo
    # 56 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 3 4
    (int __dirfd, const char *__restrict __path, int __flags,
    unsigned int __mask, struct
    # 57 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h"
    foo
    # 57 "/usr/include/x86_64-linux-gnu/bits/statx-generic.h" 3 4
    *__restrict __buf)
    __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5)));

    Add explicit struct before #include to avoid warning.

    Fixes: f1b5618e013a ("vfs: Add a sample program for the new mount API")
    Signed-off-by: Kees Cook
    Signed-off-by: Andrew Morton
    Cc: Miklos Szeredi
    Cc: Al Viro
    Cc: David Howells
    Link: http://lkml.kernel.org/r/202006282213.C516EA6@keescook
    Signed-off-by: Linus Torvalds

    Kees Cook
     

14 May, 2020

1 commit

  • Constants of the *_ALL type can be actively harmful due to the fact that
    developers will usually fail to consider the possible effects of future
    changes to the definition.

    Deprecate STATX_ALL in the uapi, while no damage has been done yet.

    We could keep something like this around in the kernel, but there's
    actually no point, since all filesystems should be explicitly checking
    flags that they support and not rely on the VFS masking unknown ones out: a
    flag could be known to the VFS, yet not known to the filesystem.

    Cc: David Howells
    Cc: linux-api@vger.kernel.org
    Cc: linux-man@vger.kernel.org
    Signed-off-by: Miklos Szeredi
    Reviewed-by: Christoph Hellwig

    Miklos Szeredi
     

24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public licence as published by
    the free software foundation either version 2 of the licence or at
    your option any later version

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 114 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520170857.552531963@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 Mar, 2019

1 commit

  • Add a sample program to demonstrate fsopen/fsmount/move_mount to mount
    something.

    To make it compile on all arches, irrespective of whether or not syscall
    numbers are assigned, define the syscall number to -1 if it isn't to cause
    the kernel to return -ENOSYS.

    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    David Howells