Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with Linus #38

Merged
merged 192 commits into from
Feb 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
fa14a0b
cut down the number of do_path_lookup() callers
Jan 22, 2015
0851854
fs: rework getname_kernel to handle up to PATH_MAX sized filenames
pcmoore Jan 22, 2015
5168910
fs: create proper filename objects using getname_kernel()
pcmoore Jan 22, 2015
cbaab2d
simpler calling conventions for filename_mountpoint()
Jan 22, 2015
fd3522f
audit: enable filename recording via getname_kernel()
pcmoore Jan 22, 2015
57c59f5
audit: fix filename matching in __audit_inode() and __audit_inode_chi…
pcmoore Jan 22, 2015
55422d0
audit: replace getname()/putname() hacks with reference counters
pcmoore Jan 22, 2015
e09ddf3
debugfs_{mkdir,create,link}(): get rid of redundant argument
Jan 25, 2015
190afd8
debugfs: split the beginning and the end of __create_file() off
Jan 25, 2015
ad5abd5
debugfs: kill __create_file()
Jan 25, 2015
9b73fab
fold debugfs_link() into caller
Jan 25, 2015
160f759
debugfs_mknod(): get rid useless arguments
Jan 25, 2015
02538a7
fold debugfs_mkdir() into caller
Jan 25, 2015
3473cde
fold debugfs_create() into caller
Jan 25, 2015
680b302
fold debugfs_mknod() into callers
Jan 25, 2015
edac65e
debugfs: take mode-dependent parts of debugfs_get_inode() into callers
Jan 25, 2015
5233e31
debugfs: split end_creating() into success and failure cases
Jan 25, 2015
77b3da6
new primitive: debugfs_create_automount()
Jan 25, 2015
ad52184
selinuxfs: don't open-code d_genocide()
Dec 24, 2014
5e993e2
ncpfs: get rid of d_validate() nonsense
Dec 25, 2014
d6cb125
kill d_validate()
Dec 25, 2014
d443b9f
gut proc_register() a bit
Dec 25, 2014
5e9e204
get rid of lustre_dump_dentry()
Dec 27, 2014
f4a4a8b
file->f_path.dentry is pinned down for as long as the file is open...
Dec 28, 2014
92fc41c
mode_t whack-a-mole: chelsio
Jan 1, 2015
9e251d0
kill pin_put()
Jan 10, 2015
32426f6
pull bumping refcount into ->kill()
Jan 10, 2015
360f547
dcache: let the dentry count go down to zero without taking d_lock
torvalds Jan 9, 2015
34cece2
take count and rcu_head out of fs_pin
Jan 10, 2015
3b994d9
get rid of the second argument of acct_kill()
Jan 10, 2015
fdab684
allow attaching fs_pin to a group not associated with some superblock
Jan 11, 2015
59eda0e
new fs_pin killing logics
Jan 10, 2015
87b95ce
switch the IO-triggering parts of umount to fs_pin
Jan 11, 2015
05afcb7
new helper: iov_iter_bvec()
Jan 23, 2015
dbe4e19
fs: add vfs_iter_{read,write} helpers
Jan 25, 2015
5191f4d
netfilter: nft_compat: add ebtables support
aborrero Jan 29, 2015
4c1017a
netfilter: nft_lookup: add missing attribute validation for NFTA_LOOK…
kaber Jan 30, 2015
0ae45f6
vfs: add support for a lazytime mount option
tytso Feb 2, 2015
fe032c4
vfs: add find_inode_nowait() function
tytso Feb 2, 2015
a26f499
ext4: add optimization for the lazytime mount option
tytso Feb 2, 2015
ad7ef26
nios2: Remove unused prepare_to_copy()
tklauser Feb 9, 2015
96f3a5c
nios2: Port OOM changes to do_page_fault()
Feb 9, 2015
a2413d8
x86/mce: Fix regression. All error records should report via /dev/mcelog
aegl Feb 9, 2015
aeb2d2a
rtlwifi: Remove logging statement that is no longer needed
lwfinger Jan 20, 2015
e8bf5bc
nios2: add early printk support
Feb 10, 2015
0162362
nios2: Add support for compressed kernel
Feb 10, 2015
ad9e2c3
nios2: default CONFIG_NIOS2_BOOT_LINK_OFFSET to 8MB
Feb 9, 2015
7f368ad
Smack: secmark connections
cschaufler Feb 11, 2015
4a3046d
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
davem330 Feb 11, 2015
bf250a1
ipv6: Partial checksum only UDP packets
vyasevich Feb 10, 2015
80ad0d4
rds: rds_cong_queue_updates needs to defer the congestion update tran…
sowminiv Feb 10, 2015
f7219b5
treewide: Remove unnecessary BCMA_CORETABLE_END macro
JoePerches Feb 10, 2015
673e2ba
treewide: Remove unnecessary SSB_DEVTABLE_END macro
JoePerches Feb 10, 2015
b35725a
openvswitch: Reset key metadata for packet execution.
Feb 10, 2015
1310160
openvswitch: Add missing initialization in validate_and_copy_set_tun()
geertu Feb 11, 2015
26c4f7d
net: Fix remcsum in GRO path to not change packet
Feb 11, 2015
6edec0e
net: Clarify meaning of CHECKSUM_PARTIAL for receive path
Feb 11, 2015
6db93ea
udp: Set SKB_GSO_UDP_TUNNEL* in UDP GRO path
Feb 11, 2015
baa32ff
net: Use more bit fields in napi_gro_cb
Feb 11, 2015
15e2396
net: Infrastructure for CHECKSUM_PARTIAL with remote checsum offload
Feb 11, 2015
0ace2ca
vxlan: Use checksum partial with remote checksum offload
Feb 11, 2015
fe881ef
gue: Use checksum partial with remote checksum offload
Feb 11, 2015
777b3e9
Merge branch 'rco_correctness'
davem330 Feb 11, 2015
bc2f387
et131x: use msecs_to_jiffies for conversions
Feb 11, 2015
163cff3
drivers: net: xgene: Make xgene_enet_of_match depend on CONFIG_OF
geertu Feb 11, 2015
1d6c4cc
drivers/net: Use setup_timer and mod_timer
v-thakkar Feb 11, 2015
f7d70f7
sunvnet: don't change gso data on clones
Feb 11, 2015
de61390
net/mlx5_core: Fix configuration of log_uar_page_sz
Feb 11, 2015
fe79fab
qlcnic: Delete existing multicast MAC list before adding new
Feb 11, 2015
2169733
bgmac: fix device initialization on Northstar SoCs (condition typo)
rmilecki Feb 11, 2015
b3b482c
Merge tag 'wireless-drivers-for-davem-2015-02-11' of git://git.kernel…
davem330 Feb 12, 2015
d0af71a
tg3: Hold tp->lock before calling tg3_halt() from tg3_init_one()
nomuranec Feb 12, 2015
6aa6395
ipvlan: add a missing __percpu pcpu_stats
Feb 12, 2015
4762fb9
ipv6: fix possible deadlock in ip6_fl_purge / ip6_fl_gc
jstancek Feb 11, 2015
0ab39de
nfsd: fix comparison in fh_fsid_match()
Feb 11, 2015
9672723
bridge: netfilter: Move sysctl-specific error code inside #ifdef
geertu Feb 12, 2015
ba34e6d
tcp: make sure skb is not shared before using skb_get()
Feb 13, 2015
0416605
hso: fix rx parsing logic when skb allocation fails
aleksander0m Feb 13, 2015
3810631
PM / sleep: Re-implement suspend-to-idle handling
rafaeljw Feb 12, 2015
affe3e8
timekeeping: Pass readout base to update_fast_timekeeper()
rafaeljw Feb 11, 2015
65bab84
r8152: restore hw settings
hayesorz Feb 12, 2015
26ad0b8
openvswitch: Fix key serialization.
Feb 12, 2015
3b47117
ipv6: fix ipv6_cow_metrics for non DST_HOST case
iamkafai Feb 13, 2015
2b0ba96
net: phy: micrel: disable NAND-tree for KSZ8021, KSZ8031, KSZ8051, KS…
Feb 13, 2015
4a26e45
net/core: Fix warning while make xmldocs caused by dev.c
standby24x7 Feb 14, 2015
ca9f1fd
net: spelling fixes
shemminger Feb 14, 2015
74d6b3c
tpm: fix suspend/resume paths for TPM 2.0
Jan 29, 2015
4d5f205
tpm, tpm_tis: fix TPM 2.0 probing
Feb 4, 2015
0960b64
vhost_net: fix wrong iter offset when setting number of buffers
jasowang Feb 15, 2015
d95e2fe
com20020-pci: add support for eae single card
mgrzeschik Feb 13, 2015
7afb888
rtnetlink: call ->dellink on failure when ->newlink exists
congwang Feb 13, 2015
eb71f8a
Added Little Endian support to vtpm module
Feb 13, 2015
060407a
timekeeping: Make it safe to use the fast timekeeper while suspended
rafaeljw Feb 13, 2015
124cf91
PM / sleep: Make it possible to quiesce timers during suspend-to-idle
rafaeljw Feb 13, 2015
5fe2e52
intel_idle: Add ->enter_freeze callbacks
rafaeljw Feb 11, 2015
5f50818
ACPI / idle: Implement ->enter_freeze callback routine
rafaeljw Feb 11, 2015
cd07db5
Merge https://github.com/PeterHuewe/linux-tpmdd into for-linus
Feb 16, 2015
d0709f1
Don't leak a key reference if request_key() tries to use a revoked ke…
Feb 12, 2015
0d309cb
Merge branch 'smack-for-3.20-rebased' of git://git.gitorious.org/smac…
Feb 16, 2015
08c283c
MAINTAINERS: update arch/nios2 git tree
Feb 16, 2015
ab713cd
md/raid1: round up to bdev_logical_block_size in narrow_write_error
nhdailey Feb 12, 2015
f04ebb0
md/raid10: round up to bdev_logical_block_size in narrow_write_error.
neilbrown Feb 16, 2015
d16d2be
nios2: add kgdb support
Feb 16, 2015
a51f25a
nfsd4: fix v3-less build
Feb 13, 2015
c20f29f
Fix docs build failure caused by i2o removal
Feb 16, 2015
fb96a79
parisc: Wire up execveat syscall
hdeller Jan 10, 2015
0bd1e94
parisc: Add error checks when building up signal trampoline handler
hdeller Feb 3, 2015
04c1614
parisc: hpux - Drop support for HP-UX binaries
hdeller Feb 16, 2015
e28f295
parisc: hpux - Do not compile hpux subdirectory
hdeller Feb 16, 2015
863722e
parisc: hpux - Delete files in hpux subdirectory
hdeller Feb 16, 2015
c78c2b7
parisc: hpux - Remove hpux gateway page
hdeller Feb 16, 2015
cf635f8
parisc: hpux - Remove HPUX syscall numbers
hdeller Feb 16, 2015
876b2a0
parisc/uaccess: fix sparse errors
mstsirkin Jan 6, 2015
b9762e7
parisc: macro whitespace fixes
mstsirkin Jan 6, 2015
3d66b81
parisc: Remove unused function
Jan 2, 2015
35e88d5
fs/binfmt_som: Drop kernel support for HP-UX SOM binaries
hdeller Feb 17, 2015
e59b4e9
debugfs: Provide a file creation function that also takes an initial …
dhowells Jan 21, 2015
1933492
net: dsa: Set valid phy interface type
groeck Feb 17, 2015
1d9e714
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Feb 17, 2015
99fa0ad
Merge tag 'suspend-to-idle-3.20-rc1' of git://git.kernel.org/pub/scm/…
torvalds Feb 17, 2015
b0f0c26
Merge tag 'nios2-v3.20-rc1' of git://git.rocketboards.org/linux-socfp…
torvalds Feb 17, 2015
9cd7737
Merge branch 'parisc-3.20-1' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Feb 17, 2015
111d639
fs/befs/linuxvfs.c: remove unnecessary casting
Feb 17, 2015
b625032
fs/coda/dir.c: forward declaration clean-up
Feb 17, 2015
61da3ae
fs/ufs/super.c: remove unnecessary casting
Feb 17, 2015
ed3ad79
fs/ufs/super.c: fix potential race condition
Feb 17, 2015
714b71a
fs/reiserfs/inode.c: replace 0 by NULL for pointers
Feb 17, 2015
d6bd428
fs: fat: use MSDOS_SB macro to get msdos_sb_info
fredchound Feb 17, 2015
1cca338
ptrace: remove linux/compat.h inclusion under CONFIG_COMPAT
Feb 17, 2015
1df0135
signal: use current->state helpers
Feb 17, 2015
73d7e3e
kexec: remove never used member destination in kimage
Feb 17, 2015
ad69934
kexec: fix a typo in comment
0xAX Feb 17, 2015
9dc5c05
kexec: Fix make headers_check
glevand Feb 17, 2015
518a0c7
kexec: simplify conditional
glevand Feb 17, 2015
cf2df63
kexec: add bit definitions for kimage entry flags
glevand Feb 17, 2015
b28c2ee
kexec: add IND_FLAGS macro
glevand Feb 17, 2015
34b4776
vmcore: fix PT_NOTE n_namesz, n_descsz overflow issue
Feb 17, 2015
7647f14
lib/rbtree.c: fix typo in comment
johndela1 Feb 17, 2015
e22553e
eventfd: don't take the spinlock in eventfd_poll
masoncl Feb 17, 2015
08fe100
fs/affs: fix casting in printed messages
geertu Feb 17, 2015
afe305d
fs/affs/file.c: replace if/BUG by BUG_ON
Feb 17, 2015
92b2070
fs/affs/file.c: fix direct IO writes beyond EOF
Feb 17, 2015
4d29e57
fs/affs/super.c: destroy sbi mutex in affs_kill_sb()
Feb 17, 2015
eeb36f8
fs/affs: use unsigned int for string lengths
Feb 17, 2015
f157853
fs/affs: define AFFSNAMEMAX to replace constant use
Feb 17, 2015
b4478e3
fs/affs/amigaffs.c: remove else after return
Feb 17, 2015
211c2af
fs/affs/bitmap.c: remove unnecessary return
Feb 17, 2015
0cdfe18
fs/affs/inode.c: remove double extern affs_symlink_inode_operations
Feb 17, 2015
0445f01
fs/affs/super.c: fix switch indentation
Feb 17, 2015
3ee7b3f
scripts/gdb: add infrastructure
jan-kiszka Feb 17, 2015
2b51482
scripts/gdb: add cache for type objects
jan-kiszka Feb 17, 2015
b0fecd8
scripts/gdb: add container_of helper and convenience function
jan-kiszka Feb 17, 2015
850202e
scripts/gdb: add module iteration class
jan-kiszka Feb 17, 2015
6605172
scripts/gdb: add lx-symbols command
jan-kiszka Feb 17, 2015
be02a18
kernel/module.c: do not inline do_init_module()
jan-kiszka Feb 17, 2015
82b41e3
scripts/gdb: add automatic symbol reloading on module insertion
jan-kiszka Feb 17, 2015
7b599ef
scripts/gdb: add internal helper and convenience function to look up …
jan-kiszka Feb 17, 2015
7f99496
scripts/gdb: add get_target_endianness helper
jan-kiszka Feb 17, 2015
78e8781
scripts/gdb: add read_u16/32/64 helpers
jan-kiszka Feb 17, 2015
ae7dbaa
scripts/gdb: add lx-dmesg command
jan-kiszka Feb 17, 2015
7704d58
scripts/gdb: add task iteration class
jan-kiszka Feb 17, 2015
4752871
scripts/gdb: add helper and convenience function to look up tasks
jan-kiszka Feb 17, 2015
b24e2d2
scripts/gdb: add is_target_arch helper
jan-kiszka Feb 17, 2015
cf7492e
scripts/gdb: add internal helper and convenience function to retrieve…
jan-kiszka Feb 17, 2015
a4d8679
scripts/gdb: add get_gdbserver_type helper
jan-kiszka Feb 17, 2015
fe7f9ed
scripts/gdb: add internal helper and convenience function for per-cpu…
jan-kiszka Feb 17, 2015
116b47b
scripts/gdb: add lx_current convenience function
jan-kiszka Feb 17, 2015
3d4cd9c
scripts/gdb: add class to iterate over CPU masks
jan-kiszka Feb 17, 2015
5403727
scripts/gdb: add lx-lsmod command
jan-kiszka Feb 17, 2015
bda1a92
scripts/gdb: add basic documentation
jan-kiszka Feb 17, 2015
276d97d
scripts/gdb: port to python3 / gdb7.7
pkt Feb 17, 2015
2478a8a
scripts/gdb: ignore byte-compiled python files
daniel-thompson Feb 17, 2015
54e2289
scripts/gdb: use a generator instead of iterator for task list
Feb 17, 2015
fffb944
scripts/gdb: convert ModuleList to generator function
jan-kiszka Feb 17, 2015
a77e15e
scripts/gdb: convert CpuList to generator function
jan-kiszka Feb 17, 2015
158daf1
scripts/gdb: define maintainer
jan-kiszka Feb 17, 2015
a9c5bcf
scripts/gdb: disable pagination while printing from breakpoint handler
jan-kiszka Feb 17, 2015
52644c9
ipc,sem: use current->state helpers
Feb 17, 2015
3a9af0b
samples/seccomp: improve label helper
kees Feb 17, 2015
580c57f
seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO
kees Feb 17, 2015
e2b74f2
Merge branch 'akpm' (patches from Andrew)
torvalds Feb 17, 2015
5065296
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Feb 17, 2015
c6b1de1
Merge branch 'debugfs_automount' of git://git.kernel.org/pub/scm/linu…
torvalds Feb 17, 2015
05016b0
Merge branch 'getname2' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Feb 17, 2015
66dc830
Merge branch 'iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Feb 17, 2015
0389115
Merge branch 'lazytime' of git://git.kernel.org/pub/scm/linux/kernel/…
torvalds Feb 18, 2015
26ac107
md/raid5: Fix livelock when array is both resyncing and degraded.
neilbrown Feb 18, 2015
533cf7a
Merge branch 'for-3.20' of git://linux-nfs.org/~bfields/linux
torvalds Feb 18, 2015
fbe4da4
Merge tag 'docs-fix' of git://git.lwn.net/linux-2.6
torvalds Feb 18, 2015
d96c757
Merge tag 'please-pull-fixmcelog' of git://git.kernel.org/pub/scm/lin…
torvalds Feb 18, 2015
0d695d6
Merge tag 'md/3.20-fixes' of git://neil.brown.name/md
torvalds Feb 18, 2015
f5af19d
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
torvalds Feb 18, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Module.symvers
/TAGS
/linux
/vmlinux
/vmlinux-gdb.py
/vmlinuz
/System.map
/Module.markers
Expand Down
17 changes: 0 additions & 17 deletions Documentation/DocBook/device-drivers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -190,23 +190,6 @@ X!Edrivers/pnp/system.c
!Idrivers/message/fusion/mptfc.c
!Idrivers/message/fusion/mptlan.c
</sect1>
<sect1><title>I2O message devices</title>
!Iinclude/linux/i2o.h
!Idrivers/message/i2o/core.h
!Edrivers/message/i2o/iop.c
!Idrivers/message/i2o/iop.c
!Idrivers/message/i2o/config-osm.c
!Edrivers/message/i2o/exec-osm.c
!Idrivers/message/i2o/exec-osm.c
!Idrivers/message/i2o/bus-osm.c
!Edrivers/message/i2o/device.c
!Idrivers/message/i2o/device.c
!Idrivers/message/i2o/driver.c
!Idrivers/message/i2o/pci.c
!Idrivers/message/i2o/i2o_block.c
!Idrivers/message/i2o/i2o_scsi.c
!Idrivers/message/i2o/i2o_proc.c
</sect1>
</chapter>

