29 Jan, 2014

1 commit

  • Pull vfs updates from Al Viro:
    "Assorted stuff; the biggest pile here is Christoph's ACL series. Plus
    assorted cleanups and fixes all over the place...

    There will be another pile later this week"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (43 commits)
    __dentry_path() fixes
    vfs: Remove second variable named error in __dentry_path
    vfs: Is mounted should be testing mnt_ns for NULL or error.
    Fix race when checking i_size on direct i/o read
    hfsplus: remove can_set_xattr
    nfsd: use get_acl and ->set_acl
    fs: remove generic_acl
    nfs: use generic posix ACL infrastructure for v3 Posix ACLs
    gfs2: use generic posix ACL infrastructure
    jfs: use generic posix ACL infrastructure
    xfs: use generic posix ACL infrastructure
    reiserfs: use generic posix ACL infrastructure
    ocfs2: use generic posix ACL infrastructure
    jffs2: use generic posix ACL infrastructure
    hfsplus: use generic posix ACL infrastructure
    f2fs: use generic posix ACL infrastructure
    ext2/3/4: use generic posix ACL infrastructure
    btrfs: use generic posix ACL infrastructure
    fs: make posix_acl_create more useful
    fs: make posix_acl_chmod more useful
    ...

    Linus Torvalds
     

26 Jan, 2014

6 commits

  • And instead convert tmpfs to use the new generic ACL code, with two stub
    methods provided for in-memory filesystems.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • This causes a small behaviour change in that we don't bother to set
    ACLs on file creation if the mode bit can express the access permissions
    fully, and thus behaving identical to local filesystems.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Rename the current posix_acl_created to __posix_acl_create and add
    a fully featured helper to set up the ACLs on file creation that
    uses get_acl().

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jan Kara
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Rename the current posix_acl_chmod to __posix_acl_chmod and add
    a fully featured ACL chmod helper that uses the ->set_acl inode
    operation.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jan Kara
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Factor out the code to get an ACL either from the inode or disk from
    check_acl, so that it can be used elsewhere later on.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jan Kara
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Pull user namespaces work from Eric Biederman:
    "The work to convert the kernel to use kuid_t and kgid_t has been
    finished since 3.12 so it is time to remove the scaffolding that
    allowed the work to progress incrementally.

    The first patch on this branch just removes the scaffolding, ensuring
    we will always get compile errors if people accidentally try the
    userspace and the kernel uid and gid types. The second patch an
    overlooked and unused chunk of mips code that that fails to build
    after the first patch.

    The code hasn't been in linux-next for long (as I was out of it and
    could not sheppared the cold properly) but the patch has been around
    for a long time just waiting for the day when I had finished the
    uid/gid conversions. Putting the code in linux-next did find the
    compile failure on mips so I took the time to get that fix reviewed
    and included. Beyond that I am not too worried about errors because
    all these two patches do is delete a modest amount of code"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    MIPS: VPE: Remove vpe_getuid and vpe_getgid
    userns: userns: Remove UIDGID_STRICT_TYPE_CHECKS

    Linus Torvalds
     

22 Jan, 2014

1 commit

  • Uninline vast tracts of nested inline functions in
    include/linux/posix_acl.h.

    This reduces the text+data+bss size of x86_64 allyesconfig vmlinux by
    8026 bytes.

    The patch also regularises the positioning of the EXPORT_SYMBOLs in
    posix_acl.c.

    Cc: Alexander Viro
    Cc: J. Bruce Fields
    Cc: Trond Myklebust
    Tested-by: Benny Halevy
    Cc: Benny Halevy
    Cc: Andreas Gruenbacher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

27 Nov, 2013

1 commit

  • Removing UIDGID_STRICT_TYPE_CHECKS simplifies the code and always
    generates a compile error if the uids and kuids or gids and kgids are
    mixed by accident. Now that the appropriate conversions have been
    placed throughout the kernel there is no longer a need for a mode where
    we don't detect them as compile errors.

    Acked-by: Serge Hallyn
    Signed-off-by: Eric W. Biederman

    Eric W. Biederman
     

18 Sep, 2012

1 commit

  • - In setxattr if we are setting a posix acl convert uids and gids from
    the current user namespace into the initial user namespace, before
    the xattrs are passed to the underlying filesystem.

    Untranslatable uids and gids are represented as -1 which
    posix_acl_from_xattr will represent as INVALID_UID or INVALID_GID.
    posix_acl_valid will fail if an acl from userspace has any
    INVALID_UID or INVALID_GID values. In net this guarantees that
    untranslatable posix acls will not be stored by filesystems.

    - In getxattr if we are reading a posix acl convert uids and gids from
    the initial user namespace into the current user namespace.

    Uids and gids that can not be tranlsated into the current user namespace
    will be represented as -1.

    - Replace e_id in struct posix_acl_entry with an anymouns union of
    e_uid and e_gid. For the short term retain the e_id field
    until all of the users are converted.

    - Don't set struct posix_acl.e_id in the cases where the acl type
    does not use e_id. Greatly reducing the use of ACL_UNDEFINED_ID.

    - Rework the ordering checks in posix_acl_valid so that I use kuid_t
    and kgid_t types throughout the code, and so that I don't need
    arithmetic on uid and gid types.

    Cc: Theodore Tso
    Cc: Andrew Morton
    Cc: Andreas Dilger
    Cc: Jan Kara
    Cc: Al Viro
    Signed-off-by: Eric W. Biederman

    Eric W. Biederman
     

05 Mar, 2012

1 commit

  • If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any
    other BUG variant in a static inline (i.e. not in a #define) then
    that header really should be including and not just
    expecting it to be implicitly present.

    We can make this change risk-free, since if the files using these
    headers didn't have exposure to linux/bug.h already, they would have
    been causing compile failures/warnings.

    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

03 Aug, 2011

2 commits


01 Aug, 2011

4 commits


26 Jul, 2011

3 commits


26 Jan, 2011

1 commit

  • nfsacl_encode() allocates memory in certain cases. This of course
    is not guaranteed to work.

    Since commit 9f06c719 "SUNRPC: New xdr_streams XDR encoder API", the
    kernel's XDR encoders can't return a result indicating possibly a
    failure, so a memory allocation failure in nfsacl_encode() has become
    fatal (ie, the XDR code Oopses) in some cases.

    However, the allocated memory is a tiny fixed amount, on the order
    of 40-50 bytes. We can easily use a stack-allocated buffer for
    this, with only a wee bit of nose-holding.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust

    Chuck Lever
     

07 Jan, 2011

1 commit

  • This simple implementation just checks for no ACLs on the inode, and
    if so, then the rcu-walk may proceed, otherwise fail it.

    This could easily be extended to put acls under RCU and check them
    under seqlock, if need be. But this implementation is enough to show
    the rcu-walk aware permissions code for path lookups is working, and
    will handle cases where there are no ACLs or ACLs in just the final
    element.

    This patch implicity converts tmpfs to rcu-aware permission check.
    Subsequent patches onvert ext*, xfs, and, btrfs. Each of these uses
    acl/permission code in a different way, so convert them all to provide
    templates and proof of concept.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

03 Dec, 2009

1 commit


25 Jun, 2009

2 commits


24 Jun, 2009

1 commit


09 Oct, 2005

1 commit

  • - added typedef unsigned int __nocast gfp_t;

    - replaced __nocast uses for gfp flags with gfp_t - it gives exactly
    the same warnings as far as sparse is concerned, doesn't change
    generated code (from gcc point of view we replaced unsigned int with
    typedef) and documents what's going on far better.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds