Re: Virtualbox + kgdb: Can't see vmlinux symbols
On Fri, 16 Jun 2017 13:24:58 -0700, Kamran Khan said: > This is happening only with kernel 4.8+. > > When I compile kernel 4.4 with a stock Ubuntu Xenial .config, symbols > appear just fine. > > When I compile kernel 4.8/4.10 with Yakkety/Zesty stock configs the > symbols disappear. What happens when you try to compile 4.8/r.10 with a Xenial .config? I'm willing to bet the problem is that the Xenial config turns on symbols and Yakkety/Zesty disable them by default. See these for further info: CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_REDUCED=y CONFIG_DEBUG_INFO_SPLIT=y It appears that you'll need DEBUG_INFO_REDUCED=n for kgdb to work properly. pgp4jwrnxYEv6.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Virtualbox + kgdb: Can't see vmlinux symbols
This is happening only with kernel 4.8+. When I compile kernel 4.4 with a stock Ubuntu Xenial .config, symbols appear just fine. When I compile kernel 4.8/4.10 with Yakkety/Zesty stock configs the symbols disappear. On Wed, Jun 14, 2017 at 4:58 PM, Kamran Khanwrote: > I have an Ubuntu 16.04 VM running in Virtualbox. > > I'm building kernel from git using make deb-pkg. > > After I install all the deb packages (including debug symbols) on the > VM and restart it, I can see in uname -r output that the appropriate > kernel was booted from. > > I'm passing the following parameters to the kernel: > >> kgdboc=ttyS0,115200 kgdbwait > > Once the kernel boots, I am able to connect to it via socat + gdb from host. > > I'm using the full uncompressed vmlinux file to start the gdb which > contains all the debugging symbols. > > However, I can't see any of the symbols in backtrace etc. > >> $ du -sh vmlinux >> 425M vmlinux >> $ gdb vmlinux >> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 >> Copyright (C) 2016 Free Software Foundation, Inc. >> License GPLv3+: GNU GPL version 3 or later [gnu.org] >> [...] >> For help, type "help". >> Type "apropos word" to search for commands related to "word"... >> Reading symbols from vmlinux...done. >> (gdb) target remote /dev/pts/2 >> Remote debugging using /dev/pts/2 >> 0xb113c5b4 in ?? () >> (gdb) bt >> #0 0xb113c5b4 in ?? () >> #1 0xb035421c7dd0 in ?? () >> #2 0xb113c60c in ?? () >> #3 0xb035421c7e00 in ?? () >> #4 0xb153035a in ?? () >> #5 0x0002 in irq_stack_union () >> #6 0x013a7408 in ?? () >> #7 0x8fb8bd0d3b00 in ?? () >> #8 0xb035421c7e18 in ?? () >> #9 0xb15307df in ?? () >> #10 0x8fb8b8779900 in ?? () >> #11 0xb035421c7e38 in ?? () >> #12 0xb12ab412 in ?? () >> #13 0x8fb8bd0d3b00 in ?? () > > > Any ideas what am I doing wrong? > > Thanks, > Kamran. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: ./include/linux/err.h:35:16: warning: dereference of noderef expression
On Tue, Jun 13, 2017 at 11:55:26AM +0200, Charlemagne Lasse wrote: > Hi, > > I have following code which generates a warning when compiling with "make > C=1". > > ~~~ > struct task_struct *kthread; > kthread = kthread_create(x, y, "z"); > if (IS_ERR(kthread)) { > ~~~ > > The warning is > > ./include/linux/err.h:35:16: warning: dereference of noderef expression > > And disappears when I remove the IS_ERR. How do I correctly work > around this incorrect warning? > > Btw. I am using Debian stretch amd64. It seems like this is related to > the __force used in the parameter list of IS_ERR. Removing it also > removes the warning. The warning is indeed related to '__force' but it should be the other way around. Anyway, by just reading your three lines of code, you shouldn't receive this warning, with or without the __force. > If it is fixed in sparse's git then when will there be a new release of it? I can't reproduce your problem even on a three years old version of sparse (more exactly git version d917662d5 of sparse, anything older has build problems with half-recent kernels). The pre-processed version of your file could be interesting as well as the output of the make command but with the 'V=1' option added. Regards, -- Luc Van Oostenryck ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
./include/linux/err.h:35:16: warning: dereference of noderef expression
Hi, I have following code which generates a warning when compiling with "make C=1". ~~~ struct task_struct *kthread; kthread = kthread_create(x, y, "z"); if (IS_ERR(kthread)) { ~~~ The warning is ./include/linux/err.h:35:16: warning: dereference of noderef expression And disappears when I remove the IS_ERR. How do I correctly work around this incorrect warning? Btw. I am using Debian stretch amd64. It seems like this is related to the __force used in the parameter list of IS_ERR. Removing it also removes the warning. If it is fixed in sparse's git then when will there be a new release of it? Greetings, Charlemagne Lasse ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Virtualbox + kgdb: Can't see vmlinux symbols
Disabling CONFIG_RANDOMIZE_MEMORY did not help. Disabled CONFIG_RANDOMIZE_BASE as well and the symbols came up. The weird thing is that CONFIG_RANDOMIZE_BASE is enabled on Xenial (4.4) kernel as well, but somehow having it enabled on Zesty (4.10) kernel throws off kgdb. Thanks, Kamran. On Fri, Jun 16, 2017 at 3:02 PM, Kamran Khanwrote: > The debug symbols are on for all of them, and gdb *does* load the > symbols. I have a suspicion that KASLR that was introduced around 4.7 > might be the culprit here. CONFIG_RANDOMIZE_MEMORY is an option that's > not present in the Xenial config. > > Anyone here has attached kgdb to 4.8/4.10? > > Thanks, > Kamran. > > On Fri, Jun 16, 2017 at 1:41 PM, wrote: >> On Fri, 16 Jun 2017 13:24:58 -0700, Kamran Khan said: >>> This is happening only with kernel 4.8+. >>> >>> When I compile kernel 4.4 with a stock Ubuntu Xenial .config, symbols >>> appear just fine. >>> >>> When I compile kernel 4.8/4.10 with Yakkety/Zesty stock configs the >>> symbols disappear. >> >> What happens when you try to compile 4.8/r.10 with a Xenial .config? >> >> I'm willing to bet the problem is that the Xenial config turns on symbols >> and Yakkety/Zesty disable them by default. >> >> See these for further info: >> >> CONFIG_DEBUG_INFO=y >> CONFIG_DEBUG_INFO_REDUCED=y >> CONFIG_DEBUG_INFO_SPLIT=y >> >> It appears that you'll need DEBUG_INFO_REDUCED=n for kgdb to work properly. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Virtualbox + kgdb: Can't see vmlinux symbols
The debug symbols are on for all of them, and gdb *does* load the symbols. I have a suspicion that KASLR that was introduced around 4.7 might be the culprit here. CONFIG_RANDOMIZE_MEMORY is an option that's not present in the Xenial config. Anyone here has attached kgdb to 4.8/4.10? Thanks, Kamran. On Fri, Jun 16, 2017 at 1:41 PM,wrote: > On Fri, 16 Jun 2017 13:24:58 -0700, Kamran Khan said: >> This is happening only with kernel 4.8+. >> >> When I compile kernel 4.4 with a stock Ubuntu Xenial .config, symbols >> appear just fine. >> >> When I compile kernel 4.8/4.10 with Yakkety/Zesty stock configs the >> symbols disappear. > > What happens when you try to compile 4.8/r.10 with a Xenial .config? > > I'm willing to bet the problem is that the Xenial config turns on symbols > and Yakkety/Zesty disable them by default. > > See these for further info: > > CONFIG_DEBUG_INFO=y > CONFIG_DEBUG_INFO_REDUCED=y > CONFIG_DEBUG_INFO_SPLIT=y > > It appears that you'll need DEBUG_INFO_REDUCED=n for kgdb to work properly. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: VFS: mount_bdev and fill_super
On 16-Jun-2017 11:44 AM, "Shrikant Giridhar"wrote: > I just had a quick look at mount_bdev() code for Linux v3.15, mount_bdev() > can return only root dentry or error. I'm sorry I should have been clearer. I was referring to the documentation mount() where it says that the call can return something other than the root dentry. I have not looked at the doc. More specifically, I don't understand how the what's the purpose of the if condition checking for s_root in mount_bdev(). Apologies if this is a trivial question. If s_root is set it means the superblock is already filled up so call fill_super() only if s_root is NULL meaning superblock is not filled yet. Tracking the calls all the way down didn't seem to make it clearer and I couldn't find specific documentation about the interface. > Also please include the kernel version to which you are referring. I have the 4.12-rc5 kernel. --- Shrikant - Rohan ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: VFS: mount_bdev and fill_super
> I just had a quick look at mount_bdev() code for Linux v3.15, mount_bdev() > can return only root dentry or error. I'm sorry I should have been clearer. I was referring to the documentation mount() where it says that the call can return something other than the root dentry. More specifically, I don't understand how the what's the purpose of the if condition checking for s_root in mount_bdev(). Apologies if this is a trivial question. Tracking the calls all the way down didn't seem to make it clearer and I couldn't find specific documentation about the interface. > Also please include the kernel version to which you are referring. I have the 4.12-rc5 kernel. --- Shrikant ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Struct sk_buff_head
Hi, On 06/07/2017 09:36 PM, wiktoria.lewicka wrote: > I read code from file include/linux/skbuff.h and I have question about > sk_buff_head structure. > [...] > Is this union replace sk_buff_head structure? > I didn`t found any field in sk_buff, which may use sk_buff_head, [...] As I can see it, sk_buff can be on double-linked list, and then it is linked by next and prev, or it is referenced by red-black tree, rb_node, depending of some network logic (packet type ?) Both are used by functions operating on structures. -- Best regards, Kamil Konieczny Samsung R Institute Poland ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies