1. 23 5月, 2006 5 次提交
  2. 19 5月, 2006 1 次提交
    • D
      [JFFS2] Support new device nodes · aef9ab47
      David Woodhouse 提交于
      Device node major/minor numbers are just stored in the payload of a single
      data node. Just extend that to 4 bytes and use new_encode_dev() for it.
      
      We only use the 4-byte format if we _need_ to, if !old_valid_dev(foo).
      This preserves backwards compatibility with older code as much as
      possible. If we do make devices with major or minor numbers above 255, and
      then mount the file system with the old code, it'll just read the first
      two bytes and get the numbers wrong. If it comes to garbage-collect it,
      it'll then write back those wrong numbers. But that's about the best we
      can expect.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      aef9ab47
  3. 17 5月, 2006 1 次提交
  4. 16 5月, 2006 4 次提交
  5. 15 5月, 2006 1 次提交
    • D
      [JFFS2] Don't pack on-medium structures, because GCC emits crappy code · 3e68fbb5
      David Woodhouse 提交于
      If we use __attribute__((packed)), GCC will _also_ assume that the
      structures aren't sensibly aligned, and it'll emit code to cope with
      that instead of straight word load/save. This can be _very_ suboptimal
      on architectures like ARM.
      
      Ideally, we want an attribute which just tells GCC not to do any
      padding, without the alignment side-effects. In the absense of that,
      we'll just drop the 'packed' attribute and hope that everything stays as
      it was (which to be fair is fairly much what we expect). And add some
      paranoia checks in the initialisation code, which should be optimised
      away completely in the normal case.
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      3e68fbb5
  6. 14 5月, 2006 2 次提交
  7. 13 5月, 2006 1 次提交
    • K
      [JFFS2][XATTR] XATTR support on JFFS2 (version. 5) · aa98d7cf
      KaiGai Kohei 提交于
      This attached patches provide xattr support including POSIX-ACL and
      SELinux support on JFFS2 (version.5).
      
      There are some significant differences from previous version posted
      at last December.
      The biggest change is addition of EBS(Erase Block Summary) support.
      Currently, both kernel and usermode utility (sumtool) can recognize
      xattr nodes which have JFFS2_NODETYPE_XATTR/_XREF nodetype.
      
      In addition, some bugs are fixed.
      - A potential race condition was fixed.
      - Unexpected fail when updating a xattr by same name/value pair was fixed.
      - A bug when removing xattr name/value pair was fixed.
      
      The fundamental structures (such as using two new nodetypes and exclusion
      mechanism by rwsem) are unchanged. But most of implementation were reviewed
      and updated if necessary.
      Espacially, we had to change several internal implementations related to
      load_xattr_datum() to avoid a potential race condition.
      
      [1/2] xattr_on_jffs2.kernel.version-5.patch
      [2/2] xattr_on_jffs2.utils.version-5.patch
      Signed-off-by: NKaiGai Kohei <kaigai@ak.jp.nec.com>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      aa98d7cf
  8. 12 5月, 2006 2 次提交
  9. 11 5月, 2006 2 次提交
  10. 09 5月, 2006 2 次提交
  11. 08 5月, 2006 1 次提交
    • L
      [MTD] Convert physmap to platform driver · 73566edf
      Lennert Buytenhek 提交于
      After dwmw2 let me know it ought to be done, I rewrote the physmap map
      driver to be a platform driver.  I know zilch about the driver model,
      so I probably botched it in some way, but I've done some tests on an
      ixp23xx board which uses physmap, and it all seems to work.
      
      In order to not break existing physmap users, I've added some compat
      code that will instantiate a platform device iff CONFIG_MTD_PHYSMAP_LEN
      is defined and != 0.  Also, I've changed the default value for
      CONFIG_MTD_PHYSMAP_LEN to zero, so that people who inadvertently
      compile in physmap (or new, platform-style, users of physmap) don't get
      burned.
      
      This works pretty well -- the new physmap driver is a drop-in replacement
      for the old one, and works on said ixp23xx board without any code changes
      needed.  (This should hold as long as users don't touch 'physmap_map'
      directly.)
      
      Once all physmap users have been converted to instantiate their own
      platform devices, the compat code can go.  (Or we decide that we can
      change all the in-tree users at the same time, and never merge the
      compat code.)
      Signed-off-by: NLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
      73566edf
  12. 07 5月, 2006 2 次提交
  13. 04 5月, 2006 2 次提交
  14. 03 5月, 2006 3 次提交
  15. 02 5月, 2006 7 次提交
    • J
      [PATCH] vmsplice: restrict stealing a little more · 330ab716
      Jens Axboe 提交于
      Apply the same rules as the anon pipe pages, only allow stealing
      if no one else is using the page.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      330ab716
    • J
      [PATCH] splice: fix page LRU accounting · a893b99b
      Jens Axboe 提交于
      Currently we rely on the PIPE_BUF_FLAG_LRU flag being set correctly
      to know whether we need to fiddle with page LRU state after stealing it,
      however for some origins we just don't know if the page is on the LRU
      list or not.
      
      So remove PIPE_BUF_FLAG_LRU and do this check/add manually in pipe_to_file()
      instead.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      a893b99b
    • P
      [NETFILTER] x_tables: fix compat related crash on non-x86 · 46c5ea3c
      Patrick McHardy 提交于
      When iptables userspace adds an ipt_standard_target, it calculates the size
      of the entire entry as:
      
      sizeof(struct ipt_entry) + XT_ALIGN(sizeof(struct ipt_standard_target))
      
      ipt_standard_target looks like this:
      
        struct xt_standard_target
        {
              struct xt_entry_target target;
              int verdict;
        };
      
      xt_entry_target contains a pointer, so when compiled for 64 bit the
      structure gets an extra 4 byte of padding at the end. On 32 bit
      architectures where iptables aligns to 8 byte it will also have 4
      byte padding at the end because it is only 36 bytes large.
      
      The compat_ipt_standard_fn in the kernel adjusts the offsets by
      
        sizeof(struct ipt_standard_target) - sizeof(struct compat_ipt_standard_target),
      
      which will always result in 4, even if the structure from userspace
      was already padded to a multiple of 8. On x86 this works out by
      accident because userspace only aligns to 4, on all other
      architectures this is broken and causes incorrect adjustments to
      the size and following offsets.
      
      Thanks to Linus for lots of debugging help and testing.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      46c5ea3c
    • J
      [PATCH] vmsplice: allow user to pass in gift pages · 7afa6fd0
      Jens Axboe 提交于
      If SPLICE_F_GIFT is set, the user is basically giving this pages away to
      the kernel. That means we can steal them for eg page cache uses instead
      of copying it.
      
      The data must be properly page aligned and also a multiple of the page size
      in length.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      7afa6fd0
    • J
      [PATCH] pipe: enable atomic copying of pipe data to/from user space · f6762b7a
      Jens Axboe 提交于
      The pipe ->map() method uses kmap() to virtually map the pages, which
      is both slow and has known scalability issues on SMP. This patch enables
      atomic copying of pipe pages, by pre-faulting data and using kmap_atomic()
      instead.
      
      lmbench bw_pipe and lat_pipe measurements agree this is a Good Thing. Here
      are results from that on a UP machine with highmem (1.5GiB of RAM), running
      first a UP kernel, SMP kernel, and SMP kernel patched.
      
      Vanilla-UP:
      Pipe bandwidth: 1622.28 MB/sec
      Pipe bandwidth: 1610.59 MB/sec
      Pipe bandwidth: 1608.30 MB/sec
      Pipe latency: 7.3275 microseconds
      Pipe latency: 7.2995 microseconds
      Pipe latency: 7.3097 microseconds
      
      Vanilla-SMP:
      Pipe bandwidth: 1382.19 MB/sec
      Pipe bandwidth: 1317.27 MB/sec
      Pipe bandwidth: 1355.61 MB/sec
      Pipe latency: 9.6402 microseconds
      Pipe latency: 9.6696 microseconds
      Pipe latency: 9.6153 microseconds
      
      Patched-SMP:
      Pipe bandwidth: 1578.70 MB/sec
      Pipe bandwidth: 1579.95 MB/sec
      Pipe bandwidth: 1578.63 MB/sec
      Pipe latency: 9.1654 microseconds
      Pipe latency: 9.2266 microseconds
      Pipe latency: 9.1527 microseconds
      Signed-off-by: NJens Axboe <axboe@suse.de>
      f6762b7a
    • J
      [PATCH] pipe: introduce ->pin() buffer operation · f84d7519
      Jens Axboe 提交于
      The ->map() function is really expensive on highmem machines right now,
      since it has to use the slower kmap() instead of kmap_atomic(). Splice
      rarely needs to access the virtual address of a page, so it's a waste
      of time doing it.
      
      Introduce ->pin() to take over the responsibility of making sure the
      page data is valid. ->map() is then reduced to just kmap(). That way we
      can also share a most of the pipe buffer ops between pipe.c and splice.c
      Signed-off-by: NJens Axboe <axboe@suse.de>
      f84d7519
    • J
      [PATCH] splice: fix bugs in pipe_to_file() · 0568b409
      Jens Axboe 提交于
      Found by Oleg Nesterov <oleg@tv-sign.ru>, fixed by me.
      
      - Only allow full pages to go to the page cache.
      - Check page != buf->page instead of using PIPE_BUF_FLAG_STOLEN.
      - Remember to clear 'stolen' if add_to_page_cache() fails.
      
      And as a cleanup on that:
      
      - Make the bottom fall-through logic a little less convoluted. Also make
        the steal path hold an extra reference to the page, so we don't have
        to differentiate between stolen and non-stolen at the end.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      0568b409
  16. 01 5月, 2006 4 次提交
    • S
      [PATCH] Rework of IPC auditing · 073115d6
      Steve Grubb 提交于
      1) The audit_ipc_perms() function has been split into two different
      functions:
              - audit_ipc_obj()
              - audit_ipc_set_perm()
      
      There's a key shift here...  The audit_ipc_obj() collects the uid, gid,
      mode, and SElinux context label of the current ipc object.  This
      audit_ipc_obj() hook is now found in several places.  Most notably, it
      is hooked in ipcperms(), which is called in various places around the
      ipc code permforming a MAC check.  Additionally there are several places
      where *checkid() is used to validate that an operation is being
      performed on a valid object while not necessarily having a nearby
      ipcperms() call.  In these locations, audit_ipc_obj() is called to
      ensure that the information is captured by the audit system.
      
      The audit_set_new_perm() function is called any time the permissions on
      the ipc object changes.  In this case, the NEW permissions are recorded
      (and note that an audit_ipc_obj() call exists just a few lines before
      each instance).
      
      2) Support for an AUDIT_IPC_SET_PERM audit message type.  This allows
      for separate auxiliary audit records for normal operations on an IPC
      object and permissions changes.  Note that the same struct
      audit_aux_data_ipcctl is used and populated, however there are separate
      audit_log_format statements based on the type of the message.  Finally,
      the AUDIT_IPC block of code in audit_free_aux() was extended to handle
      aux messages of this new type.  No more mem leaks I hope ;-)
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      073115d6
    • S
      [PATCH] More user space subject labels · ce29b682
      Steve Grubb 提交于
      Hi,
      
      The patch below builds upon the patch sent earlier and adds subject label to
      all audit events generated via the netlink interface. It also cleans up a few
      other minor things.
      Signed-off-by: NSteve Grubb <sgrubb@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ce29b682
    • S
      [PATCH] Reworked patch for labels on user space messages · e7c34970
      Steve Grubb 提交于
      The below patch should be applied after the inode and ipc sid patches.
      This patch is a reworking of Tim's patch that has been updated to match
      the inode and ipc patches since its similar.
      
      [updated:
      >  Stephen Smalley also wanted to change a variable from isec to tsec in the
      >  user sid patch.                                                              ]
      Signed-off-by: NSteve Grubb <sgrubb@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e7c34970
    • S
      [PATCH] change lspp ipc auditing · 9c7aa6aa
      Steve Grubb 提交于
      Hi,
      
      The patch below converts IPC auditing to collect sid's and convert to context
      string only if it needs to output an audit record. This patch depends on the
      inode audit change patch already being applied.
      Signed-off-by: NSteve Grubb <sgrubb@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      9c7aa6aa