<chapter id="snddev">
Expand Down
160 changes: 160 additions & 0 deletions Documentation/gdb-kernel-debugging.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
Debugging kernel and modules via gdb
====================================

The kernel debugger kgdb, hypervisors like QEMU or JTAG-based hardware
interfaces allow to debug the Linux kernel and its modules during runtime
using gdb. Gdb comes with a powerful scripting interface for python. The
kernel provides a collection of helper scripts that can simplify typical
kernel debugging steps. This is a short tutorial about how to enable and use
them. It focuses on QEMU/KVM virtual machines as target, but the examples can
be transferred to the other gdb stubs as well.


Requirements
------------

o gdb 7.2+ (recommended: 7.4+) with python support enabled (typically true
for distributions)


Setup
-----

o Create a virtual Linux machine for QEMU/KVM (see www.linux-kvm.org and
www.qemu.org for more details). For cross-development,
http://landley.net/aboriginal/bin keeps a pool of machine images and
toolchains that can be helpful to start from.

o Build the kernel with CONFIG_GDB_SCRIPTS enabled, but leave
CONFIG_DEBUG_INFO_REDUCED off. If your architecture supports
CONFIG_FRAME_POINTER, keep it enabled.

o Install that kernel on the guest.

Alternatively, QEMU allows to boot the kernel directly using -kernel,
-append, -initrd command line switches. This is generally only useful if
you do not depend on modules. See QEMU documentation for more details on
this mode.

