1. 15 7月, 2005 1 次提交
    • S
      kbuild: Avoid inconsistent kallsyms data · 6d30e3a8
      Sam Ravnborg 提交于
      Several reports on inconsistent kallsyms data has been caused by the aliased symbols
      __sched_text_start and __down to shift places in the output of nm.
      The root cause was that on second pass ld aligned __sched_text_start to a 4 byte boundary
      which is the function alignment on i386.
      sched.text and spinlock.text is now aligned to an 8 byte boundary to make sure they
      are aligned to a function alignemnt on most (all?) archs.
      
      Tested by: Paulo Marques <pmarques@grupopie.com>
      Tested by: Alexander Stohr <Alexander.Stohr@gmx.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      6d30e3a8
  2. 12 7月, 2005 5 次提交
  3. 11 7月, 2005 9 次提交
  4. 09 7月, 2005 5 次提交
  5. 08 7月, 2005 20 次提交
    • H
      [PATCH] m32r: framebuffer device support · 316240f6
      Hirokazu Takata 提交于
      This patch is for supporting Epson s1d13xxx framebuffer device for m32r.  #
      Sorry, a little bigger.
      
      The Epson s1d13806 is already supported by 2.6.12 kernel, and its driver is
      placed as drivers/video/s1d13xxxfb.c.
      
      For the m32r, a header file include/asm-m32r/s1d13806.h was prepared for
      several m32r target platforms.  It was originally generated by an Epson
      tool S1D13806CFG.EXE, and modified manually for the m32r platforms.
      Signed-off-by: NHayato Fujiwara <fujiwara@linux-m32r.org>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      316240f6
    • N
      [PATCH] nfsd4: check lock type against openmode. · 4c4cd222
      NeilBrown 提交于
      We shouldn't be allowing, e.g., write locks on files not open for read.  To
      enforce this, we add a pointer from the lock stateid back to the open stateid
      it came from, so that the check will continue to be correct even after the
      open is upgraded or downgraded.
      Signed-off-by: NAndy Adamson <andros@citi.umich.edu>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4c4cd222
    • N
      [PATCH] nfsd4: return better error on io incompatible with open mode · b700949b
      NeilBrown 提交于
      from RFC 3530:
      "Share reservations are established by OPEN operations and by their
      nature are mandatory in that when the OPEN denies READ or WRITE
      operations, that denial results in such operations being rejected
      with error NFS4ERR_LOCKED."
      
      (Note that share_denied is really only a legal error for OPEN.)
      Signed-off-by: NAndy Adamson <andros@citi.umich.edu>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b700949b
    • N
      [PATCH] nfsd4: seqid comments · 7fb64cee
      NeilBrown 提交于
      Add some comments on the use of so_seqid, in an attempt to avoid some of the
      confusion outlined in the previous patch....
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7fb64cee
    • N
      [PATCH] nfsd4: fix sync'ing of recovery directory · a6ccbbb8
      NeilBrown 提交于
      We need to fsync the recovery directory after writing to it, but we weren't
      doing this correctly.  (For example, we weren't taking the i_sem when calling
      ->fsync().)
      
      Just reuse the existing nfsd fsync code instead.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NNeil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a6ccbbb8
    • P
      [PATCH] pcmcia: remove client services version · a00db1ba
      Pavel Roskin 提交于
      The Linux PCMCIA code has some data that was apparently used (or meant to be
      used) to ensure that only proper client drivers are loaded.  This is now
      ensured (to a certain degree) by the fact that the most client drivers are
      part of the kernel.  Also, the version information has not been updated
      despite major changes in PCMCIA API.  This has made it meaningless.
      
      This patch removes servinfo_t and pcmcia_get_card_services_info.  They are not
      used in any userspace utilities such as pcmcia-cs and pcmciautils.
      drivers/pcmcia/pcmcia_ioctl.c is adjusted accordingly.
      
      CS_RELEASE and CS_RELEASE_CODE are removed.  include/pcmcia/version.h is empty
      now.  It will be removed later, but for now it's left in the tree to avoid
      touching all PCMCIA clients.
      
      The only driver that needs to be changed is drivers/scsi/pcmcia/nsp_cs.c,
      which uses CS_RELEASE_CODE.
      Signed-off-by: NPavel Roskin <proski@gnu.org>
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a00db1ba
    • D
      [PATCH] pcmcia: reduce client_handle_t usage · 2bc5a9bd
      Dominik Brodowski 提交于
      Reduce the occurences of "client_handle_t" which is nothing else than a
      pointer to struct pcmcia_device by now.
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2bc5a9bd
    • D
      [PATCH] pcmcia: remove client_t usage · e12a9a93
      Dominik Brodowski 提交于
      Reduce the occurences of "client_handle_t" which is nothing else than a
      pointer to struct pcmcia_device by now.
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e12a9a93
    • D
      [PATCH] pcmcia: move event handler · 1e212f36
      Dominik Brodowski 提交于
      Move the "event handler" to struct pcmcia_driver -- the unified event handler
      will disappear really soon, but switching it to struct pcmcia_driver in the
      meantime allows for better "step-by-step" patches.
      Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1e212f36
    • M
      [PATCH] namespace: rename _mntput to mntput_no_expire · 751c404b
      Miklos Szeredi 提交于
      This patch renames _mntput() to something a little more descriptive:
      mntput_no_expire().
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      751c404b
    • M
      [PATCH] namespace: rename mnt_fslink to mnt_expire · 55e700b9
      Miklos Szeredi 提交于
      This patch renames vfsmount->mnt_fslink to something a little more
      descriptive: vfsmount->mnt_expire.
      Signed-off-by: NMike Waychison <michael.waychison@sun.com>
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      55e700b9
    • M
      [PATCH] namespace.c: fix race in mark_mounts_for_expiry() · 1ce88cf4
      Miklos Szeredi 提交于
      This patch fixes a race found by Ram in mark_mounts_for_expiry() in
      fs/namespace.c.
      
      The bug can only be triggered with simultaneous exiting of a process having
      a private namespace, and expiry of a mount from within that namespace.
      It's practically impossible to trigger, and I haven't even tried.  But
      still, a bug is a bug.
      
      The race happens when put_namespace() is called by another task, while
      mark_mounts_for_expiry() is between atomic_read() and get_namespace().  In
      that case get_namespace() will be called on an already dead namespace with
      unforeseeable results.
      
      The solution was suggested by Al Viro, with his own words:
      
            Instead of screwing with atomic_read() in there, why don't we
            simply do the following:
            	a) atomic_dec_and_lock() in put_namespace()
            	b) __put_namespace() called without dropping lock
            	c) the first thing done by __put_namespace would be
            struct vfsmount *root = namespace->root;
            namespace->root = NULL;
            spin_unlock(...);
            ....
            umount_tree(root);
            ...
            	d) check in mark_... would be simply namespace && namespace->root.
      
            And we are all set; no screwing around with atomic_read(), no magic
            at all.  Dying namespace gets NULL ->root.
            All changes of ->root happen under spinlock.
            If under a spinlock we see non-NULL ->mnt_namespace, it won't be
            freed until we drop the lock (we will set ->mnt_namespace to NULL
            under that lock before we get to freeing namespace).
            If under a spinlock we see non-NULL ->mnt_namespace and
            ->mnt_namespace->root, we can grab a reference to namespace and be
            sure that it won't go away.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Acked-by: NAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1ce88cf4
    • A
      [PATCH] alpha(): pgprot_noncached · 40486551
      Andrew Morton 提交于
      The infiniband code expects that the arch implements pgprot_noncached().
      
      We're mapping PCI areas anyway, so this probabyl wasn't needed and we should
      make infiniband stop doing that..
      
      Cc: Roland Dreier <rolandd@cisco.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      40486551
    • C
      [PATCH] mostly_read data section · 6c036527
      Christoph Lameter 提交于
      Add a new section called ".data.read_mostly" for data items that are read
      frequently and rarely written to like cpumaps etc.
      
      If these maps are placed in the .data section then these frequenly read
      items may end up in cachelines with data is is frequently updated.  In that
      case all processors in an SMP system must needlessly reload the cachelines
      again and again containing elements of those frequently used variables.
      
      The ability to share these cachelines will allow each cpu in an SMP system
      to keep local copies of those shared cachelines thereby optimizing
      performance.
      Signed-off-by: NAlok N Kataria <alokk@calsoftinc.com>
      Signed-off-by: NShobhit Dayal <shobhit@calsoftinc.com>
      Signed-off-by: NChristoph Lameter <christoph@scalex86.org>
      Signed-off-by: NShai Fultheim <shai@scalex86.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6c036527
    • A
      [PATCH] propagate __nocast annotations · 0db925af
      Alexey Dobriyan 提交于
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0db925af
    • N
      [PATCH] page_uptodate locking scalability · a3972203
      Nick Piggin 提交于
      Use a bit spin lock in the first buffer of the page to synchronise asynch
      IO buffer completions, instead of the global page_uptodate_lock, which is
      showing some scalabilty problems.
      Signed-off-by: NNick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a3972203
    • A
      [PATCH] xtensa: remove old syscalls · 87591451
      Arnd Bergmann 提交于
      xtensa is now in -rc1, with the obsolete syscalls still in there, so I
      guess this about the last chance to correct the ABI.  Applying the patch
      obviously breaks all sorts of user space binaries and probably also
      requires the appropriate changes to be made to libc.
      
      On the other hand, if a decision is made to keep the broken interface, it
      should at least be a conscious one instead of an oversight.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      87591451
    • J
      [PATCH] uml: skas0 - separate kernel address space on stock hosts · d67b569f
      Jeff Dike 提交于
      UML has had two modes of operation - an insecure, slow mode (tt mode) in
      which the kernel is mapped into every process address space which requires
      no host kernel modifications, and a secure, faster mode (skas mode) in
      which the UML kernel is in a separate host address space, which requires a
      patch to the host kernel.
      
      This patch implements something very close to skas mode for hosts which
      don't support skas - I'm calling this skas0.  It provides the security of
      the skas host patch, and some of the performance gains.
      
      The two main things that are provided by the skas patch, /proc/mm and
      PTRACE_FAULTINFO, are implemented in a way that require no host patch.
      
      For the remote address space changing stuff (mmap, munmap, and mprotect),
      we set aside two pages in the process above its stack, one of which
      contains a little bit of code which can call mmap et al.
      
      To update the address space, the system call information (system call
      number and arguments) are written to the stub page above the code.  The
      %esp is set to the beginning of the data, the %eip is set the the start of
      the stub, and it repeatedly pops the information into its registers and
      makes the system call until it sees a system call number of zero.  This is
      to amortize the cost of the context switch across multiple address space
      updates.
      
      When the updates are done, it SIGSTOPs itself, and the kernel process
      continues what it was doing.
      
      For a PTRACE_FAULTINFO replacement, we set up a SIGSEGV handler in the
      child, and let it handle segfaults rather than nullifying them.  The
      handler is in the same page as the mmap stub.  The second page is used as
      the stack.  The handler reads cr2 and err from the sigcontext, sticks them
      at the base of the stack in a faultinfo struct, and SIGSTOPs itself.  The
      kernel then reads the faultinfo and handles the fault.
      
      A complication on x86_64 is that this involves resetting the registers to
      the segfault values when the process is inside the kill system call.  This
      breaks on x86_64 because %rcx will contain %rip because you tell SYSRET
      where to return to by putting the value in %rcx.  So, this corrupts $rcx on
      return from the segfault.  To work around this, I added an
      arch_finish_segv, which on x86 does nothing, but which on x86_64 ptraces
      the child back through the sigreturn.  This causes %rcx to be restored by
      sigreturn and avoids the corruption.  Ultimately, I think I will replace
      this with the trick of having it send itself a blocked signal which will be
      unblocked by the sigreturn.  This will allow it to be stopped just after
      the sigreturn, and PTRACE_SYSCALLed without all the back-and-forth of
      PTRACE_SYSCALLing it through sigreturn.
      
      This runs on a stock host, so theoretically (and hopefully), tt mode isn't
      needed any more.  We need to make sure that this is better in every way
      than tt mode, though.  I'm concerned about the speed of address space
      updates and page fault handling, since they involve extra round-trips to
      the child.  We can amortize the round-trip cost for large address space
      updates by writing all of the operations to the data page and having the
      child execute them all at the same time.  This will help fork and exec, but
      not page faults, since they involve only one page.
      
      I can't think of any way to help page faults, except to add something like
      PTRACE_FAULTINFO to the host.  There is PTRACE_SIGINFO, but UML doesn't use
      siginfo for SIGSEGV (or anything else) because there isn't enough
      information in the siginfo struct to handle page faults (the faulting
      operation type is missing).  Adding that would make PTRACE_SIGINFO a usable
      equivalent to PTRACE_FAULTINFO.
      
      As for the code itself:
      
      - The system call stub is in arch/um/kernel/sys-$(SUBARCH)/stub.S.  It is
        put in its own section of the binary along with stub_segv_handler in
        arch/um/kernel/skas/process.c.  This is manipulated with run_syscall_stub
        in arch/um/kernel/skas/mem_user.c.  syscall_stub will execute any system
        call at all, but it's only used for mmap, munmap, and mprotect.
      
      - The x86_64 stub calls sigreturn by hand rather than allowing the normal
        sigreturn to happen, because the normal sigreturn is a SA_RESTORER in
        UML's address space provided by libc.  Needless to say, this is not
        available in the child's address space.  Also, it does a couple of odd
        pops before that which restore the stack to the state it was in at the
        time the signal handler was called.
      
      - There is a new field in the arch mmu_context, which is now a union.
        This is the pid to be manipulated rather than the /proc/mm file
        descriptor.  Code which deals with this now checks proc_mm to see whether
        it should use the usual skas code or the new code.
      
      - userspace_tramp is now used to create a new host process for every UML
        process, rather than one per UML processor.  It checks proc_mm and
        ptrace_faultinfo to decide whether to map in the pages above its stack.
      
      - start_userspace now makes CLONE_VM conditional on proc_mm since we need
        separate address spaces now.
      
      - switch_mm_skas now just sets userspace_pid[0] to the new pid rather
        than PTRACE_SWITCH_MM.  There is an addition to userspace which updates
        its idea of the pid being manipulated each time around the loop.  This is
        important on exec, when the pid will change underneath userspace().
      
      - The stub page has a pte, but it can't be mapped in using tlb_flush
        because it is part of tlb_flush.  This is why it's required for it to be
        mapped in by userspace_tramp.
      
      Other random things:
      
      - The stub section in uml.lds.S is page aligned.  This page is written
        out to the backing vm file in setup_physmem because it is mapped from
        there into user processes.
      
      - There's some confusion with TASK_SIZE now that there are a couple of
        extra pages that the process can't use.  TASK_SIZE is considered by the
        elf code to be the usable process memory, which is reasonable, so it is
        decreased by two pages.  This confuses the definition of
        USER_PGDS_IN_LAST_PML4, making it too small because of the rounding down
        of the uneven division.  So we round it to the nearest PGDIR_SIZE rather
        than the lower one.
      
      - I added a missing PT_SYSCALL_ARG6_OFFSET macro.
      
      - um_mmu.h was made into a userspace-usable file.
      
      - proc_mm and ptrace_faultinfo are globals which say whether the host
        supports these features.
      
      - There is a bad interaction between the mm.nr_ptes check at the end of
        exit_mmap, stack randomization, and skas0.  exit_mmap will stop freeing
        pages at the PGDIR_SIZE boundary after the last vma.  If the stack isn't
        on the last page table page, the last pte page won't be freed, as it
        should be since the stub ptes are there, and exit_mmap will BUG because
        there is an unfreed page.  To get around this, TASK_SIZE is set to the
        next lowest PGDIR_SIZE boundary and mm->nr_ptes is decremented after the
        calls to init_stub_pte.  This ensures that we know the process stack (and
        all other process mappings) will be below the top page table page, and
        thus we know that mm->nr_ptes will be one too many, and can be
        decremented.
      
      Things that need fixing:
      
      - We may need better assurrences that the stub code is PIC.
      
      - The stub pte is set up in init_new_context_skas.
      
      - alloc_pgdir is probably the right place.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d67b569f
    • B
      [PATCH] pm: fix u32 vs. pm_message_t confusion in cpufreq · e00d9967
      Bernard Blackham 提交于
      Fix u32 vs pm_message_t confusion in cpufreq.
      Signed-off-by: NBernard Blackham <bernard@blackham.com.au>
      Signed-off-by: NPavel Machek <pavel@suse.cz>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e00d9967
    • D
      [PATCH] Fix up non-NUMA breakage in mmzone.h · e8af300c
      Dave Jones 提交于
      If CONFIG_NUMA isn't set, we use the define in <linux/mmzone.h> for
      early_pfn_to_nid (which defines it to 0).
      
      Because of this, the prototype needs to move inside the CONFIG_NUMA too, or
      anal gcc's get really confused.
      Signed-off-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e8af300c