summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2006-03-05[PATCH] die_if_kernel() can return (CVE-2006-0742)Tony Luck
arch/ia64/kernel/unaligned.c erroneously marked die_if_kernel() with a "noreturn" attribute ... which is silly (it returns whenever the argument regs say that the fault happened in user mode, as one might expect given the "if_kernel" part of its name!). Thanks to Alan and Gareth for pointing this out. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-03-01[PATCH] Fix s390 build failure.Dave Jones
arch/s390/kernel/compat_signal.c:199: error: conflicting types for 'do_sigaction' include/linux/sched.h:1115: error: previous declaration of 'do_sigaction' was here Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-01[PATCH] sys32_signal() forgets to initialize ->sa_maskTony Luck
Pointed out by Oleg Nesterov <oleg@tv-sign.ru>, who in turn got the hint from Linus. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-01[PATCH] i386: Move phys_proc_id/early intel workaround to correct functionAndi Kleen
early_cpu_detect only runs on the BP, but this code needs to run on all CPUs. This will fix problems with the powernow-k8 driver on dual core systems and general misdetection of AMD dual core. Looks like a mismerge somewhere. Also add a warning comment. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-01[PATCH] ppc32: Put cache flush routines back into .relocate_code sectionTom Rini
In 2.6.14, we had the following definition of _GLOBAL() in include/asm-ppc/processor.h: #define _GLOBAL(n)\ .stabs __stringify(n:F-1),N_FUN,0,0,n;\ .globl n;\ n: In 2.6.15, as part of the great powerpc merge, we moved this definition to include/asm-powerpc/ppc_asm.h, where it appears (to 32-bit code) as: #define _GLOBAL(n) \ .text; \ .stabs __stringify(n:F-1),N_FUN,0,0,n;\ .globl n; \ n: Mostly, this is fine. However, we also have the following, in arch/ppc/boot/common/util.S: .section ".relocate_code","xa" [...] _GLOBAL(flush_instruction_cache) [...] _GLOBAL(flush_data_cache) [...] The addition of the .text section definition in the definition of _GLOBAL overrides the .relocate_code section definition. As a result, these two functions don't end up in .relocate_code, so they don't get relocated correctly, and the boot fails. There's another suspicious-looking usage at kernel/swsusp.S:37 that someone should look into. I did not exhaustively search the source tree, though. The following is the minimal patch that fixes the immediate problem. I could easily be convinced that the _GLOBAL definition should be modified to remove the ".text;" line either instead of, or in addition to, this fix. Signed-off-by: Paul Janzen <pcj@linux.sez.to> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-02-09[PATCH] x86_64: Dont record local apic ids when they are disabled in MADTAshok Raj
Some broken BIOS's had processors disabled, but same apic id as a valid processor. This causes acpi_processor_start() to think this disabled cpu is ok, and croak. So we dont record bad apicid's anymore. http://bugzilla.kernel.org/show_bug.cgi?id=5930 Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-09[PATCH] x86_64: Clear more state when ignoring empty node in SRAT parsingAndi Kleen
Fix boot failures on systems with bad PXMs. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-09[PATCH] x86_64: Let impossible CPUs point to reference per cpu dataAndi Kleen
Don't mark the reference per cpu data init data (so it stays around after boot) and point all impossible CPUs to it. This way they reference some valid - although shared memory. Usually this is only initialization like INIT_LIST_HEADs and there won't be races because these CPUs never run. Still somewhat hackish. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-09[PATCH] Kill compat_sys_clock_settime sign extension stub.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-30[PATCH] Mask off GFP flags before swiotlb_alloc_coherentAndi Kleen
Mask off GFP flags before swiotlb_alloc_coherent Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Chris Wright <chris@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-30[PATCH] Fix timekeeping on sparc64 ultra-IIe machinesRichard Mortimer
[SPARC64]: Eliminate race condition reading Hummingbird STICK register Ensure a consistent value is read from the STICK register by ensuring that both high and low are read without high changing due to a roll over of the low register. Various Debian/SPARC users (myself include) have noticed problems with Hummingbird based systems. The symptoms are that the system time is seen to jump forward 3 days, 6 hours, 11 minutes give or take a few seconds. In many cases the system then hangs some time afterwards. I've spotted a race condition in the code to read the STICK register. I could not work out why 3d, 6h, 11m is important but guess that it is due to the 2^32 jump of STICK (forwards on one read and then the next read will seem to be backwards) during a timer interrupt. I'm guessing that a change of -2^32 will get converted to a large unsigned increment after the arithmetic manipulation between STICK, nanoseconds, jiffies etc. I did a test where I modified __hbird_read_stick to artificially inject rollover faults forcefully every few seconds. With this I saw the clock jump over 6 times in 12 hours compared to once every month or so. Signed-off-by: Richard Mortimer <richm@oldelvet.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-14[PATCH] arch/sparc64/Kconfig: fix HUGETLB_PAGE_SIZE_64K dependenciesAdrian Bunk
This patch fixes a typo in the dependencies of HUGETLB_PAGE_SIZE_64K. This bug was reported by Jean-Luc Leger <reiga@dspnet.fr.eu.org>. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-01-14[PATCH] Fix sys_fstat64() entry in 64-bit syscall table.David S. Miller
Noticed by Jakub Jelinek. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-01-14[PATCH] Fix ptrace/straceRichard Mortimer
Don't clobber register %l0 while checking TI_SYS_NOERROR value in syscall return path. This bug was introduced by: db7d9a4eb700be766cc9f29241483dbb1e748832 Problem narrowed down by Luis F. Ortiz and Richard Mortimer. I tried using %l2 as suggested by Luis and that works for me. Looking at the code I wonder if it makes sense to simplify the code a little bit. The following works for me but I'm not sure how to exercise the "NOERROR" codepath. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-01-14[PATCH] ppc32: Re-add embed_config.c to ml300/ep405Peter Korsgaard
Commit 3e9e7c1d0b7a36fb8affb973a054c5098e27baa8 (ppc32: cleanup AMCC PPC40x eval boards to support U-Boot) broke the kernel for ML300 / EP405. It still compiles as there's a weak definition of the function in misc-embedded.c, but the kernel crashes as the bd_t fixup isn't performed. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2005-12-31[PATCH] x86: teach dump_task_regs() about the -8 offset.Stas Sergeev
This should fix multi-threaded core-files Signed-off-by: stsp@aknet.ru Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] ppc64: htab_initialize_secondary cannot be marked __initAnton Blanchard
Sonny has noticed hotplug CPU on ppc64 is broken in 2.6.15-*. One of the problems is that htab_initialize_secondary is called when a cpu is being brought up, but it is marked __init. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] x86_64: Fix incorrect node_present_pages on NUMARavikiran G Thirumalai
Currently, we do not pass the correct start_pfn to e820_hole_size, to calculate holes. Following patch fixes that. The bug results in incorrect number of node_present_pages for each pgdat and causes ugly output in /sys and probably VM inbalances. Signed-off-by: Alok N Kataria <alokk@calsoftinc.com> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Andi Kleen <ak@suse.de> Sighed-off-by: Shair Fultheim <shai@scalex86.org> Sighed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] uml: fix compilation with CONFIG_MODE_TT disabledPaolo 'Blaisorblade' Giarrusso
Fix UML compilation when SKAS mode is disabled. Indeed, we were compiling SKAS-only object files, which failed due to some SKAS-only headers being excluded from the search path. Thanks to the bug report from Pekka J Enberg. Acked-by: Pekka J Enberg <penberg (at) cs ! helsinki ! fi> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] Hostfs: update for new glibc - add missing symbol exportsPaolo 'Blaisorblade' Giarrusso
Today, when compiling UML, I got warnings for two used unexported symbols: readdir64 and truncate64. Indeed, my glibc headers are aliasing readdir to readdir64 and truncate to truncate64 (and so on). I'm then adding additional exports. Since I've no idea if the symbols where always provided in the supported glibc's, I've added weak definitions too. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] uml: fix random segfaults at bootupPaolo 'Blaisorblade' Giarrusso
Don't use printk() where "current_thread_info()" is crap. Until when we switch to running on init_stack, current_thread_info() evaluates to crap. Printk uses "current" at times (in detail, &current is evaluated with CONFIG_DEBUG_SPINLOCK to check the spinlock owner task). And this leads to random segmentation faults. Exactly, what happens is that &current = *(current_thread_info()), i.e. round down $esp and dereference the value. I.e. access the stack below $esp, which causes SIGSEGV on a VM_GROWSDOWN vma (see arch/i386/mm/fault.c). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-28[SPARC]: Use STABS_DEBUG and DWARF_DEBUG macros in vmlinux.lds.SDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22[SPARC]: Kill CHILD_MAX.David S. Miller
It's definition is wrong (-1 means "no limit" not 999), only the Sparc SunOS/Solaris compat code uses it, so let's just kill it off completely from limits.h and all referencing code. Noticed by Ulrich Drepper. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22[SPARC]: introduce a SPARC Kconfig symbolAdrian Bunk
Introduce a Kconfig symbol SPARC that is defined on both the sparc and sparc64 architectures. This symbol makes some dependencies more readable. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22powerpc: Fix i8259 cascade on pSeries with XICS interrupt controllerPaul Mackerras
It turns out that commit f9bd170a87948a9e077149b70fb192c563770fdf broke the cascade from XICS to i8259 on pSeries machines; specifically we ended up not ever doing the EOI on the XICS for the cascade. The result was that interrupts from the serial ports (and presumably any other devices using ISA interrupts) didn't get through. This fixes it and also simplifies the code, by doing the EOI on the XICS in the xics_get_irq routine after reading and acking the interrupt on the i8259. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-20[SPARC64]: Stop putting -finline-limit=XXX into CFLAGSDavid S. Miller
It was a stupid workaround for the "static inline" vs. "extern inline" issues of long ago, and it is what causes schedule() to be inlined like crazy into kernel/sched.c when -Os is specified. MIPS and S390 should probably do the same. Now CC_OPTIMIZE_FOR_SIZE can be safely used on sparc64 once more. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-20[PATCH] Fix build with CONFIG_PCI_MMCONFIGAndi Kleen
Now needs to include the type 1 functions ("direct") too. Reported by Pavel Roskin <proski@gnu.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds
2005-12-20powerpc: update defconfigsPaul Mackerras
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-20[PATCH] powerpc: CPM2 interrupt handler failure after 100,000 interruptsEdson Seabra
The CPM2 interrupt handler does not return success to the IRQ subsystem, which causes it to kill the IRQ line after 100,000 interrupts. Signed-off-by: Edson Seabra <Edson.Seabra@cyclades.com> Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-20powerpc: correct register usage in 64-bit syscall exit pathPaul Mackerras
Since we don't restore the volatile registers in the syscall exit path, we need to make sure we don't leak any potentially interesting values from the kernel to userspace. This was already the case for all except r11. This makes it use r11 for an MSR value, so r11 will have an (uninteresting) MSR value in it on return to userspace. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-19Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
2005-12-19[ARM] 3210/1: add missing memory barrier helper for NPTL supportNicolas Pitre
Patch from Nicolas Pitre Strictly speaking, the NPTL kernel helpers are required for pre ARMv6 only. They are available on ARMv6+ as well for obvious compatibility reasons. However there are cases where extra memory barriers are needed when using an SMP ARMv6 machine but not on pre-ARMv6. This patch adds a memory barrier kernel helper that glibc can use as needed for pre-ARMv6 binaries to be forward compatible with an SMP kernel on ARMv6, as well as the necessary dmb instructions to the cmpxchg helper. Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-18[PATCH] uml skas0: stop gcc's insanityJeff Dike
With Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> UML skas0 stub has been miscompiling for many people (incidentally not the authors), depending on the used GCC versions. I think (and testing on some GCC versions shows) this patch avoids the fundamental issue which is behind this, namely gcc using the stack when we have just replaced it, behind gcc's back. The remapping and storage of the return value is hidden in a blob of asm, hopefully giving gcc no room for creativity. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] uml - fix some funkiness in KconfigPaolo 'Blaisorblade' Giarrusso
So you may have seen the miniconfig stuff wander by, which means that my build script exits if there's a .config error, and we have this: fs/Kconfig:1749:warning: 'select' used by config symbol 'CIFS_UPCALL' refer to undefined symbol 'CONNECTOR' This makes it shut up. Signed-off-by: Rob Landley <rob@landley.net> [ Verified it makes sense. ] Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] uml: fix dynamic linking on some 64-bit distrosRob Landley
With Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> The current UML build assumes that on x86-64 systems, /lib is a symlink to /lib64, but in some distributions (like PLD and CentOS) they are separate directories, so the 64 bit library loader isn't found. This patch inserts /lib64 at the start of the rpath on x86-64 UML builds. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] uml: arch/um/scripts/Makefile.rules - remove duplicated codePaolo 'Blaisorblade' Giarrusso
Duplicated code - the patch adding it was probably applied twice without enough care. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-17[ARM] Fix sys_sendto and sys_recvfrom 6-arg syscallsRussell King
Rather than providing more wrappers for 6-arg syscalls, arrange for them to be supported as standard. This just means that we always store the 6th argument on the stack, rather than in the wrappers. This means we eliminate the wrappers for: * sys_futex * sys_arm_fadvise64_64 * sys_mbind * sys_ipc Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-16Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-12-16[PATCH] ppc: ppc4xx_dma DMA_MODE_{READ,WRITE} fixAl Viro
DMA_MODE_{READ,WRITE} are declared in asm-powerpc/dma.h and their declarations there match the definitions. Old declarations in ppc4xx_dma.h are not right anymore (wrong type, to start with). Killed them, added include of asm/dma.h where needed. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-16[PATCH] PCI: Fix dumb bug in mmconfig fixAndi Kleen
Use correct address when referencing mmconfig aperture while checking for broken MCFG. This was a typo when porting the code from 64bit to 32bit. It caused oopses at boot on some ThinkPads. Should definitely go into 2.6.15. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-16[IA64] Add __read_mostly support for IA64Christoph Lameter
sparc64, i386 and x86_64 have support for a special data section dedicated to rarely updated data that is frequently read. The section was created to avoid false sharing of those rarely read data with frequently written kernel data. This patch creates such a data section for ia64 and will group rarely written data into this section. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64-SGI] change default_sn2 to NR_CPUS==1024hawkes@sgi.com
Change the NR_CPUS default for ia64/sn up to 1024. Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: John Hesterberg <jh@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64-SGI] Missed TLB flushJack Steiner
I see why the problem exists only on SN. SN uses a different hardware mechanism to purge TLB entries across nodes. It looks like there is a bug in the SN TLB flushing code. During context switch, kernel threads inherit the mm of the task that was previously running on the cpu. This confuses the code in sn2_global_tlb_purge(). The result is a missed TLB purge for the task that owns the "borrowed" mm. (I hit the problem running heavy stress where kswapd was purging code pages of a user task that woke kswapd. The user task took a SIGILL fault trying to execute code in the page that had been ripped out from underneath it). Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64] uncached ref count leakJes Sorensen
Use raw_smp_processor_id() instead of get_cpu() as we don't need the extra features of get_cpu(). Signed-off-by: Jes Sorensen <jes@trained-monkey.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64] disable preemption in udelay()John Hawkes
The udelay() inline for ia64 uses the ITC. If CONFIG_PREEMPT is enabled and the platform has unsynchronized ITCs and the calling task migrates to another CPU while doing the udelay loop, then the effective delay may be too short or very, very long. This patch disables preemption around 100 usec chunks of the overall desired udelay time. This minimizes preemption-holdoffs. udelay() is now too big to be inline, move it out of line and export it. Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-15[PATCH] arch/powerpc/kernel/syscalls.c __user annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] arch/alpha/kernel/machvec_impl.h: C99 struct initializerAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] ia64 sn __iomem annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] i386,amd64: ioremap.c __iomem annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>