o Enable the gdb stub of QEMU/KVM, either
- at VM startup time by appending "-s" to the QEMU command line
or
- during runtime by issuing "gdbserver" from the QEMU monitor
console

o cd /path/to/linux-build

o Start gdb: gdb vmlinux

Note: Some distros may restrict auto-loading of gdb scripts to known safe
directories. In case gdb reports to refuse loading vmlinux-gdb.py, add

add-auto-load-safe-path /path/to/linux-build

to ~/.gdbinit. See gdb help for more details.

o Attach to the booted guest:
(gdb) target remote :1234


Examples of using the Linux-provided gdb helpers
------------------------------------------------

o Load module (and main kernel) symbols:
(gdb) lx-symbols
loading vmlinux
scanning for modules in /home/user/linux/build
loading @0xffffffffa0020000: /home/user/linux/build/net/netfilter/xt_tcpudp.ko
loading @0xffffffffa0016000: /home/user/linux/build/net/netfilter/xt_pkttype.ko
loading @0xffffffffa0002000: /home/user/linux/build/net/netfilter/xt_limit.ko
loading @0xffffffffa00ca000: /home/user/linux/build/net/packet/af_packet.ko
loading @0xffffffffa003c000: /home/user/linux/build/fs/fuse/fuse.ko
...
loading @0xffffffffa0000000: /home/user/linux/build/drivers/ata/ata_generic.ko

