Re: Boot log before panic
How you access the log depends on the Linux distribution you're using (whether its systemd based or not). If you have journalctl, you can get the last boot log with $ journalctl -k -b 1 (-k is to get get dmesg logs) HTH, -mandeep On Fri, Feb 9, 2024 at 2:12 PM Abdulrasaq Lawani wrote: > > Hi all, > > Please, how do I locate the logs for a system boot that had a kernel panic > before booting was completed? > > Best regards, > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to handle Hotplug with UIO userspace driver
On Thu, Sep 28, 2017 at 11:51 AM, Divakar wrote: > Hi Mandeep, > Recently i encountered similar issue with UIO framework in hotplug > scenario. I reviewed the earlier patch from 2010 and your 4 patch > series. 4 patch series seems to work. I checked the latest kernel > source and i dont think your patches have been merged. Hopefully > i am not looking at the wrong place. If they are not merged is there > a plan to merge them ? I do think these patches are required. > > Thats correct. The patches have not been merged. I no longer have the hardware available and have moved away from the project that needed it, therefore I was unable to carry with the patches (they were still under review). It'd be great if you can resubmit those. Make sure they apply cleanly to the latest staging branch (?). I think Greg had asked some question regarding during the review, it would be good if you can pick it up from there. GKH (who's on this list too) can weigh in more on this. Good luck. -mandeep > I also found a bug in your patch set which is discussed here > https://lkml.org/lkml/2017/6/14/30. I was able to workaround/fix it. > I can upload a patch if needed. > > Please advice if you plan to get the patchset merged. > > Thanks > Divakar > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: kgdb debug with ttyUSB0 instead of ttyS0
> > echo ttyUSB0 > /sys/module/kgdboc/parameters/kgdboc > > but only got: > > echo write error: No such device > Is the USB-to-serial device detected on your target? Do you see a ttyUSB0 device node on your target? You can look at the kernel logs on your target when you insert the device. If the kernel has the drivers for it, you should see a device node being created. -mandeep > > if I try: > > echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc > > is not complaining. Some ideas why ttyUSB0 can't be used with kgdb? > > Best regards, > > Oliver > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Patch Question
On Mon, Apr 17, 2017 at 4:28 PM, Perry Hooker wrote: > Hi everyone, > > I recently submitted a patch to the kernel mailing list: > https://lkml.org/lkml/2017/3/21/712 lkml.org seems to be down! Wow, what did you do!?! :P -mandeep > > > I received some feedback on the patch. After a bit of polite > back-and-forth, the respondent stopped replying when I asked for more > information, and I haven't heard anything from the maintainers. > > Based on my analysis (contained in the thread), I still think the > patch is correct & appropriate. > > What's the best way to determine if this is a good fix or not? > How should I proceed if the patch is, in fact, a good fix? > > Best regards, > Perry > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to browse the code
On Wed, Apr 12, 2017 at 2:46 PM, Mandeep Sandhu wrote: > On Wed, Apr 12, 2017 at 2:41 PM, Code Soldier1 > wrote: > >> Yes that is possible but it is very time consuming. Let's say I get >> 500 hits ? Try searching for destructor in linux kernel code. I am >> only interested in the one that is defined in sk_buff. >> > > Look at cscope & ctags for such queries. Both tools will list all > instances where the said identifier is declared. If a field is defined in > multiple structs, you will get multiple results from which you have to sift > through (it will still be less than free-text search that you'd do on lxr > though). > > Also, please reply to the list (and not to me directly). Others on this > list might have better suggestions. > (and I myself forgot to CC the list! :P) -mandeep > HTH, > -mandeep > > > >> >> On Wed, Apr 12, 2017 at 2:28 PM, Mandeep Sandhu >> wrote: >> > On Wed, Apr 12, 2017 at 2:25 PM, Code Soldier1 >> > wrote: >> >> >> >> Thanks. This does not completely solve my issue. I am looking for >> >> something that can associate a field name with the structure. >> > >> > >> > Well, you can search for a field's use using free-text search, then >> looks at >> > the line of code to figure out what struct it's part of, no? :) >> > >> > -mandeep >> > >> > >> >> >> >> >> >> On Tue, Apr 11, 2017 at 1:13 PM, Mandeep Sandhu >> >> wrote: >> >> >> >> >> >> I am looking for something that can list all the places that a >> certain >> >> >> field of a certain structure is used. For example, sk_buff has a >> field >> >> >> called destructor, but so do many other data structures. How do I >> >> >> search for places where just the destructor field of sk_buff. >> >> > >> >> > >> >> > I think lxr has an identifier & free-text search (powered by >> google). If >> >> > that doesn't do it for you, you can go "old school" and try cscope >> >> > maybe? >> >> > >> >> > HTH, >> >> > -mandeep >> >> > >> >> > >> >> >> >> >> >> >> >> >> Thanks a lot. >> >> >> >> >> >> -- >> >> >> CS1 >> >> >> >> >> >> ___ >> >> >> Kernelnewbies mailing list >> >> >> Kernelnewbies@kernelnewbies.org >> >> >> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> >> > >> >> > >> >> >> >> >> >> >> >> -- >> >> CS1 >> > >> > >> >> >> >> -- >> CS1 >> > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to browse the code
On Wed, Apr 12, 2017 at 2:25 PM, Code Soldier1 wrote: > Thanks. This does not completely solve my issue. I am looking for > something that can associate a field name with the structure. > Well, you can search for a field's use using free-text search, then looks at the line of code to figure out what struct it's part of, no? :) -mandeep > > On Tue, Apr 11, 2017 at 1:13 PM, Mandeep Sandhu > wrote: > >> > >> I am looking for something that can list all the places that a certain > >> field of a certain structure is used. For example, sk_buff has a field > >> called destructor, but so do many other data structures. How do I > >> search for places where just the destructor field of sk_buff. > > > > > > I think lxr has an identifier & free-text search (powered by google). If > > that doesn't do it for you, you can go "old school" and try cscope maybe? > > > > HTH, > > -mandeep > > > > > >> > >> > >> Thanks a lot. > >> > >> -- > >> CS1 > >> > >> ___ > >> Kernelnewbies mailing list > >> Kernelnewbies@kernelnewbies.org > >> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > > > > > -- > CS1 > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to browse the code
> > > I am looking for something that can list all the places that a certain > field of a certain structure is used. For example, sk_buff has a field > called destructor, but so do many other data structures. How do I > search for places where just the destructor field of sk_buff. > I think lxr has an identifier & free-text search (powered by google). If that doesn't do it for you, you can go "old school" and try cscope maybe? HTH, -mandeep > > Thanks a lot. > > -- > CS1 > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: iptables-translate command not found
This is query is not related to the Linux kernel, IMO. You'll find better help in MLs for the Linux distribution you're using or possibly on the netfilter ML. You should post your query there. -mandeep On Fri, Oct 14, 2016 at 6:50 AM, Gargi Sharma wrote: > Hi! > > I am looking to translate iptable rules to nftables and when I run the > command sudo iptables-translate I get , command not found. > > The path for iptables command is /sbin/iptables. > > The other commands related to iptables that are available are: > iptables-save > iptables-restore > ip6tables > > How do I install iptables-translate? From what I have understood from > looking around is that iptables-translate comes with the iptables package. > > Thanks! > Gargi > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: rules for interface naming for on-board cards
> > If the name contains a %d format string, the first available device > name with the given base is used; assigned numbers start at zero. > > On my base machine, I have 1 NIC card which is onboard, rest I can > remove and plug. > For the onboard card I get the interfaces as em1-4, while all the > other cards I get names as p1p2, p3p4 etc. This looks like systemd's way of naming network interfaces (aka predictable network interface names). Are you running a systemd enabled system? If so, look at this systemd guide for the naming convention: https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/ HTH, -mandeep > > Does Udev know the difference. > > How are these names given, definitely there must be some configuration > which is used to distinguish on-board card vs removable. > > Thanks. > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: UIO driver test
>> * Main initialization/remove routines >> */ >> static int __init uio_dummy_init(void) >> { >> printk("uio_dummy_init( )\n" ); >> uio_dummy_device = platform_device_register_simple("uio_dummy", -1, >>NULL, 0); You also need to register the UIO driver by calling uio_register_device() after populating your "struct uio_info" appropriately. > > Why are you using a platform driver and device on x86? That's not going > to work at all, as your device doesn't have an irq. Please use this on > a "real" device that has an interrupt assigned to it. If it's only for learning purpose, I guess one can skip registering a IRQ handler and use UIO_IRQ_CUSTOM, right? I did something similar for testing a UIO hotplug bug once. I used to fake an IRQ event from a timer by using uio_event_notify(). https://github.com/mandeepsandhu/uio-hotplug-test/blob/master/uio_fake_hotplug.c Although, I'm not sure if the OP wants to do something similar HTH, -mandeep > > hope this helps, > > greg k-h > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What are need to makes humidifier?
Wrong list. This has nothing to do with the Linux kernel. On Tue, Jan 12, 2016 at 12:11 AM, 윤영석 wrote: > Hi, > > I want to make own humidifier. > > What sensor need when making humidifier?? > > > > humidity indicator (detecting humidity), ultrasonic waves maker?? > > Please shares your wisdom to me. > > > > Thanks. > > Best regards. > > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [PATCH] allow strictatime to be set as a global default
Looks good to me. To test the real watersyou should send it to the lists you mentioned (or whatever the maintainers script tells you). Good luck, -mandeep On Sat, Dec 19, 2015 at 1:41 PM, Raymond Jennings wrote: > How does this version look? > > (the other delta for the other file was untouched) > > Any chance it is ready to post to the big list (presumably fs with a cc to > lkml)? > > diff --git a/fs/Kconfig b/fs/Kconfig > index 6ce72d8..122a993 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -4,6 +4,20 @@ > > menu "File systems" > > +config DEFAULT_STRICTATIME > + bool "Use strictatime by default" > + default n > + help > + Use strictatime as a default mount option. > + > + Relatime became the default in 2007 to reduce I/O load on block devices. > + > + Enabling this option will restore historic behavior and provide perfectly > + accurate atimes, but the increase in write load may reduce performance > + and shorten the life of the block device. > + > + If unsure, say N. > + > # Use unaligned word dcache accesses > config DCACHE_WORD_ACCESS > bool > > On Fri, Dec 18, 2015 at 2:21 PM, Mandeep Sandhu > wrote: >> >> Ah yes...now it makes sense! :) >> >> The current 'word of caution' (about increased I/O load on block >> devices), seems mild IMHO. Maybe we should we have a stricter >> warning...something like enabling this option might be harmful to the >> life of your block device (due to excessive writes) and will also lead >> to reduced performance? >> >> HTH, >> -mandeep >> >> >> On Fri, Dec 18, 2015 at 2:12 PM, Raymond Jennings >> wrote: >> > On Fri, Dec 18, 2015 at 10:50 AM, Mandeep Sandhu >> > wrote: >> >> >> >> You've removed the strictatime option altogether. So how does that >> >> satisfy people who _do_ want it? >> > >> > >> > ...actually it looks like I was an idiot and got my diff backwards when >> > I >> > pulled it out of git :P >> > >> > Here's the correct version. >> > >> > diff --git a/fs/Kconfig b/fs/Kconfig >> > index 6ce72d8..4b917eb 100644 >> > --- a/fs/Kconfig >> > +++ b/fs/Kconfig >> > @@ -4,6 +4,17 @@ >> > >> > menu "File systems" >> > >> > +config DEFAULT_STRICTATIME >> > + bool "Use strictatime by default" >> > + default n >> > + help >> > + Use strictatime as a default mount option. >> > + >> > + Strictatime preserves ancient historic behavior of keeping the >> > atime field always up to date. >> > + However, it was changed in 2007 to relatime to reduce I/O load >> > on >> > block devices. >> > + >> > + If unsure, say N. >> > + >> > # Use unaligned word dcache accesses >> > config DCACHE_WORD_ACCESS >> >bool >> > diff --git a/fs/namespace.c b/fs/namespace.c >> > index 0570729..48e7c15 100644 >> > --- a/fs/namespace.c >> > +++ b/fs/namespace.c >> > @@ -2680,9 +2680,15 @@ long do_mount(const char *dev_name, const char >> > __user >> > *dir_name, >> > if (retval) >> > goto dput_out; >> > >> > - /* Default to relatime unless overriden */ >> > +#ifdef CONFIG_DEFAULT_STRICTATIME >> > + /* Default to strictatime unless overridden */ >> > + if (flags & MS_RELATIME) >> > + mnt_flags |= MNT_RELATIME; >> > +#else >> > + /* Default to relatime unless overridden */ >> > if (!(flags & MS_NOATIME)) >> > mnt_flags |= MNT_RELATIME; >> > +#endif >> > >> > >> > /* Separate the per-mountpoint flags */ >> > if (flags & MS_NOSUID) >> > >> > >> > > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [PATCH] allow strictatime to be set as a global default
Ah yes...now it makes sense! :) The current 'word of caution' (about increased I/O load on block devices), seems mild IMHO. Maybe we should we have a stricter warning...something like enabling this option might be harmful to the life of your block device (due to excessive writes) and will also lead to reduced performance? HTH, -mandeep On Fri, Dec 18, 2015 at 2:12 PM, Raymond Jennings wrote: > On Fri, Dec 18, 2015 at 10:50 AM, Mandeep Sandhu > wrote: >> >> You've removed the strictatime option altogether. So how does that >> satisfy people who _do_ want it? > > > ...actually it looks like I was an idiot and got my diff backwards when I > pulled it out of git :P > > Here's the correct version. > > diff --git a/fs/Kconfig b/fs/Kconfig > index 6ce72d8..4b917eb 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -4,6 +4,17 @@ > > menu "File systems" > > +config DEFAULT_STRICTATIME > + bool "Use strictatime by default" > + default n > + help > + Use strictatime as a default mount option. > + > + Strictatime preserves ancient historic behavior of keeping the > atime field always up to date. > + However, it was changed in 2007 to relatime to reduce I/O load on > block devices. > + > + If unsure, say N. > + > # Use unaligned word dcache accesses > config DCACHE_WORD_ACCESS >bool > diff --git a/fs/namespace.c b/fs/namespace.c > index 0570729..48e7c15 100644 > --- a/fs/namespace.c > +++ b/fs/namespace.c > @@ -2680,9 +2680,15 @@ long do_mount(const char *dev_name, const char __user > *dir_name, > if (retval) > goto dput_out; > > - /* Default to relatime unless overriden */ > +#ifdef CONFIG_DEFAULT_STRICTATIME > + /* Default to strictatime unless overridden */ > + if (flags & MS_RELATIME) > + mnt_flags |= MNT_RELATIME; > +#else > + /* Default to relatime unless overridden */ > if (!(flags & MS_NOATIME)) > mnt_flags |= MNT_RELATIME; > +#endif > > > /* Separate the per-mountpoint flags */ > if (flags & MS_NOSUID) > > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [PATCH] allow strictatime to be set as a global default
You've removed the strictatime option altogether. So how does that satisfy people who _do_ want it? Is there some other option that will enable it? Just curious. -mandeep On Fri, Dec 18, 2015 at 6:42 AM, Raymond Jennings wrote: > I'm aware of a little tiff regarding strictatime in the past, and I > think I came up with a patch that might help everyone get what they > want. I'm already using it myself. > > I've had some review on #kernelnewbies for technical issues, how does > this look? > > --- > > diff --git a/fs/Kconfig b/fs/Kconfig > index 4b917eb..6ce72d8 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -4,17 +4,6 @@ > > menu "File systems" > > -config DEFAULT_STRICTATIME > - bool "Use strictatime by default" > - default n > - help > - Use strictatime as a default mount option. > - > - Strictatime preserves ancient historic behavior of keeping the > atime field always up to date. > - However, it was changed in 2007 to relatime to reduce I/O load on > block devices. > - > - If unsure, say N. > - > # Use unaligned word dcache accesses > config DCACHE_WORD_ACCESS > bool > diff --git a/fs/namespace.c b/fs/namespace.c > index 48e7c15..0570729 100644 > --- a/fs/namespace.c > +++ b/fs/namespace.c > @@ -2680,15 +2680,9 @@ long do_mount(const char *dev_name, const char > __user *dir_name, > if (retval) > goto dput_out; > > -#ifdef CONFIG_DEFAULT_STRICTATIME > - /* Default to strictatime unless overridden */ > - if (flags & MS_RELATIME) > - mnt_flags |= MNT_RELATIME; > -#else > - /* Default to relatime unless overridden */ > + /* Default to relatime unless overriden */ > if (!(flags & MS_NOATIME)) > mnt_flags |= MNT_RELATIME; > -#endif > > /* Separate the per-mountpoint flags */ > if (flags & MS_NOSUID) > > > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: UIO Kernel Driver with Buildroot and QEMU
>> I'm on linux kernel version 3.14, and I followed the guide here: >> >> https://www.kernel.org/doc/htmldocs/uio-howto/userspace_driver.html >> >> And it describes the location on where the device file that should be >> opened by userland code as either one of two locations: >> >> /dev/uioX, with X being a number >> >> or /sys/class/uio/uioX >> >> But the each of following returns nothing: >> >> ls /dev/uio* >> ls /sys/class/uio/ >> >> After I compile the uio example that is provided in the linux source at >> source/drivers/uio/uio.c and uio_dmem_genirq.c, and insmod them, I do >> modprobe uio and modprobe uio_dmem_genirq and each of those return nothing. >> However, I do see that /sys/modules/uio and /sys/modules/uio_dmem_genirq Have a look at this sample driver I wrote sometime back to trigger a UIO issue: https://github.com/mandeepsandhu/uio-hotplug-test I have not had the time to look at where it differs from your implemntation, but I'll leave that to you to figure out :) This create the /devuioX device file which the userspace code is opening. HTH, -mandeep >> >> >> What am I doing wrong? Or where are the respective device files that I'm >> supposed to use in my userland driver process? >> >> int fd = open("where is it!!?"); >> mmap(, fd,..); > > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: What is negative lookup in linux filesystem
>From the context of the snippet you posted, it looks like the author implies a "failed lookup" when s/he writes "negative lookup". CMIIW. -mandeep On Mon, Oct 5, 2015 at 8:08 AM, Praveen Kumar wrote: > Hi, > > I am trying to understand the path-lookup in linux filesystem and was going > through https://www.kernel.org/doc/Documentation/filesystems/path-lookup.txt > > Under 'Rename' heading, I came across the negative lookup terminology, > snapshot below > > 'Between deleting the dentry from the old hash list, and inserting it on the > new > hash list, a lookup may find neither 'A' nor 'B' matching the dentry. The > same > rename seqlock is also used to cover this race in much the same way, by > retrying a negative lookup result if a rename was in progress.' > > Can anyone please help understanding the negative lookup concept and how do > we achieve it. Thanks in advance. > > Regards, > > ~Praveen. > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: cross-compiling kernel using a 32-bit toolchain on a 64-bit machine
So I found the issue (it was a PIBKAC issue :/) I was using sudo to try and build the kernel (this was due to a messed up setup where the whole kernel src tree ended up being written by root). When copy-pasting my command here, I missed copying the sudo part and that was precisely the reason for the error. When invoking sudo, I think the current shells environment variables are not copied (probably due to security reasons) and that's why it was not picking up the toolchain paths. Once I fixed the permissions on the source tree and invoke make as regular user, it started working. Sorry about the noise, I should've figured this out earlier. On Tue, Apr 7, 2015 at 9:15 AM, Lad, Prabhakar wrote: > On Mon, Apr 6, 2015 at 11:50 PM, Mandeep Sandhu > wrote: >> Hi All, >> >> I'm having trouble compiling my kernel using a 32-bit toolchain (for >> ARM) on a 64-bit host (Ubuntu 14.10). The kernel version is 3.14.17. >> >> I understand that 32-bit binaries require "ia32-libs" (or equivalent) >> for compiling on 64-bit hosts. I installed the required packages >> (lib32z1 lib32ncurses5 lib32bz2-1.0 for Ubuntu 14.10), but still keep >> getting errors: >> >> $ make CROSS_COMPILE=arm-none-linux-gnueabi- all >> Makefile:616: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: >> -fstack-protector not supported by compiler >> make: arm-none-linux-gnueabi-gcc: Command not found > > Have built this toolchain or just downloaded from coudesourcery ? > Go to the source where you downloaded toolchain (on your machine not > the website) > traverse to bin directory and try ./arm-none-linux-gnueabi-gcc --version. > > Cheers, > --Prabhakar Lad ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: cross-compiling kernel using a 32-bit toolchain on a 64-bit machine
> Edit .config and set CONFIG_CROSS_COMPILE to the path where your cross > compiler is located. This doesn't help either! :/ I'll start afresh. Maybe my setup got messed-up somehow. Thanks anyway! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: cross-compiling kernel using a 32-bit toolchain on a 64-bit machine
On Mon, Apr 6, 2015 at 5:27 PM, John de la Garza wrote: > On Mon, Apr 06, 2015 at 03:50:41PM -0700, Mandeep Sandhu wrote: >> >> I'm having trouble compiling my kernel using a 32-bit toolchain (for >> ARM) on a 64-bit host (Ubuntu 14.10). The kernel version is 3.14.17. >> >> Any hints on how to get make to use the toolchain? >> > > after you export CROSS_COMPILE export ARCH=arm > This didn't help. I get the same error as before. Thanks, -mandeep > > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
cross-compiling kernel using a 32-bit toolchain on a 64-bit machine
Hi All, I'm having trouble compiling my kernel using a 32-bit toolchain (for ARM) on a 64-bit host (Ubuntu 14.10). The kernel version is 3.14.17. I understand that 32-bit binaries require "ia32-libs" (or equivalent) for compiling on 64-bit hosts. I installed the required packages (lib32z1 lib32ncurses5 lib32bz2-1.0 for Ubuntu 14.10), but still keep getting errors: $ make CROSS_COMPILE=arm-none-linux-gnueabi- all Makefile:616: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler make: arm-none-linux-gnueabi-gcc: Command not found CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CC kernel/bounds.s /bin/sh: 1: arm-none-linux-gnueabi-gcc: not found make[1]: *** [kernel/bounds.s] Error 127 make: *** [prepare0] Error 2 I've ensured that the PATH to the toolchain binaries is correct. If I try to export CROSS_COMPILE to my environment, then too I get an error (although it's for a different reason): $ make all Makefile:616: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: `include/generated/mach-types.h' is up to date. CC kernel/bounds.s gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’ gcc: note: valid arguments to ‘-mabi=’ are: ms sysv gcc: error: unrecognized command line option ‘-mlittle-endian’ gcc: error: unrecognized command line option ‘-mapcs’ gcc: error: unrecognized command line option ‘-mno-sched-prolog’ gcc: error: unrecognized command line option ‘-mno-thumb-interwork’ gcc: error: unrecognized command line option ‘-mfpu=vfp’ make[1]: *** [kernel/bounds.s] Error 1 make: *** [prepare0] Error 2 It looks like make is starting a new shell which does not have either PATH (1st case) or CROSS_COMPILE (2nd case) set. Any hints on how to get make to use the toolchain? Thanks, -mandeep ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging an ARP issue (no resp to ARP requests)
arp_filter=0 is the default, so I'm sure I've tested it with this setting. I think I've tested with arp_ignore=0 too, although with trying so many different combinations, I might've missed it out. I'll keep this in mind when testing next. Thanks. On Mon, Jan 19, 2015 at 10:14 PM, Dave Tian wrote: > What about arp_filter=0 && arp_ignore=0? > > -daveti >> On Jan 19, 2015, at 9:14 PM, Mandeep Sandhu >> wrote: >> >> Here's how my current setup looks like: >> >> $ ifconfig eth4 >> eth4 Link encap:Ethernet HWaddr 74:fe:48:04:e7:eb >> inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 >> ... >> $ >> ifconfig eth5 >> eth5 Link encap:Ethernet HWaddr 74:fe:48:04:e7:e6 >> inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 >> ... >> >> $ ip route show >> default via 192.168.1.2 dev eth4 >> 192.168.1.0/24 dev eth4 proto kernel scope link src 192.168.1.1 >> 192.168.1.0/24 dev eth5 proto kernel scope link src 192.168.1.2 >> >> I've deliberately added a default gateway to 192.168.1.2 (so that the >> ARP response is routed back through it). >> >> $ip neigh show >> >> (there's no neighbor entries) >> >> cat /proc/sys/net/ipv4/conf/all/rp_filter >> 0 >> cat /proc/sys/net/ipv4/conf/all/arp_filter >> 1 >> cat /proc/sys/net/ipv4/conf/eth4/rp_filter >> 0 >> cat /proc/sys/net/ipv4/conf/eth4/arp_filter >> 1 >> cat /proc/sys/net/ipv4/conf/eth5/rp_filter >> 0 >> cat /proc/sys/net/ipv4/conf/eth5/arp_filter >> 1 >> >> Even with these settings, ARP for 192.168.1.2, via eth4 (192.168.1.1) >> interface fails. >> >> >> >> >> On Mon, Jan 19, 2015 at 5:31 PM, Mandeep Sandhu >> wrote: >>>> You'd mentioned earlier that your setup was this: >>>> >>>> xeth0 - 192.168.2.1 >>>> xeth2 - 192.168.2.2 >>>> >>>> That looks to me like two network interfaces on the same subnet, though >>>> that's my guess since you don't show the prefix lengths. I'm guessing the >>>> subnet on both is 192.168.2/24. >>> >>> Correct. Netmask is /24. >>> >>>> >>>> Unless things have changed since the last time I looked into this, for >>>> IPv4 Linux implements what's referred to as the "weak" address binding >>>> model where IP addresses are considered to belong to the host not the >>>> interface. That means your host may be transmitting an ARP response, but >>>> not out the interface you expect, particularly if in fact you have the >>>> same subnet assigned to more than one interface. >>>> >>>> You might want to tcpdump on all interfaces when you do this. >>> >>> I actually did that (after some googling) but there's no ARP response >>> being transmitted out of either of the interfaces. As I mentioned >>> before, this problem happens even with regular ethernet interfaces and >>> not specifically with my custom hardware related ones, so looks like a >>> routing (mis)configuration issue. >>> >>>> >>>> Also, you might want to include the output of the following in future >>>> posts: >>>> >>>> ip addr show >>>> ip route show >>>> ip neigh show >>> >>> I'll now test with 2 "regular" ethernet interfaces on my test machine >>> (eth0,eth1) and send the o/p of these commands. >>> >>> Thanks! >>> >>>> >>>> Jeff Haran >>>> >> >> ___ >> Kernelnewbies mailing list >> Kernelnewbies@kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging an ARP issue (no resp to ARP requests)
> This won't work. Linux will consider both addresses as local to the > host and will never respond to arp requests from any of those addresses. > > See http://en.wikipedia.org/wiki/Host_model According to this Linux defaults to the 'weak host' model (I don't know if Ubuntu changes this default). Although I don't know why this will matter because I'm sending packets destined for the IP of that specific interface (which should work in strong and weak models). I think I'll sift through the ARP processing code to see if there are points where it can drop a packet. > > You might be able to change this by tuning arp_announce/arp_ignore - But > I don't know if that changes the behaviour wrt responses to local > addresses... See > https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt for > the meaning of these knobs. I'm playing around with different combinations of anything even remotely connected to ARP and routing. Nothing's changed till now. Thanks for your time. -mandeep ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging an ARP issue (no resp to ARP requests)
Here's how my current setup looks like: $ ifconfig eth4 eth4 Link encap:Ethernet HWaddr 74:fe:48:04:e7:eb inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 ... $ ifconfig eth5 eth5 Link encap:Ethernet HWaddr 74:fe:48:04:e7:e6 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 ... $ ip route show default via 192.168.1.2 dev eth4 192.168.1.0/24 dev eth4 proto kernel scope link src 192.168.1.1 192.168.1.0/24 dev eth5 proto kernel scope link src 192.168.1.2 I've deliberately added a default gateway to 192.168.1.2 (so that the ARP response is routed back through it). $ip neigh show (there's no neighbor entries) cat /proc/sys/net/ipv4/conf/all/rp_filter 0 cat /proc/sys/net/ipv4/conf/all/arp_filter 1 cat /proc/sys/net/ipv4/conf/eth4/rp_filter 0 cat /proc/sys/net/ipv4/conf/eth4/arp_filter 1 cat /proc/sys/net/ipv4/conf/eth5/rp_filter 0 cat /proc/sys/net/ipv4/conf/eth5/arp_filter 1 Even with these settings, ARP for 192.168.1.2, via eth4 (192.168.1.1) interface fails. On Mon, Jan 19, 2015 at 5:31 PM, Mandeep Sandhu wrote: >> You'd mentioned earlier that your setup was this: >> >> xeth0 - 192.168.2.1 >> xeth2 - 192.168.2.2 >> >> That looks to me like two network interfaces on the same subnet, though >> that's my guess since you don't show the prefix lengths. I'm guessing the >> subnet on both is 192.168.2/24. > > Correct. Netmask is /24. > >> >> Unless things have changed since the last time I looked into this, for IPv4 >> Linux implements what's referred to as the "weak" address binding model >> where IP addresses are considered to belong to the host not the interface. >> That means your host may be transmitting an ARP response, but not out the >> interface you expect, particularly if in fact you have the same subnet >> assigned to more than one interface. >> >> You might want to tcpdump on all interfaces when you do this. > > I actually did that (after some googling) but there's no ARP response > being transmitted out of either of the interfaces. As I mentioned > before, this problem happens even with regular ethernet interfaces and > not specifically with my custom hardware related ones, so looks like a > routing (mis)configuration issue. > >> >> Also, you might want to include the output of the following in future posts: >> >> ip addr show >> ip route show >> ip neigh show > > I'll now test with 2 "regular" ethernet interfaces on my test machine > (eth0,eth1) and send the o/p of these commands. > > Thanks! > >> >> Jeff Haran >> ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging an ARP issue (no resp to ARP requests)
> You'd mentioned earlier that your setup was this: > > xeth0 - 192.168.2.1 > xeth2 - 192.168.2.2 > > That looks to me like two network interfaces on the same subnet, though > that's my guess since you don't show the prefix lengths. I'm guessing the > subnet on both is 192.168.2/24. Correct. Netmask is /24. > > Unless things have changed since the last time I looked into this, for IPv4 > Linux implements what's referred to as the "weak" address binding model where > IP addresses are considered to belong to the host not the interface. That > means your host may be transmitting an ARP response, but not out the > interface you expect, particularly if in fact you have the same subnet > assigned to more than one interface. > > You might want to tcpdump on all interfaces when you do this. I actually did that (after some googling) but there's no ARP response being transmitted out of either of the interfaces. As I mentioned before, this problem happens even with regular ethernet interfaces and not specifically with my custom hardware related ones, so looks like a routing (mis)configuration issue. > > Also, you might want to include the output of the following in future posts: > > ip addr show > ip route show > ip neigh show I'll now test with 2 "regular" ethernet interfaces on my test machine (eth0,eth1) and send the o/p of these commands. Thanks! > > Jeff Haran > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging an ARP issue (no resp to ARP requests)
On Mon, Jan 19, 2015 at 4:21 PM, Dave Tian wrote: > Check arp_* fields in > https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt > Thanks! This looks helpful. > -daveti > > > On Jan 19, 2015, at 7:11 PM, Mike Krinkin wrote: > > Hi, > > On Mon, Jan 19, 2015 at 03:42:58PM -0800, Mandeep Sandhu wrote: > > Hi All, > > Please let me know if this is not the correct ML for such a question > (or if there's a more appropriate list for it). > > I'm currently debugging an issue where Linux is not responding to ARP > requests (testing with custom network interface h/w). > > I have 2 network interfaces which are basically interfaces on a custom > network device sitting on the PCI bus. > > My setup looks like follows: > > xeth0 - 192.168.2.1 > xeth2 - 192.168.2.2 > > xeth0/2 are the interfaces created for the custom device (via a lkm) > > Both these interfaces are on the local machine and are connected > back-to-back on the custom device, so packets sent from one arrive on > the other. > > I'm testing this setup by sending a single ARP pack, forced out of one > interface, for the other interface's IP. > > $ sudo arping -c 1 -i xeth0 192.168.2.2 > ARPING 192.168.2.2 > > --- 192.168.2.2 statistics --- > 1 packets transmitted, 0 packets received, 100% unanswered (0 extra) > > If I start tcpdump on the receive interface (xeth2), I see the ARP > packet arrive, but I don't see any response go out (I've attached the > pcap file for anyone interested in looking at the received packet). > The ARP packet's contents seem to be proper under wireshark. > > Is there any statistics I can look at to see if the packet was dropped > by linux during ARP processing? > > I've put debug stmts in the LKM, but I don't see the kernel IP layer > calling the xmit function for an ARP reply (however the xmit function > for the ARP request, from xeth0, is being called). > > > Have you tried to put debug prints in arp_process function? > > > I don't see any drops in "netstat -s" output as well. > > Any hints appreciated. > > > Just a random guess, but try to disable reverse path filtering (rp_filter). > > > Thanks, > -mandeep > > > w??T?g < ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Debugging an ARP issue (no resp to ARP requests)
> > Have you tried to put debug prints in arp_process function? > Not yet. I'm using the Ubuntu 14.10 kernel. I'm lazy and don't want to rebuild their kernel (an config), so trying to figure out if I can narrow down the problem without it! :) >> >> I don't see any drops in "netstat -s" output as well. >> >> Any hints appreciated. > > Just a random guess, but try to disable reverse path filtering (rp_filter). I just did actually. Unfortunately that didn't work either. Interestingly, I tried the same experiment with 2 "regular" ethernet interfaces on my machine and in that too the ARPs never resolve. This indicates that this looks like a config issue and IP/routing issue? > >> >> Thanks, >> -mandeep > >> w??T?g < < ?? ?~e ?~e?? >> ?? >> ___ >> Kernelnewbies mailing list >> Kernelnewbies@kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Debugging an ARP issue (no resp to ARP requests)
Hi All, Please let me know if this is not the correct ML for such a question (or if there's a more appropriate list for it). I'm currently debugging an issue where Linux is not responding to ARP requests (testing with custom network interface h/w). I have 2 network interfaces which are basically interfaces on a custom network device sitting on the PCI bus. My setup looks like follows: xeth0 - 192.168.2.1 xeth2 - 192.168.2.2 xeth0/2 are the interfaces created for the custom device (via a lkm) Both these interfaces are on the local machine and are connected back-to-back on the custom device, so packets sent from one arrive on the other. I'm testing this setup by sending a single ARP pack, forced out of one interface, for the other interface's IP. $ sudo arping -c 1 -i xeth0 192.168.2.2 ARPING 192.168.2.2 --- 192.168.2.2 statistics --- 1 packets transmitted, 0 packets received, 100% unanswered (0 extra) If I start tcpdump on the receive interface (xeth2), I see the ARP packet arrive, but I don't see any response go out (I've attached the pcap file for anyone interested in looking at the received packet). The ARP packet's contents seem to be proper under wireshark. Is there any statistics I can look at to see if the packet was dropped by linux during ARP processing? I've put debug stmts in the LKM, but I don't see the kernel IP layer calling the xmit function for an ARP reply (however the xmit function for the ARP request, from xeth0, is being called). I don't see any drops in "netstat -s" output as well. Any hints appreciated. Thanks, -mandeep Ôò¡ w½T g <