get_user() and put_user() missing in syscall list
Hi, Here's an exhaustive list http://man7.org/linux/man-pages/man2/syscalls.2.html of Linux syscall, but I can't find get_user() and put_user() API. Why is it so? What am I missing? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Hibernation with sata driver
My first doubt is why ARM is having PCI bus... ? I think it has AMBA Bus ... On June 1, 2014 at 11:40 PM AYAN KUMAR HALDER ayankum...@gmail.com wrote: Hi, I am working with Linux hibernation framework on ARM based custom SOC which has SATA controller on PCI bus. I see that when the system resumes from hibernation, the SATA controller(drivers/ata/ahci.c) on PCI bus fails to come up. My understanding is that the hibernation calls 'freeze' of all devices. The SATA controller receives the power state event as PM_EVENT_FREEZE ( ie pdev-dev.power.power_state.event = PM_EVENT_FREEZE). Thus when system restores the hibernation image, ahci_pci_device_resume gets called in which ahci_pci_reset_controller/ahci_pci_init_controller does not get called. So SATA controller fails to come up. Please let me know if my understanding is correct or not. If so, then in ahci_pci_device_resume() should we change the following if (pdev-dev.power.power_state.event == PM_EVENT_SUSPEND) to if (pdev-dev.power.power_state.event == PM_EVENT_FREEZE) In hibernation , as we power down the system, so I understand that the sata controller need to be reset and re-initialized for proper functioning. Regards, Ayan Kumar Halder Regards, Varka Bhadram --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: get_user() and put_user() missing in syscall list
These two are not the system calls. they are the Kernel API's to transfer the data from user address space to the kernel address space. please see: http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L143 http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L143 Regards, Varka Bhadram On June 2, 2014 at 11:29 AM Dipanjan Das mail.dipanjan@gmail.com wrote: http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 Hi, Here's an exhaustive list http://man7.org/linux/man-pages/man2/syscalls.2.html of Linux syscall, but I can't find get_user() and put_user() API. Why is it so? What am I missing? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: get_user() and put_user() missing in syscall list
I am new to Linux kernel stuffs. How are Kernel API and syscalls differ from each other? On 2 June 2014 13:43, Varka Bhadram var...@cdac.in wrote: These two are not the system calls. they are the Kernel API's to transfer the data from user address space to the kernel address space. please see: http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L143 Regards, Varka Bhadram *MailScanner has detected a possible fraud attempt from lxr.free-electrons.com claiming to be* On June 2, 2014 at 11:29 AM Dipanjan Das mail.dipanjan@gmail.com wrote: http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 Hi, Here's an exhaustive list http://man7.org/linux/man-pages/man2/syscalls.2.html of Linux syscall, but I can't find get_user() and put_user() API. Why is it so? What am I missing? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: get_user() and put_user() missing in syscall list
On Mon, Jun 2, 2014 at 1:49 PM, Dipanjan Das mail.dipanjan@gmail.com wrote: I am new to Linux kernel stuffs. How are Kernel API and syscalls differ from each other? syscalls are system calls which which will be used by your application in user space. syscalls table will map the userspace syatem call with the related function in kernel space. kernel API are the functions which can only be used in kernel space and they do not have any existence in userspace. Regards Sudip ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: get_user() and put_user() missing in syscall list
http://stackoverflow.com/questions/20172111/difference-between-system-api-and-system-call-api http://stackoverflow.com/questions/17219898/what-is-the-difference-between-linux-kernel-api-system-calls-system-inter These two links will give the diffrence b/w them... On June 2, 2014 at 1:49 PM Dipanjan Das mail.dipanjan@gmail.com wrote: I am new to Linux kernel stuffs. How are Kernel API and syscalls differ from each other? On 2 June 2014 13:43, Varka Bhadram var...@cdac.in mailto:var...@cdac.in wrote: These two are not the system calls. they are the Kernel API's to transfer the data from user address space to the kernel address space. please see: http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L143 http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L143 Regards, Varka Bhadram MailScanner has detected a possible fraud attempt from lxr.free-electrons.com claiming to be On June 2, 2014 at 11:29 AM Dipanjan Das mail.dipanjan@gmail.com wrote: http://lxr.free-electrons.com/source/arch/x86/include/asm/uaccess.h#L239 Hi, Here's an exhaustive list http://man7.org/linux/man-pages/man2/syscalls.2.html of Linux syscall, but I can't find get_user() and put_user() API. Why is it so? What am I missing? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org mailto:Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Hibernation with sata driver
Hi Varka, This is a arm based custom platform in which we have both AMBA bus as well as pci bus (pci slots which can fit addon cards). There is no restriction(as far as I understand) that ARM based platforms cannot have PCI bus. Regards, Ayan Kumar Halder On Mon, Jun 2, 2014 at 1:28 PM, Varka Bhadram var...@cdac.in wrote: My first doubt is why ARM is having PCI bus... ? I think it has AMBA Bus ... On June 1, 2014 at 11:40 PM AYAN KUMAR HALDER ayankum...@gmail.com wrote: Hi, I am working with Linux hibernation framework on ARM based custom SOC which has SATA controller on PCI bus. I see that when the system resumes from hibernation, the SATA controller(drivers/ata/ahci.c) on PCI bus fails to come up. My understanding is that the hibernation calls 'freeze' of all devices. The SATA controller receives the power state event as PM_EVENT_FREEZE ( ie pdev-dev.power.power_state.event = PM_EVENT_FREEZE). Thus when system restores the hibernation image, ahci_pci_device_resume gets called in which ahci_pci_reset_controller/ahci_pci_init_controller does not get called. So SATA controller fails to come up. Please let me know if my understanding is correct or not. If so, then in ahci_pci_device_resume() should we change the following if (pdev-dev.power.power_state.event == PM_EVENT_SUSPEND) to if (pdev-dev.power.power_state.event == PM_EVENT_FREEZE) In hibernation , as we power down the system, so I understand that the sata controller need to be reset and re-initialized for proper functioning. Regards, Ayan Kumar Halder Regards, Varka Bhadram --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Setting the skb-mark field from application
Hi all, Is it possible to set the skb-mark flied of the linux socket buffer from the application? Suppose application is using the Raw socket of Ethernet interface and it sends and receive packets to that interface. However, application wants to set the skb-mark filed of the socket buffer which in turn is honoured by the ethernet driver. I could not find any option in the api setsockopt which will allow to set the skb-mark field. Anybody having any idea if it can be done from the application? thanks, Vishwas S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Setting the skb-mark field from application
Hello. Yes, you can do it with SO_MARK socket option. From socket man: SO_MARK (since Linux 2.6.25) Set the mark for each packet sent through this socket (similar to the netfilter MARK target but socket-based). Changing the mark can be used for mark-based routing without netfilter or for packet filtering. Setting this option requires the CAP_NET_ADMIN capability. 2014-06-02 14:25 GMT+04:00 Vishwas Srivastava vishu.ker...@gmail.com: Hi all, Is it possible to set the skb-mark flied of the linux socket buffer from the application? Suppose application is using the Raw socket of Ethernet interface and it sends and receive packets to that interface. However, application wants to set the skb-mark filed of the socket buffer which in turn is honoured by the ethernet driver. I could not find any option in the api setsockopt which will allow to set the skb-mark field. Anybody having any idea if it can be done from the application? thanks, Vishwas S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- Anton. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Hibernation with sata driver
Hi Ayan Kumar Halder, Ya you are right. But ARM only supports AMBA bus, your board may have some controller which acts as bridge b/w PCI and AMBA. Regards, Varka Bhadram On June 2, 2014 at 2:29 PM AYAN KUMAR HALDER ayankum...@gmail.com wrote: Hi Varka, This is a arm based custom platform in which we have both AMBA bus as well as pci bus (pci slots which can fit addon cards). There is no restriction(as far as I understand) that ARM based platforms cannot have PCI bus. Regards, Ayan Kumar Halder On Mon, Jun 2, 2014 at 1:28 PM, Varka Bhadram var...@cdac.in wrote: My first doubt is why ARM is having PCI bus... ? I think it has AMBA Bus ... On June 1, 2014 at 11:40 PM AYAN KUMAR HALDER ayankum...@gmail.com wrote: Hi, I am working with Linux hibernation framework on ARM based custom SOC which has SATA controller on PCI bus. I see that when the system resumes from hibernation, the SATA controller(drivers/ata/ahci.c) on PCI bus fails to come up. My understanding is that the hibernation calls 'freeze' of all devices. The SATA controller receives the power state event as PM_EVENT_FREEZE ( ie pdev-dev.power.power_state.event = PM_EVENT_FREEZE). Thus when system restores the hibernation image, ahci_pci_device_resume gets called in which ahci_pci_reset_controller/ahci_pci_init_controller does not get called. So SATA controller fails to come up. Please let me know if my understanding is correct or not. If so, then in ahci_pci_device_resume() should we change the following if (pdev-dev.power.power_state.event == PM_EVENT_SUSPEND) to if (pdev-dev.power.power_state.event == PM_EVENT_FREEZE) In hibernation , as we power down the system, so I understand that the sata controller need to be reset and re-initialized for proper functioning. Regards, Ayan Kumar Halder Regards, Varka Bhadram --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --- [ C-DAC is on Social-Media too. Kindly follow us at: Facebook: https://www.facebook.com/CDACINDIA Twitter: @cdacindia ] This e-mail is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email is strictly prohibited and appropriate legal action will be taken. --- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
head.S
hello every one ! I am trying to trace Linux kernel booting process for ARM architecture. Right now i am doing it manually . I am getting problem in reading assembly codes (like in head.s and other files) . Can any body tell me the correct way of tracing the linux kernel booting process ? Is there any guide which perfectly document Linux kernel files function by function ? Thank You! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: head.S
On Mon, 02 Jun 2014 21:23:16 +0530, Saurabh Jain said: I am trying to trace Linux kernel booting process for ARM architecture. Right now i am doing it manually . I am getting problem in reading assembly codes (like in head.s and other files) . Can any body tell me the correct way of tracing the linux kernel booting process ? Is there any guide which perfectly document Linux kernel files function by function ? Guide? When there's literally a million lines of new or changed code every release? Who is going to maintain the guide? Hint: Even the *source* doesn't perfectly document things function by function. pgpIOGU6uVrwl.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: head.S
Hi, On Mon, Jun 2, 2014 at 7:53 PM, Saurabh Jain saurabh4768j...@gmail.com wrote: I am trying to trace Linux kernel booting process for ARM architecture. Right now i am doing it manually . I am getting problem in reading assembly codes (like in head.s and other files) . Can any body tell me the correct way of tracing the linux kernel booting process ? Is there any guide which perfectly document Linux kernel files function by function ? Not *the* (supposedly only) correct way, just one possible way is to use gdb connected to qemu to step through your kernel code. Google suggests the following, which looks pretty decent: http://files.meetup.com/1590495/debugging-with-qemu.pdf -- Thanks. -- Max ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: head.S
On Mon, Jun 2, 2014 at 12:53 PM, Saurabh Jain saurabh4768j...@gmail.com wrote: hello every one ! I am trying to trace Linux kernel booting process for ARM architecture. Right now i am doing it manually . I am getting problem in reading assembly codes (like in head.s and other files) . Can any body tell me the correct way of tracing the linux kernel booting process ? Is there any guide which perfectly document Linux kernel files function by function ? Hi Saurabh, I don't know of any guide for Linux ARM boot code. But there are some guides for Linux x86 boot code for ancient Linux Kernels, like this: http://www.oldlinux.org/Linux.old/study/eclk-03-boot.pdf Best regards! -- Augusto Mecking Caringi ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Newbie task: Fix a build regression
Hi! On linux-next (next-20140530) the UML out-of-tree build is broken. ---cut--- rw@azrael:~/linux-next (next-20140530) make defconfig ARCH=um O=/mnt/o GEN ./Makefile *** Default configuration is based on 'x86_64_defconfig' # # configuration written to .config # rw@azrael:~/linux-next (next-20140530) LANG=C make -j 8 linux ARCH=um O=/mnt/o CHK include/generated/uapi/linux/version.h CHK include/config/kernel.release GEN ./Makefile Using /home/rw/linux-next as source for kernel CHK include/generated/utsrelease.h UPD include/generated/utsrelease.h CC arch/x86/um/user-offsets.s /home/rw/linux-next/arch/x86/um/user-offsets.c:21:29: fatal error: asm/syscalls_64.h: No such file or directory compilation terminated. make[2]: *** [arch/x86/um/user-offsets.s] Error 1 make[1]: *** [arch/x86/um/user-offsets.s] Error 2 make: *** [sub-make] Error 2 ---cut--- Fixing this should be easy, so I offer this as a newbie task. 1. Find out which commit broke the build (i.e. using git bisect) 2. Fix the build 3. Send me a patch -- Thanks, //richard ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Newbie task: Fix a build regression
On Mon, 02 Jun 2014 20:56:35 +0200, Richard Weinberger said: 1. Find out which commit broke the build (i.e. using git bisect) Any hint on a starting value for 'git bisect good v3.mumble'? :) pgpeXYL4ntWD9.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Newbie task: Fix a build regression
Am 02.06.2014 21:06, schrieb valdis.kletni...@vt.edu: On Mon, 02 Jun 2014 20:56:35 +0200, Richard Weinberger said: 1. Find out which commit broke the build (i.e. using git bisect) Any hint on a starting value for 'git bisect good v3.mumble'? :) I don't really now. I don't do out-of-tree builds on -next. Randy said its there for a few weeks. Thanks, //richard signature.asc Description: OpenPGP digital signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Newbie task: Fix a build regression
On Mon, 02 Jun 2014 21:10:10 +0200, Richard Weinberger said: I don't really now. I don't do out-of-tree builds on -next. Randy said its there for a few weeks. A 'v3.14-rc7' or similar tag from Linus's tree is good enough, as you can't do a sane bisect between (say) next-20140501 and next-20140601. pgphbeHcbYBB3.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux reboot command takes too long
On Fri, May 30, 2014 at 3:19 PM, Rajat Sharma fs.ra...@gmail.com wrote: you have kdump enabled crashkernel=512M@128M On Fri, May 30, 2014 at 2:38 PM, Vipul Jain vipu...@gmail.com wrote: On Fri, May 30, 2014 at 12:32 PM, Vipul Jain vipu...@gmail.com wrote: Hi All, I have a quick question on Linux reboot: On my system I have /var/core directory created which has 300G space and if I fill the /var/core with files say upto 290G and reboot the system and after it comes up and delete the files in /var/core and try to reboot the system takes 45 mins before it actually reboots. Wondering if anyone has seen this before and what could be the issue? Regards, Vipul. Anybody knowns what does below means: ps elxf | grep shutdown 4 0 6327 3842 20 0 12496 788 jbd2_l D? 0:00 \_ shutdown -r 0 wCONSOLE=/dev/console TERM=linux SHELL=/bin/sh rootmnt=/root cpiorootsize= crashkernel=512M@128M image=/xxx/image1/ INIT_VERSION=sysvinit-2.88 init=/sbin/init COLUMNS=80 PATH=/xxx/sbin:/xxx/bin:/sbin:/usr/sbin:/bin:/usr/bin runlevel=2 RUNLEVEL=2 PWD=/root PREVLEVEL=N previous=N LINES=24 HOME=/ SHLVL=2 env=0x3DA97000 _=/sbin/shutdown 0 0 6764 6651 20 0 6304 600 pipe_w S+ pts/0 0:00 \_ grep shutdownTERM=xterm SHELL=/bin/bash SSH_CLIENT=172.16.92.39 49891 22 SSH_TTY=/dev/pts/0 USER=root MAIL=/var/mail/root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PWD=/root SHLVL=1 HOME=/root LOGNAME=root SSH_CONNECTION=172.16.92.39 49891 172.16.85.88 22 _=/bin/grep ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies Hi All, I noticed that if I disable the system TRIM from ext4 file system the reboot does not hang the system after reboot is issue, Also I have noticed that if the disk is full (SSD) and if system panics than core to /var/core directory doesn't complete and system hangs. The only work around to this problem is delete some previous core file for the present core to complete and system reboots. Please kindly let me know as why I am seeing these behaviors. For later I was expecting the core should be partially complete and system reboots as no disk space. Regards, Vipul. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: remote devices
Hi Pranay, Thanks for pointing this out! I was wondering if it is possible to use a remote GPU through /dev/gpu. -Riya On Sat, May 31, 2014 at 11:35 PM, Pranay Srivastava pran...@gmail.com wrote: Hi Riya, It's actually not the major and minor numbers, sure they decide the driver and the device but when it comes to read/write you actually have file_operations. So I digged around a bit and this is the one you should look into, nfs_fhget If you see at the end where it installs the inode-i_op and inode-fop, the device files are initialized just like as if they were on the NFS client machine itself. NFS operations are not used to override device files here. How about using iSCSI and all for devices? Maybe you can tell something more about what you are trying to do? Regards, On Thu, May 29, 2014 at 10:53 PM, riya khanna riyakhanna1...@gmail.com wrote: Hi, I'm trying to access remote devices locally by mounting/exporting /dev nodes over NFS. However, looks like the access requests are treated local based on major minor numbers (e.g. cat /mnt-dev-over-nfs/kmg output is same as cat /dev/kmsg) How can I change this behavior? and if it is at all feasible? Thanks, Riya ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- ---P.K.S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
EXPORT_SYMBOL and rebinding functions
Hey guys, I have a module which defines a specific print function, and another module that uses said function. From the first module I have used EXPORT_SYMBOL(function_1). From within the second module I would like to rebind that function to another printing function, and once I'm finished, rebind it back to the original function. So in theory the pseudo-code would look something like this module_1.c function_1() { do some stuff } my_print_function = function_1 EXPORT_SYMBOL(my_print_function) module_2.c function_t() { doing different stuff } placeholder = my_print_function my_print_fuction = function_2 do some other stuff my_print_function = placeholder END OF CODE My question is: Is this the correct way of doing this? Or will this cause issues? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Information regarding Device Tree
Hi All, I would like to write script to get Windows Device Manager like functionality to check all the devices present on my Linux machine. What all are the ways to get about this, is iterating sysfs is the way? Or is there any other elegant way? Thanks for support. Jayesh Kumar ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: head.S
Hi Saurabh, You can take a look at the DOC mentioned here. Its kind of gives an overview (not in depth) of every function in Booting process in ARM linux : http://www.linux-arm.org/pub/LinuxPlatform/RealViewLink/Booting_ARM_Linux_SMP_on_MPCore.doc Its a good start to dive into the internals. Thanks and regards, Vignesh Radhakrishnan On Mon, Jun 2, 2014 at 11:32 PM, Augusto Mecking Caringi augustocari...@gmail.com wrote: On Mon, Jun 2, 2014 at 12:53 PM, Saurabh Jain saurabh4768j...@gmail.com wrote: hello every one ! I am trying to trace Linux kernel booting process for ARM architecture. Right now i am doing it manually . I am getting problem in reading assembly codes (like in head.s and other files) . Can any body tell me the correct way of tracing the linux kernel booting process ? Is there any guide which perfectly document Linux kernel files function by function ? Hi Saurabh, I don't know of any guide for Linux ARM boot code. But there are some guides for Linux x86 boot code for ancient Linux Kernels, like this: http://www.oldlinux.org/Linux.old/study/eclk-03-boot.pdf Best regards! -- Augusto Mecking Caringi ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- http://vigneshradhakrishnan.blogspot.com/ ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Information regarding Device Tree
On Tue, Jun 03, 2014 at 09:10:54AM +0530, JAYESH TANK wrote: Hi All, I would like to write script to get Windows Device Manager like functionality to check all the devices present on my Linux machine. What all are the ways to get about this, is iterating sysfs is the way? Or is there any other elegant way? sysfs is the way. Take a look at the existing tools that do this for examples of how it can be done (KDE has a tool, there are others floating around...) good luck, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: EXPORT_SYMBOL and rebinding functions
On Mon, Jun 02, 2014 at 08:29:16PM -0700, Peter Tosh wrote: Hey guys, I have a module which defines a specific print function, and another module that uses said function. From the first module I have used EXPORT_SYMBOL(function_1). From within the second module I would like to rebind that function to another printing function, and once I'm finished, rebind it back to the original function. Wait, why? Don't have modules messing with the function pointers of other modules, that way lies madness. Or root kits, which honestly, there are better ways of making money if you have Linux kernel skills. don't do this. greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: EXPORT_SYMBOL and rebinding functions
Is this just a horrible idea in general? Can you give some kind of general explanation? On Mon, 2014-06-02 at 20:57 -0700, Greg KH wrote: On Mon, Jun 02, 2014 at 08:29:16PM -0700, Peter Tosh wrote: Hey guys, I have a module which defines a specific print function, and another module that uses said function. From the first module I have used EXPORT_SYMBOL(function_1). From within the second module I would like to rebind that function to another printing function, and once I'm finished, rebind it back to the original function. Wait, why? Don't have modules messing with the function pointers of other modules, that way lies madness. Or root kits, which honestly, there are better ways of making money if you have Linux kernel skills. don't do this. greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: remote devices
On Tue, Jun 3, 2014 at 7:42 AM, riya khanna riyakhanna1...@gmail.com wrote: Hi Pranay, Thanks for pointing this out! I was wondering if it is possible to use a remote GPU through /dev/gpu. You would need to modify the nfs client code i think for this. But since it's a device file and if you don't have a fixed major number that could be a problem since you wouldn't want to change any other device files behavior with your installation of file ops. Have you thought of doing a server/client instead of doing it via NFS. If it's just GPU you care about maybe you can have a client/server of your own that can communicate for the GPU exclusively. Perhaps you can give it a try and then see if NFS is better option. -Riya On Sat, May 31, 2014 at 11:35 PM, Pranay Srivastava pran...@gmail.com wrote: Hi Riya, It's actually not the major and minor numbers, sure they decide the driver and the device but when it comes to read/write you actually have file_operations. So I digged around a bit and this is the one you should look into, nfs_fhget If you see at the end where it installs the inode-i_op and inode-fop, the device files are initialized just like as if they were on the NFS client machine itself. NFS operations are not used to override device files here. How about using iSCSI and all for devices? Maybe you can tell something more about what you are trying to do? Regards, On Thu, May 29, 2014 at 10:53 PM, riya khanna riyakhanna1...@gmail.com wrote: Hi, I'm trying to access remote devices locally by mounting/exporting /dev nodes over NFS. However, looks like the access requests are treated local based on major minor numbers (e.g. cat /mnt-dev-over-nfs/kmg output is same as cat /dev/kmsg) How can I change this behavior? and if it is at all feasible? Thanks, Riya ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- ---P.K.S -- ---P.K.S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
How to call syscalls - SYSCALL or 0x80 interrupt
Hi, I came across this discussion in StackExchange http://unix.stackexchange.com/questions/61891/linux-kernel-3-2-syscalls. Does anyone have any idea on this? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: EXPORT_SYMBOL and rebinding functions
On Mon, Jun 02, 2014 at 09:19:41PM -0700, Peter Tosh wrote: Is this just a horrible idea in general? Can you give some kind of general explanation? Messing with symbol address is a horrible idea in general. Step back, what problem are you trying to solve that ended up with this type of proposed solution? thanks, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Man pages for Kernel API
Hi, Like there is section #2 of man pages dedicated to syscalls, is there any official way to get the list of all supported Kernal APIs? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to call syscalls - SYSCALL or 0x80 interrupt
On Tue, Jun 03, 2014 at 09:45:33AM +0530, Dipanjan Das wrote: Hi, I came across this discussion in StackExchange. Does anyone have any idea on this? Yes, the code looks correct, the question asked is incorrect :) ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Fwd: Question regarding ISA DMA
Hi, I'm trying to understand how to use the ISA DMA controller with my PC. What I'm not able to understand is that why is it required to have an IRQ line associated with my device that is going to initiate the DMA? As I understand DMA controller would be signalling CPU[Correct?] so this IRQ would be handled by the ISA api? [Correct?]. What I don't understand is that how the device would know that DMA has been completed since device already has offloaded that work to DMA controller so why is it required to have an IRQ for the device? OR is it that I need to request_irq for DMA controller? Totally confused at this point. Maybe I'm not getting the idea in general, any pointer would help. -- ---P.K.S -- ---P.K.S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: EXPORT_SYMBOL and rebinding functions
It's currently being done in a user space application which I am porting to a kernel module. Is there some other way of accomplishing the same thing safely? On Mon, 2014-06-02 at 21:47 -0700, Greg KH wrote: On Mon, Jun 02, 2014 at 09:19:41PM -0700, Peter Tosh wrote: Is this just a horrible idea in general? Can you give some kind of general explanation? Messing with symbol address is a horrible idea in general. Step back, what problem are you trying to solve that ended up with this type of proposed solution? thanks, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: EXPORT_SYMBOL and rebinding functions
A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Mon, Jun 02, 2014 at 10:10:16PM -0700, Peter Tosh wrote: It's currently being done in a user space application which I am porting to a kernel module. Is there some other way of accomplishing the same thing safely? Again, what is such a thing being done _for_? Why are they doing this? And why would a userspace program need to be ported to the kernel? What type of application is this? What does it do? Any pointers to the source to take a look at it? thanks, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to call syscalls - SYSCALL or 0x80 interrupt
Is in incorrect because the execve() call in the code is to the libc stub but not the actual syscall itself? On 3 June 2014 10:19, Greg KH g...@kroah.com wrote: On Tue, Jun 03, 2014 at 09:45:33AM +0530, Dipanjan Das wrote: Hi, I came across this discussion in StackExchange. Does anyone have any idea on this? Yes, the code looks correct, the question asked is incorrect :) ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: How to call syscalls - SYSCALL or 0x80 interrupt
On Tue, Jun 03, 2014 at 11:03:25AM +0530, Dipanjan Das wrote: Is in incorrect because the execve() call in the code is to the libc stub but not the actual syscall itself? Yes. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Getting unregister_netdevice: waiting for eth0 to become free. Usage count = 4 error
Hi All, When i am trying to delete an interface from the application, while traffic is flowing through it, kernel throws the message unregister_netdevice: waiting for eth0 to become free. Usage count = 4 which means network device usage counter is more that zero and there are 4 references of this device still active, therefore the networking subsystem of the kernel defers it, to become the usage counter 0. Can somebody let me know what are the operations/ events increases the reference count of any network device. I looked in to the kernel code and found that a call to dev_hold increases the refrence count and dev_put decreases this. thanks, Vishwas S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies