02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

13 Aug, 2016

1 commit

  • This is a new userspace operation, which will be done if the client-core
    version is greater than or equal to 2.9.6. This will provide a way to
    implement optional features and to determine which features are
    supported by the client-core. If the client-core version is older than
    2.9.6, no optional features are supported and the op will not be done.

    The intent is to allow protocol extensions without relying on the
    client-core's current behavior of ignoring what it doesn't understand.

    Signed-off-by: Martin Brandenburg

    Martin Brandenburg
     

09 Aug, 2016

1 commit

  • This has been dormant code for many years. Parts of it were removed from
    the OrangeFS kernel code when it went into mainline. These bits were missed.
    Now the readahead cache has been resurrected in the OrangeFS userspace
    portions. It was renamed there, since it doesn't really have anything to do
    with mmap specifically, so it will be renamed here.

    Signed-off-by: Martin Brandenburg

    Martin Brandenburg
     

06 Jul, 2016

1 commit

  • In orangefs_inode_getxattr(), an fsuid is written to dmesg. The kuid is
    converted to a userspace uid via from_kuid(current_user_ns(), [...]), but
    since dmesg is global, init_user_ns should be used here instead.

    In copy_attributes_from_inode(), op_alloc() and fill_default_sys_attrs(),
    upcall structures are populated with uids/gids that have been mapped into
    the caller's namespace. However, those upcall structures are read by
    another process (the userspace filesystem driver), and that process might
    be running in another namespace. This effectively lets any user spoof its
    uid and gid as seen by the userspace filesystem driver.

    To fix the second issue, I just construct the opcall structures with
    init_user_ns uids/gids and require the filesystem server to run in the
    init namespace. Since orangefs is full of global state anyway (as the error
    message in DUMP_DEVICE_ERROR explains, there can only be one userspace
    orangefs filesystem driver at once), that shouldn't be a problem.

    [
    Why does orangefs even exist in the kernel if everything does upcalls into
    userspace? What does orangefs do that couldn't be done with the FUSE
    interface? If there is no good answer to those questions, I'd prefer to see
    orangefs kicked out of the kernel. Can that be done for something that
    shipped in a release?

    According to commit f7ab093f74bf ("Orangefs: kernel client part 1"), they
    even already have a FUSE daemon, and the only rational reason (apart from
    "but most of our users report preferring to use our kernel module instead")
    given for not wanting to use FUSE is one "in-the-works" feature that could
    probably be integated into FUSE instead.
    ]

    This patch has been compile-tested.

    Signed-off-by: Jann Horn
    Signed-off-by: Mike Marshall

    Jann Horn
     

20 Feb, 2016

4 commits


05 Feb, 2016

1 commit

  • A couple of caches were no longer needed:

    - iov_iter improvements to orangefs_devreq_write_iter eliminated
    the need for the dev_req_cache.

    - removal (months ago) of the old AIO code eliminated the need
    for the kiocb_cache.

    Also, deobfuscation of use of GFP_KERNEL when calling kmem_cache_(z)alloc
    for remaining caches.

    Signed-off-by: Mike Marshall

    Mike Marshall
     

24 Jan, 2016

3 commits

  • fold orangefs_op_initialize() in there, don't bother locking something
    nobody else could've seen yet, use kmem_cache_zalloc() instead of
    explicit memset()...

    Signed-off-by: Al Viro
    Signed-off-by: Mike Marshall

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Mike Marshall

    Al Viro
     
  • * create with refcount 1
    * make op_release() decrement and free if zero (i.e. old put_op()
    has become that).
    * mark when submitter has given up waiting; from that point nobody
    else can move between the lists, change state, etc.
    * have daemon read/write_iter grab a reference when picking op
    and *always* give it up in the end
    * don't put into hash until we know it's been successfully passed to
    daemon

    * move op->lock _lower_ than htab_in_progress_lock (and make sure
    to take it in purge_inprogress_ops())

    Signed-off-by: Al Viro
    Signed-off-by: Mike Marshall

    Al Viro
     

14 Jan, 2016

1 commit


18 Dec, 2015

1 commit


05 Dec, 2015

1 commit