Skip to content
  1. Mar 16, 2011
  2. Mar 15, 2011
    • Xiao Guangrong's avatar
      x86, tlb, UV: Do small micro-optimization for native_flush_tlb_others() · 25542c64
      Xiao Guangrong authored
      
      
      native_flush_tlb_others() is called from:
      
       flush_tlb_current_task()
       flush_tlb_mm()
       flush_tlb_page()
      
      All these functions disable preemption explicitly, so we can use
      smp_processor_id() instead of get_cpu() and put_cpu().
      
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Cliff Wickman <cpw@sgi.com>
      LKML-Reference: <4D7EC791.4040003@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      25542c64
    • Ingo Molnar's avatar
      Merge commit 'v2.6.38' into x86/mm · 8460b3e5
      Ingo Molnar authored
      
      
      Conflicts:
      	arch/x86/mm/numa_64.c
      
      Merge reason: Resolve the conflict, update the branch to .38.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8460b3e5
    • Al Viro's avatar
      Allow passing O_PATH descriptors via SCM_RIGHTS datagrams · 326be7b4
      Al Viro authored
      
      
      Just need to make sure that AF_UNIX garbage collector won't
      confuse O_PATHed socket on filesystem for real AF_UNIX opened
      socket.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      326be7b4
    • Al Viro's avatar
      readlinkat(), fchownat() and fstatat() with empty relative pathnames · 65cfc672
      Al Viro authored
      
      
      For readlinkat() we simply allow empty pathname; it will fail unless
      we have dfd equal to O_PATH-opened symlink, so we are outside of
      POSIX scope here.  For fchownat() and fstatat() we allow AT_EMPTY_PATH;
      let the caller explicitly ask for such behaviour.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      65cfc672
    • Al Viro's avatar
      Allow O_PATH for symlinks · bcda7652
      Al Viro authored
      
      
      At that point we can't do almost nothing with them.  They can be opened
      with O_PATH, we can manipulate such descriptors with dup(), etc. and
      we can see them in /proc/*/{fd,fdinfo}/*.
      
      We can't (and won't be able to) follow /proc/*/fd/* symlinks for those;
      there's simply not enough information for pathname resolution to go on
      from such point - to resolve a symlink we need to know which directory
      does it live in.
      
      We will be able to do useful things with them after the next commit, though -
      readlinkat() and fchownat() will be possible to use with dfd being an
      O_PATH-opened symlink and empty relative pathname.  Combined with
      open_by_handle() it'll give us a way to do realink-by-handle and
      lchown-by-handle without messing with more redundant syscalls.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      bcda7652
    • Al Viro's avatar
      New kind of open files - "location only". · 1abf0c71
      Al Viro authored
      
      
      New flag for open(2) - O_PATH.  Semantics:
      	* pathname is resolved, but the file itself is _NOT_ opened
      as far as filesystem is concerned.
      	* almost all operations on the resulting descriptors shall
      fail with -EBADF.  Exceptions are:
      	1) operations on descriptors themselves (i.e.
      		close(), dup(), dup2(), dup3(), fcntl(fd, F_DUPFD),
      		fcntl(fd, F_DUPFD_CLOEXEC, ...), fcntl(fd, F_GETFD),
      		fcntl(fd, F_SETFD, ...))
      	2) fcntl(fd, F_GETFL), for a common non-destructive way to
      		check if descriptor is open
      	3) "dfd" arguments of ...at(2) syscalls, i.e. the starting
      		points of pathname resolution
      	* closing such descriptor does *NOT* affect dnotify or
      posix locks.
      	* permissions are checked as usual along the way to file;
      no permission checks are applied to the file itself.  Of course,
      giving such thing to syscall will result in permission checks (at
      the moment it means checking that starting point of ....at() is
      a directory and caller has exec permissions on it).
      
      fget() and fget_light() return NULL on such descriptors; use of
      fget_raw() and fget_raw_light() is needed to get them.  That protects
      existing code from dealing with those things.
      
      There are two things still missing (they come in the next commits):
      one is handling of symlinks (right now we refuse to open them that
      way; see the next commit for semantics related to those) and another
      is descriptor passing via SCM_RIGHTS datagrams.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      1abf0c71