o Set a breakpoint on some not yet loaded module function, e.g.:
(gdb) b btrfs_init_sysfs
Function "btrfs_init_sysfs" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (btrfs_init_sysfs) pending.

o Continue the target
(gdb) c

o Load the module on the target and watch the symbols being loaded as well as
the breakpoint hit:
loading @0xffffffffa0034000: /home/user/linux/build/lib/libcrc32c.ko
loading @0xffffffffa0050000: /home/user/linux/build/lib/lzo/lzo_compress.ko
loading @0xffffffffa006e000: /home/user/linux/build/lib/zlib_deflate/zlib_deflate.ko
loading @0xffffffffa01b1000: /home/user/linux/build/fs/btrfs/btrfs.ko

Breakpoint 1, btrfs_init_sysfs () at /home/user/linux/fs/btrfs/sysfs.c:36
36 btrfs_kset = kset_create_and_add("btrfs", NULL, fs_kobj);

o Dump the log buffer of the target kernel:
(gdb) lx-dmesg
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.8.0-rc4-dbg+ (...
[ 0.000000] Command line: root=/dev/sda2 resume=/dev/sda1 vga=0x314
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
....

o Examine fields of the current task struct:
(gdb) p $lx_current().pid
$1 = 4998
(gdb) p $lx_current().comm
$2 = "modprobe\000\000\000\000\000\000\000"

o Make use of the per-cpu function for the current or a specified CPU:
(gdb) p $lx_per_cpu("runqueues").nr_running
$3 = 1
(gdb) p $lx_per_cpu("runqueues", 2).nr_running
$4 = 0

o Dig into hrtimers using the container_of helper:
(gdb) set $next = $lx_per_cpu("hrtimer_bases").clock_base[0].active.next
(gdb) p *$container_of($next, "struct hrtimer", "node")
$5 = {
node = {
node = {
__rb_parent_color = 18446612133355256072,
rb_right = 0x0 <irq_stack_union>,
rb_left = 0x0 <irq_stack_union>
},
expires = {
tv64 = 1835268000000
}
},
_softexpires = {
tv64 = 1835268000000
},
function = 0xffffffff81078232 <tick_sched_timer>,
base = 0xffff88003fd0d6f0,
state = 1,
start_pid = 0,
start_site = 0xffffffff81055c1f <hrtimer_start_range_ns+20>,
start_comm = "swapper/2\000\000\000\000\000\000"
}


List of commands and functions
------------------------------

The number of commands and convenience functions may evolve over the time,
this is just a snapshot of the initial version:

(gdb) apropos lx
function lx_current -- Return current task
function lx_module -- Find module by name and return the module variable
function lx_per_cpu -- Return per-cpu variable
function lx_task_by_pid -- Find Linux task by PID and return the task_struct variable
function lx_thread_info -- Calculate Linux thread_info from task variable
lx-dmesg -- Print Linux kernel log buffer
lx-lsmod -- List currently loaded modules
lx-symbols -- (Re-)load symbols of Linux kernel and currently loaded modules

Detailed help can be obtained via "help <command-name>" for commands and "help
function <function-name>" for convenience functions.
7 changes: 6 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4232,6 +4232,11 @@ W: http://www.icp-vortex.com/
S: Supported
F: drivers/scsi/gdt*

GDB KERNEL DEBUGGING HELPER SCRIPTS
M: Jan Kiszka <jan.kiszka@siemens.com>
S: Supported
F: scripts/gdb/

GEMTEK FM RADIO RECEIVER DRIVER
M: Hans Verkuil <hverkuil@xs4all.nl>
L: linux-media@vger.kernel.org
Expand Down Expand Up @@ -6876,7 +6881,7 @@ F: drivers/scsi/nsp32*
NIOS2 ARCHITECTURE
M: Ley Foon Tan <lftan@altera.com>
L: nios2-dev@lists.rocketboards.org (moderated for non-subscribers)
T: git git://git.rocketboards.org/linux-socfpga.git
T: git git://git.rocketboards.org/linux-socfpga-next.git
S: Maintained
F: arch/nios2/

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,9 @@ ifdef CONFIG_SAMPLES
endif
ifdef CONFIG_BUILD_DOCSRC
$(Q)$(MAKE) $(build)=Documentation
endif
ifdef CONFIG_GDB_SCRIPTS
$(Q)ln -fsn `cd $(srctree) && /bin/pwd`/scripts/gdb/vmlinux-gdb.py
endif
+$(call if_changed,link-vmlinux)

Expand Down Expand Up @@ -1181,7 +1184,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
signing_key.priv signing_key.x509 x509.genkey \
extra_certificates signing_key.x509.keyid \
signing_key.x509.signer
signing_key.x509.signer vmlinux-gdb.py

# clean - Delete most, but leave enough to build external modules
#
Expand Down
9 changes: 9 additions & 0 deletions arch/nios2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ config NIOS2
select GENERIC_IRQ_PROBE
select GENERIC_IRQ_SHOW
select HAVE_ARCH_TRACEHOOK
select HAVE_ARCH_KGDB
select IRQ_DOMAIN
select MODULES_USE_ELF_RELA
select OF
Expand Down Expand Up @@ -134,6 +135,14 @@ config NIOS2_PASS_CMDLINE
will override "Default kernel command string".
Say N if you are unsure.

config NIOS2_BOOT_LINK_OFFSET
hex "Link address offset for booting"
default "0x00500000"
help
This option allows you to set the link address offset of the zImage.
This can be useful if you are on a board which has a small amount of
memory.

endmenu

menu "Advanced setup"
Expand Down
11 changes: 11 additions & 0 deletions arch/nios2/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@ config DEBUG_STACK_USAGE

This option will slow down process creation somewhat.

config EARLY_PRINTK
bool "Activate early kernel debugging"
default y
select SERIAL_CORE_CONSOLE
depends on SERIAL_ALTERA_JTAGUART_CONSOLE || SERIAL_ALTERA_UART_CONSOLE
help
Enable early printk on console
This is useful for kernel debugging when your machine crashes very
early before the console code is initialized.
You should normally say N here, unless you want to debug such a crash.

endmenu
7 changes: 7 additions & 0 deletions arch/nios2/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ $(obj)/vmImage: $(obj)/vmlinux.gz
$(call if_changed,uimage)
@$(kecho) 'Kernel: $@ is ready'

$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy)
@$(kecho) 'Kernel: $@ is ready'

$(obj)/compressed/vmlinux: $(obj)/vmlinux.gz FORCE
$(Q)$(MAKE) $(build)=$(obj)/compressed $@

# Rule to build device tree blobs
DTB_SRC := $(patsubst "%",%,$(CONFIG_NIOS2_DTB_SOURCE))

Expand Down
19 changes: 19 additions & 0 deletions arch/nios2/boot/compressed/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# create a compressed vmlinux image from the original vmlinux
#

targets := vmlinux head.o misc.o piggy.o vmlinux.lds
asflags-y :=

OBJECTS = $(obj)/head.o $(obj)/misc.o

LDFLAGS_vmlinux := -T

$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE
$(call if_changed,ld)
@:

LDFLAGS_piggy.o := -r --format binary --oformat elf32-littlenios2 -T

$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/../vmlinux.gz FORCE
$(call if_changed,ld)
Loading