05 Aug, 2010
22 commits
-
Implement the callbacks for KDB entry/exit via the drm helpers.
Signed-off-by: Jesse Barnes
Signed-off-by: Jason Wessel -
Add fb ops to handle enter/exit of the kernel debugger. If present, the
fb core will register them with KGDB and they'll be called when the
debugger is entered and exited. The new functions are responsible for
switching to an appropriate debug framebuffer and restoring the
interrupted state at exit time.Signed-off-by: Jesse Barnes
Signed-off-by: Jason Wessel -
Add the kms keyword processing to kgdboc and the callbacks to invoke
console switching when ever kgdboc is started with "kgdboc=kms,kbd".Signed-off-by: Jason Wessel
Signed-off-by: Jesse Barnes -
The kernel console interface stores the number of lines it is
configured to use. The kdb debugger can greatly benefit by knowing how
many lines there are on the console for the pager functionality
without having the end user compile in the setting or have to
repeatedly change it at run time.Signed-off-by: Jason Wessel
Signed-off-by: Jesse Barnes
CC: David Airlie
CC: Andrew Morton -
These functions allow the kernel debugger to save and restore the
state of the system console.Signed-off-by: Jesse Barnes
Signed-off-by: Jason Wessel
CC: David Airlie
CC: Andrew Morton -
When an arch such as mips and microblaze does not implement either HW
or software single stepping the debug core should re-enter kdb. The
kdb code will properly ignore the single step operation. Attempting
to single step the kernel without software or hardware support causes
unpredictable kernel crashes.Signed-off-by: Jason Wessel
-
Use the macros provided by the HW breakpoint API.
Signed-off-by: Dongdong Deng
Signed-off-by: Jason Wessel -
The mips kgdb specific code does not support software or HW single
stepping so it should not implementSigned-off-by: Jason Wessel
Signed-off-by: Dongdong Deng
Acked-by: Ralf Baechle
CC: linux-mips@linux-mips.org -
The kdb kmap should never get used outside of the kernel debugger
exception context.Signed-off-by: Jason Wessel
CC: Andrew Morton
CC: Ingo Molnar
CC: linux-mm@kvack.org -
Found by gcc 4.6's new warnings
Signed-off-by: Andi Kleen
Signed-off-by: Jason Wessel -
In systems with more than one processor it is desirable to look at the
per cpu trace buffers.Signed-off-by: Jason Wessel
Acked-by: Steven Rostedt
CC: Frederic Weisbecker -
Add in a helper function to allow the kdb shell to dump the ftrace
buffer.Modify trace.c to expose the capability to iterate over the ftrace
buffer in a read only capacity.Signed-off-by: Jason Wessel
Acked-by: Steven Rostedt
CC: Frederic Weisbecker -
kgdb_handle_breakpoint checks the first arch_kgdb_breakpoint
which is not known by gdb that's why is necessary jump over
it. The jump lenght is equal to BREAK_INSTR_SIZE that's
why is cleaner to use defined macro instead of hardcoded
non-described offset.Signed-off-by: Michal Simek
Signed-off-by: Jason Wessel
Acked-by: Benjamin Herrenschmidt -
Now that ARM implements the notify die handlers, add the ability for
the kernel debugger to receive the notifications.Signed-off-by: Jason Wessel
CC: Russell King
CC: linux-arm-kernel@lists.infradead.org -
Presently the usable registers definitions on x86 are not contiguous
for kgdb. The x86 kgdb uses a case statement for the sparse register
accesses. The array which defines the registers (dbg_reg_def) should
not be used directly in order to safely work with sparse register
definitions.Specifically there was a problem when gdb accesses ORIG_AX, which is
accessed only through the case statement.This patch encodes register memory using the size information provided
from the debugger which avoids the need to look up the size of the
register. The dbg_set_reg() function always further validates the
inputs from the debugger.Signed-off-by: Jason Wessel
Signed-off-by: Dongdong Deng -
The gdbserial 'p' and 'P' packets allow gdb to individually get and
set registers instead of querying for all the available registers.Signed-off-by: Jason Wessel
-
Implement the ability to individually get and set registers for kdb
and kgdb for arm.Signed-off-by: Jason Wessel
CC: Russell King
CC: linux-arm-kernel@lists.infradead.org -
Implement the ability to individually get and set registers for kdb
and kgdb for mips.Signed-off-by: Jason Wessel
Acked-by: Ralf Baechle
CC: linux-mips@linux-mips.org -
Implement the ability to individually get and set registers for kdb
and kgdb for x86.Signed-off-by: Jason Wessel
Acked-by: H. Peter Anvin
CC: Ingo Molnar
CC: x86@kernel.org -
The kdb shell specification includes the ability to get and set
architecture specific registers by name.For the time being individual register get and set will be implemented
on a per architecture basis. If an architecture defines
DBG_MAX_REG_NUM > 0 then kdb and the gdbstub will use the capability
for individually getting and setting architecture specific registers.Signed-off-by: Jason Wessel
-
The gdb debugger understands how to parse short versions of the thread
reference string as long as the bytes are paired in sets of two
characters. The kgdb implementation was always sending 8 leading
zeros which could be omitted, and further optimized in the case of
non-negative thread numbers. The negative numbers are used to
reference a specific cpu in the case of kgdb.An example of the previous i386 stop packet looks like:
T05thread:00000000000003bb;New stop packet response:
T05thread:03bb;The previous ThreadInfo response looks like:
m00000000fffffffe,0000000000000001,0000000000000002,0000000000000003,0000000000000004,0000000000000005,0000000000000006,0000000000000007,000000000000000c,0000000000000088,000000000000008a,000000000000008b,000000000000008c,000000000000008d,000000000000008e,00000000000000d4,00000000000000d5,00000000000000ddNew ThreadInfo response:
mfffffffe,01,02,03,04,05,06,07,0c,88,8a,8b,8c,8d,8e,d4,d5,ddA few bytes saved means better response time when using kgdb over a
serial line.Signed-off-by: Jason Wessel
-
Signed-off-by: Andy Shevchenko
Signed-off-by: Jason Wessel
02 Aug, 2010
2 commits
-
nfs_commit_inode() needs to be defined irrespectively of whether or not
we are supporting NFSv3 and NFSv4.Allow the compiler to optimise away code in the NFSv2-only case by
converting it into an inlined stub function.Reported-and-tested-by: Ingo Molnar
Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds
31 Jul, 2010
13 commits
-
* master.kernel.org:/home/rmk/linux-2.6-arm:
cyber2000fb: fix console in truecolor modes
cyber2000fb: fix machine hang on module load
SA1111: Eliminate use after free
ARM: Fix Versatile/Realview/VExpress MMC card detection sense
ARM: 6279/1: highmem: fix SMP preemption bug in kmap_high_l1_vipt
ARM: Add barriers to io{read,write}{8,16,32} accessors as well
ARM: 6273/1: Add barriers to the I/O accessors if ARM_DMA_MEM_BUFFERABLE
ARM: 6272/1: Convert L2x0 to use the IO relaxed operations
ARM: 6271/1: Introduce *_relaxed() I/O accessors
ARM: 6275/1: ux500: don't use writeb() in uncompress.h
ARM: 6270/1: clean files in arch/arm/boot/compressed/
ARM: Fix csum_partial_copy_from_user() -
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: Ensure that writepage respects the nonblock flag
NFS: kswapd must not block in nfs_release_page
nfs: include space for the NUL in root path -
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/edid: Fix the HDTV hack sync adjustment
drm/radeon/kms: fix radeon mid power profile reporting -
Debian's ia64 autobuilders have been seeing kernel freeze or reboot
when running the gdb testsuite (Debian bug 588574): dannf bisected to
2.6.32 62eede62dafb4a6633eae7ffbeb34c60dba5e7b1 "mm: ZERO_PAGE without
PTE_SPECIAL"; and reproduced it with gdb's gcore on a simple target.I'd missed updating the gate_vma handling in __get_user_pages(): that
happens to use vm_normal_page() (nowadays failing on the zero page),
yet reported success even when it failed to get a page - boom when
access_process_vm() tried to copy that to its intermediate buffer.Fix this, resisting cleanups: in particular, leave it for now reporting
success when not asked to get any pages - very probably safe to change,
but let's not risk it without testing exposure.Why did ia64 crash with 16kB pages, but succeed with 64kB pages?
Because setup_gate() pads each 64kB of its gate area with zero pages.Reported-by: Andreas Barth
Bisected-by: dann frazier
Signed-off-by: Hugh Dickins
Tested-by: dann frazier
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds -
Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the
module init routine in case of error, and so may have been discarded during
linkage.Signed-off-by: David Howells
Acked-by: Jeff Layton
Signed-off-by: Linus Torvalds -
Return value was not set to 0 in setcolreg() with truecolor modes. This causes
fb_set_cmap() to abort after first color, resulting in blank palette - and
blank console in 24bpp and 32bpp modes.Signed-off-by: Ondrej Zary
Signed-off-by: Russell King -
I was testing two CyberPro 2000 based PCI cards on x86 and the machine always
hanged completely when the cyber2000fb module was loaded. It seems that the
card hangs when some registers are accessed too quickly after writing RAMDAC
control register. With this patch, both card work.Add delay after RAMDAC control register write to prevent hangs on module load.
Signed-off-by: Ondrej Zary
Signed-off-by: Russell King -
__sa1111_remove always frees its argument, so the subsequent reference to
sachip->saved_state represents a use after free. __sa1111_remove does not
appear to use the saved_state field, so the patch simply frees it first.A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@@
expression E,E2;
@@__sa1111_remove(E)
...
(
E = E2
|
* E
)
//Signed-off-by: Julia Lawall
Signed-off-by: Russell King -
The MMC card detection sense has become really confused with negations
at various levels, leading to some platforms not detecting inserted
cards. Fix this by converting everything to positive logic throughout,
thereby getting rid of these negations.Signed-off-by: Russell King
-
smp_processor_id() must not be called from a preemptible context (this
is checked by CONFIG_DEBUG_PREEMPT). kmap_high_l1_vipt() was doing so.
This lead to a problem where the wrong per_cpu kmap_high_l1_vipt_depth
could be incremented, causing a BUG_ON(*depthSigned-off-by: Gary King
Acked-by: Nicolas Pitre
Signed-off-by: Russell King -
Signed-off-by: Trond Myklebust
-
See https://bugzilla.kernel.org/show_bug.cgi?id=16056
If other processes are blocked waiting for kswapd to free up some memory so
that they can make progress, then we cannot allow kswapd to block on those
processes.Signed-off-by: Trond Myklebust
Cc: stable@kernel.org -
In root_nfs_name() it does the following:
if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) {
printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n");
return -1;
}
sprintf(nfs_export_path, buf, cp);In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN)
then the sprintf() would lead to an overflow. Generally the rest of the
code assumes that the path can have NFS_MAXPATHLEN (1024) characters and
a NUL terminator so the fix is to add space to the nfs_export_path[]
buffer.Signed-off-by: Dan Carpenter
Signed-off-by: Trond Myklebust
30 Jul, 2010
3 commits
-
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] etr: fix clock synchronization race
[S390] Fix IRQ tracing in case of PER -
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
watchdog: update MAINTAINERS entry -
* 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Add a PC-beep workaround for ASUS P5-V
ALSA: hda - Assume PC-beep as default for Realtek
ALSA: hda - Don't register beep input device when no beep is available
ALSA: hda - Fix pin-detection of Nvidia HDMI