1. 24 3月, 2007 3 次提交
    • R
      [PATCH] i386: clear segment register padding in core dumps · 6ea65ff7
      Roland McGrath 提交于
      The segment register slots in struct pt_regs are padded to 32 bits.
      Some of these are stored with instructions like "pushl %es", which
      leaves the high 16 bits as they were.  So the high bits of these
      fields in struct pt_regs contain kernel stack garbage.  These bits are
      ignored by everything and never leak to user space, except in core
      dumps.  The user struct pt_regs is always at the base of the thread's
      kernel stack and so it seems unlikely the information that leaks from
      here is ever worthwhile so as to be a security concern, but I'm not
      sure about that.  It has been this way for ages; userland consumers of
      core dumps all mask off these high bits themselves.  So it is not urgent.
      
      This change masks off the padding bits of the segment register slots
      in core dumps.  ptrace already masks off these high bits, so this
      makes the values in core dumps consistent with what ptrace would
      report just before the process died.
      
      As I read the processor manuals, the cs and ss values will always be
      padded with zero bits rather than stack garbage.  But unlike "pushl %es",
      this is not simple to test with a userland program.  So I added the two
      instructions rather than wonder if they are really never necessary.
      
      I think that x86_64 does not have this problem (for either 32-bit or
      64-bit processes).  It only uses "mov" instructions from segment
      registers, which zero-extend.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6ea65ff7
    • L
      x86-64: add "local_apic_timer_c2_ok" here too · 2e7c2838
      Linus Torvalds 提交于
      Needed for any architecture that claims ARCH_APICTIMER_STOPS_ON_C3,
      not just i386.
      
      I'm hoping Thomas will clean this up a bit later..
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e7c2838
    • T
      [PATCH] i386: add command line option "local_apic_timer_c2_ok" · e585bef8
      Thomas Gleixner 提交于
      It turned out that it is almost impossible to trust ACPI, BIOS & Co.
      regarding the C states. This was the reason to switch the local apic
      timer off in C2 state already. OTOH there are sane and well behaving
      systems, which get punished by that decision.
      
      Allow the user to confirm that the local apic timer is trustworthy in C2
      state. This keeps the default behaviour on the safe side.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e585bef8
  2. 23 3月, 2007 2 次提交
  3. 22 3月, 2007 1 次提交
  4. 21 3月, 2007 1 次提交
    • Z
      [IA64] min_low_pfn and max_low_pfn calculation fix · a3f5c338
      Zou Nan hai 提交于
      We have seen bad_pte_print when testing crashdump on an SN machine in
      recent 2.6.20 kernel.  There are tons of bad pte print (pfn < max_low_pfn)
      reports when the crash kernel boots up, all those reported bad pages
      are inside initmem range; That is because if the crash kernel code and
      data happens to be at the beginning of the 1st node. build_node_maps in
      discontig.c will bypass reserved regions with filter_rsvd_memory. Since
      min_low_pfn is calculated in build_node_map, so in this case, min_low_pfn
      will be greater than kernel code and data.
      
      Because pages inside initmem are freed and reused later, we saw
      pfn_valid check fail on those pages.
      
      I think this theoretically happen on a normal kernel. When I check
      min_low_pfn and max_low_pfn calculation in contig.c and discontig.c.
      I found more issues than this.
      
      1. min_low_pfn and max_low_pfn calculation is inconsistent between
      contig.c and discontig.c,
      min_low_pfn is calculated as the first page number of boot memmap in
      contig.c (Why? Though this may work at the most of the time, I don't
      think it is the right logic). It is calculated as the lowest physical
      memory page number bypass reserved regions in discontig.c.
      max_low_pfn is calculated include reserved regions in contig.c. It is
      calculated exclude reserved regions in discontig.c.
      
      2. If kernel code and data region is happen to be at the begin or the
      end of physical memory, when min_low_pfn and max_low_pfn calculation is
      bypassed kernel code and data, pages in initmem will report bad.
      
      3. initrd is also in reserved regions, if it is at the begin or at the
      end of physical memory, kernel will refuse to reuse the memory. Because
      the virt_addr_valid check in free_initrd_mem.
      
      So it is better to fix and clean up those issues.
      Calculate min_low_pfn and max_low_pfn in a consistent way.
      Signed-off-by: NZou Nan hai <nanhai.zou@intel.com>
      Acked-by: NJay Lan <jlan@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      a3f5c338
  5. 20 3月, 2007 3 次提交
  6. 19 3月, 2007 4 次提交
  7. 18 3月, 2007 1 次提交
  8. 17 3月, 2007 13 次提交
    • T
      [PATCH] fix MTIME_SEC_MAX on 32-bit · 5379058b
      Thomas Gleixner 提交于
      The maximum seconds value we can handle on 32bit is LONG_MAX.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5379058b
    • J
      [PATCH] i386: fix typo in sync_constant_test_bit()'s name · 014efb1d
      Jeremy Fitzhardinge 提交于
      Fix typo in sync_constant_test_bit()'s name, so sync_bitops.h is consistent
      with bitops.h
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      014efb1d
    • P
      [PATCH] nfs: fix congestion control · 89a09141
      Peter Zijlstra 提交于
      The current NFS client congestion logic is severly broken, it marks the
      backing device congested during each nfs_writepages() call but doesn't
      mirror this in nfs_writepage() which makes for deadlocks.  Also it
      implements its own waitqueue.
      
      Replace this by a more regular congestion implementation that puts a cap on
      the number of active writeback pages and uses the bdi congestion waitqueue.
      
      Also always use an interruptible wait since it makes sense to be able to
      SIGKILL the process even for mounts without 'intr'.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NTrond Myklebust <trond.myklebust@fys.uio.no>
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      89a09141
    • A
      [PATCH] swsusp: fix suspend when console is in VT_AUTO+KD_GRAPHICS mode · b257bc05
      Andrew Johnson 提交于
      When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the
      SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or
      until the task is interrupted.  This patch tests if a console switch can
      occur in set_console() and returns early if a console switch is not
      possible.
      
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: NAndrew Johnson <ajohnson@intrinsyc.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b257bc05
    • D
      [PATCH] gpio_direction_output() needs an initial value · 28735a72
      David Brownell 提交于
      It's been pointed out that output GPIOs should have an initial value, to
      avoid signal glitching ...  among other things, it can be some time before
      a driver is ready.  This patch corrects that oversight, fixing
      
       - documentation
       - platforms supporting the GPIO interface
       - users of that call (just one for now, others are pending)
      
      There's only one user of this call for now since most platforms are still
      using non-generic GPIO setup code, which in most cases already couples the
      initial value with its "set output mode" request.
      
      Note that most platforms are clear about the hardware letting the output
      value be set before the pin direction is changed, but the s3c241x docs are
      vague on that topic ...  so those chips might not avoid the glitches.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NAndrew Victor <andrew@sanpeople.com>
      Acked-by: NMilan Svoboda <msvoboda@ra.rockwell.com>
      Acked-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      28735a72
    • C
      [PATCH] spi: destroy workqueue after spi_unregister_master · a836f585
      Chris Lesiak 提交于
      Fix a bug in the cleanup of an spi_bitbang bus.
      
      The workqueue associated with the bus was destroyed before the call to
      spi_unregister_master.  That meant that spi devices on that bus would be
      unable to do IO in their remove method.  The shutdown flag should have been
      able to prevent a segfault, but was never getting set.  By waiting to
      destroy the workqueue until after the master is unregistered, devices are
      able to do IO in their remove methods.  An added benefit is that neither
      the shutdown flag nor a wait for the queue of messages to empty is needed.
      Signed-off-by: NChris Lesiak <chris.lesiak@licor.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a836f585
    • E
      [PATCH] ufs2: more correct work with time · 2189850f
      Evgeniy Dushistov 提交于
      This patch corrects work with time in UFS2 case.
      
      1) According to UFS2 disk layout modification/access and so on "time"
         should be hold in two variables one 64bit for seconds and another 32bit for
         nanoseconds,
      
         at now for some unknown reason we suppose that "inode time" holds in
         three variables 32bit for seconds, 32bit for milliseconds and 32bit for
         nanoseconds.
      
      2) We set amount of nanoseconds in "VFS inode" to 0 during read, instead of
         getting values from "on disk inode"(this should close
         http://bugzilla.kernel.org/show_bug.cgi?id=7991).
      Signed-off-by: NEvgeniy Dushistov <dushistov@mail.ru>
      Cc: Bjoern Jacke <bjoern@j3e.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2189850f
    • R
      [MIPS] Lockdep: Fix recursion bug. · 49edd098
      Ralf Baechle 提交于
       trace_hardirqs_off -> atomic_inc -> local_irq_restore -> trace_hardirqs_off
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      49edd098
    • R
      [MIPS] RTLX: Handle copy_*_user return values. · 46230aa6
      Ralf Baechle 提交于
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      46230aa6
    • A
      53dc8028
    • R
      [MIPS] IP27, IP35: Fix warnings. · f1dbf8e7
      Ralf Baechle 提交于
      include/asm-mips/mach-ip27/dma-coherence.h:22: warning: 'plat_map_dma_mem' defined but not used
      include/asm-mips/mach-ip27/dma-coherence.h:41: warning: 'plat_unmap_dma_mem' defined but not used
      include/asm-mips/mach-ip32/dma-coherence.h:30: warning: 'plat_map_dma_mem' defined but not used
      include/asm-mips/mach-ip32/dma-coherence.h:63: warning: 'plat_unmap_dma_mem' defined but not used
      
      These functions are meant to be inlined anyway.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f1dbf8e7
    • D
      [SPARC64]: Get DEBUG_PAGEALLOC working again. · d1acb421
      David S. Miller 提交于
      We have to make sure to use base-pagesize TLB entries even during the
      early transition period where we need TLB miss handling but don't have
      the kernel page tables setup yet for the linear region.
      
      Also, it is necessary therefore to not use the 4MB TSB for these
      translations, and instead use the normal kernel TSB.  This allows us
      to also get rid of the 4MB tsb for debug builds which shrinks the
      kernel a little bit.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1acb421
    • S
      [PATCH] x86-64: fix section mismatch warnings · 43999d9e
      Sam Ravnborg 提交于
      Fix the following section mismatch warnings on x86_64:
      (build using defconfig)
      
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:mtrr_bp_init from .text between 'identify_cpu' (at offset 0x65eb) and 'IRQ0x20_interrupt'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'finish_e820_parsing' (at offset 0x7dc2) and 'early_panic'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:e820_print_map from .text between 'finish_e820_parsing' (at offset 0x7de1) and 'early_panic'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'acpi_unmap_lsapic' (at offset 0xc88f) and 'acpi_register_ioapic'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:disabled_cpus from .text between 'MP_processor_info' (at offset 0x11f35) and 'mp_register_lapic'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'MP_processor_info' (at offset 0x11f6e) and 'mp_register_lapic'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:num_processors from .text between 'MP_processor_info' (at offset 0x11f93) and 'mp_register_lapic'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fix_aperture from .text between 'gart_parse_options' (at offset 0x15517) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fix_aperture from .text between 'gart_parse_options' (at offset 0x1552c) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x1553d) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15552) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15561) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'gart_parse_options' (at offset 0x15577) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fallback_aper_force from .text between 'gart_parse_options' (at offset 0x1558a) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:fallback_aper_order from .text between 'gart_parse_options' (at offset 0x155bf) and 'iommu_full'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:timer_over_8254 from .text between 'ati_bugs' (at offset 0x16344) and 'via_bugs'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:timer_over_8254 from .text between 'ati_bugs' (at offset 0x16356) and 'via_bugs'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_allowed from .text between 'via_bugs' (at offset 0x16380) and 'nvidia_bugs'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:iommu_aperture_disabled from .text between 'via_bugs' (at offset 0x16397) and 'nvidia_bugs'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:acpi_use_timer_override from .text between 'nvidia_bugs' (at offset 0x163a7) and 'arch_unregister_cpu'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:nvidia_hpet_check from .text between 'nvidia_bugs' (at offset 0x163b1) and 'arch_unregister_cpu'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'nvidia_bugs' (at offset 0x163be) and 'arch_unregister_cpu'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data: from .text between 'nvidia_bugs' (at offset 0x163d1) and 'arch_unregister_cpu'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.data:acpi_skip_timer_override from .text between 'nvidia_bugs' (at offset 0x163e1) and 'arch_unregister_cpu'
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:quirk_intel_irqbalance from .text between 'intel_bugs' (at offset 0x1633c) and 'ati_bugs'
      
      But adds:
      WARNING: arch/x86_64/kernel/built-in.o - Section mismatch: reference to .init.text:get_mtrr_state from .text between 'mtrr_bp_init' (at offset 0xb887) and 'ipi_handler'
      
      The warnings does not show up during a normal build due to kbuild
      failing to check for section mismatch in vmlinux.
      To see these warnings run:
      scripts/mod/modpost arch/x86_64/kernel/built-in.o
      
      kbuild will be fixed but the 'noise-level' had to be decresed first.
      There remains a few section mismatch warnigns for x86_64 for areas where I did
      not feel confident.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      43999d9e
  9. 16 3月, 2007 2 次提交
    • A
      [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390 · d9a9cdfb
      Alan Stern 提交于
      This patch (as868) adds a helper routine for device drivers that need
      to set up a callback to perform some action in a different process's
      context.  This is intended for use by attribute methods that want to
      unregister themselves or their parent device.  Attribute method calls
      are mutually exclusive with unregistration, so such actions cannot be
      taken directly.
      
      Two attribute methods are converted to use the new helper routine: one
      for SCSI device deletion and one for System/390 ccwgroup devices.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Oliver Neukum <oneukum@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9a9cdfb
    • S
      [ARM] 4264/1: ldrex/strex syntax errors with recent compilers · 0803c30c
      Stelian Pop 提交于
      Trying to build some code using atomic_clear_mask() on a ARM v6
      processor with a recent compiler (tried with gcc version 4.1.1
      (CodeSourcery ARM Sourcery G++ 2006q3-26), but
      all gcc > 4.1 might be affected) results in the following:
      
      /tmp/ccWKLJV8.s: Assembler messages:
      /tmp/ccWKLJV8.s:581: Error: instruction does not accept this addressing
      mode -- `ldrex r0,r3'
      /tmp/ccWKLJV8.s:583: Error: instruction does not accept this addressing
      mode -- `strex r1,r0,r3'
      
      Older gcc (like gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) have no problem
      with this.
      
      The patch below fixes the compile error. I also verified that gcc-4.0.0 generates identical code using both forms.
      Signed-off-by: NStelian Pop <stelian@popies.net>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0803c30c
  10. 15 3月, 2007 10 次提交