Re: Could we use jprobe to skip kprboed function

2019-02-26 Thread Daniel Baluta
On Tue, Feb 26, 2019 at 11:59 AM wuzhouhui wrote: > > Hi, > > The documentation of jprobe says that we must call jprobe_return() > before return. I'm wondering what if we don't call jprobe_return, and > could we use it to skip probed function? Hi, Please keep in mind the jprobe is likely to be

Re: Kernel API's for ADC

2018-07-25 Thread Daniel Baluta
On Wed, Jul 25, 2018 at 1:25 PM, chandrasekhar wrote: > Hi, > > > > Are there any kernel API's for ADC. I am using NXP IMX6UL processor. I have > to read ADC values in kernel space instead of sysfs/userspace. It depends on the type of driver used. Either input or IIO. The sysfs interface for

Re: New to the Kernel Newbie

2018-05-21 Thread Daniel Baluta
Hi, You can have a look at our Linux kernel labs: https://linux-kernel-labs.github.io/master/ For example, start with a short introduction to Linux kernel: https://linux-kernel-labs.github.io/master/labs/introduction.html then create a simple kernel module:

Re: Add IIO example to the kernelnewbies wiki

2018-05-09 Thread Daniel Baluta
Sure, you can do that. Nice to see that you are using Diolan DLN-2 adapter. thanks, Daniel. On Mon, Apr 2, 2018 at 8:06 PM, Gaston Gonzalez wrote: > Hi, > > I'm testing an AD7746 eval board using a Diolan DLN-2 adapter. I wrote > some basic notes about the installation an

Announce Linux kernel labs project

2018-02-15 Thread Daniel Baluta
Hi all, The Linux kernel labs documentation is a collection of "labs" for various device driver topics. For each topic there are two parts: a walk-through which explain the basic concepts and a hands-on part which contains a few exercises. The kernel labs are integrated with Linux kernel

Re: Problem in loading module of Software trigger

2017-03-27 Thread Daniel Baluta
Hi, On Sun, Mar 26, 2017 at 9:51 PM, SIMRAN SINGHAL wrote: > On Sun, Mar 26, 2017 at 1:47 PM, Jonathan Cameron > wrote: >> Insmod will not pick up dependencies in the same way modprobe will. >> >> Make sure to also insmod industrialio.ko

Re: Linux Kernel Based Research Projects

2016-10-04 Thread Daniel Baluta
On Tue, Oct 4, 2016 at 4:08 AM, Robert P. J. Day <rpj...@crashcourse.ca> wrote: > On Sun, 2 Oct 2016, Daniel Baluta wrote: > >> On Sun, Oct 2, 2016 at 2:54 PM, Shyam Saini <mayhs11sa...@gmail.com> wrote: >> > Hi everyone, >> > >> > I'm final

Re: Linux Kernel Based Research Projects

2016-10-03 Thread Daniel Baluta
On Mon, Oct 3, 2016 at 12:48 PM, shyam wrote: > Thanks a lot for your reply, > I'ld like attend your session but right now I'm in India. So, couldn't > manage everything so early to attend linuxCon Europe. > > Apart from this thing, > I'ld like to work on lguest to port it

Re: Linux Kernel Based Research Projects

2016-10-02 Thread Daniel Baluta
On Sun, Oct 2, 2016 at 2:54 PM, Shyam Saini wrote: > Hi everyone, > > I'm final year computer science undergraduate student. I want to do my > major project based on linux kernel. > > Would you please suggest me some areas in the kernel which have some > projects. To be

Re: How to debug ethernet driver ?

2016-08-04 Thread Daniel Baluta
On Mon, Aug 1, 2016 at 10:26 PM, Ran Shalit wrote: > Hello, > > I am writing ethernet network driver. > I would like to ask if there are any steps which can help when > debugging ethernet driver, or is it that the first test should already > involve transmit/recieve packets

Re: pushing other commits upstream

2016-07-18 Thread Daniel Baluta
On Mon, Jul 18, 2016 at 1:49 AM, Alexander Couzens wrote: > Hi, > > I would like to push patches from somebody else upstream. > I'm talking of commits of the TI's beagleboard repo [1]. > > What do I need to take care of? Well, basically apply the patch from beagleboard repo into

Re: looking for tutorials

2016-06-21 Thread Daniel Baluta
On Mon, Jun 13, 2016 at 5:43 PM, ty armour wrote: > I need tutorials on kernel development. And on complete operating system > development. I would prefer them to be in assembly because it is faster, but > it seriously needs to get done. > > If you are interested, simply post

Re: [PATCH] HC-SR04 ultrasonic ranger IIO driver

2016-06-01 Thread Daniel Baluta
On Wed, Jun 1, 2016 at 12:05 AM, wrote: > From: Johannes Thoma > > The HC-SR04 is an ultrasonic distance sensor attached to two GPIO > pins. The driver based on Industrial I/O (iio) subsystem and is > controlled via configfs and sysfs. It

Re: How to enable IIO driver in 3.18 kernel

2016-06-01 Thread Daniel Baluta
On Wed, Jun 1, 2016 at 5:26 PM, Munagala Naresh wrote: > Thanks for the response. > > From the "cat /proc/devices", I could see "iio" listed like this. > > / # cat /proc/devices > cat /proc/devices > Character devices: > 1 mem > 4 /dev/vc/0 > 4 tty > 5

Re: make oldconfig forces HWMON to be inbuilt

2016-05-25 Thread Daniel Baluta
On Fri, May 20, 2016 at 7:35 AM, Ani Sinha wrote: > Hi guys : > > I am seeing this weird issue where even though my original kernel > configuration tries to build HWMON as a module, when I do 'make > oldconfig', it forces HWMON to be built into the kernel. Is there > anyway I can

Re: git send-email

2016-05-22 Thread Daniel Baluta
On Sun, May 22, 2016 at 2:29 PM, Tobin Harding wrote: > Workflow - > > $ git format-patch -s -1 > > add patch comment then > > $ git send-email > > Question please - > > Who should the email be sent to without having a 'To' address repeated in the > CC > field generated by `git

Re: if block style when condition spams to multiple lines.

2016-05-20 Thread Daniel Baluta
On Thu, May 19, 2016 at 9:07 PM, Daniel. wrote: > What is the preferred way to ident if statement when the condition > spams to multiple lines, ex: > > if (cond1 && > cond2 && > cond3) { > ... > ... > } ^ this one is preferred. > > or > > if (cond1

Re: Is there anyone on MAC kernel

2016-05-11 Thread Daniel Baluta
On Tue, May 10, 2016 at 12:26 PM, Robert Clove wrote: > Hi, > > I am looking for some with whom i can discuss my mac kernel problems. > If you know someone please mail me . Hi, It doesn't work this way. Please describe your problem here. What is the issue and how did you

Re: i2c driver develpment with diolan DLN-2 / ACPI?

2016-04-30 Thread Daniel Baluta
On Sat, Apr 30, 2016 at 6:10 PM, Martin Kepplinger <mart...@posteo.de> wrote: > Am 2016-04-27 um 13:51 schrieb Daniel Baluta: >> On Wed, Apr 27, 2016 at 2:36 PM, Martin Kepplinger <mart...@posteo.de> wrote: >>> Hi roberta or anyone who uses a diolan i2c/spi bridge d

Re: i2c driver develpment with diolan DLN-2 / ACPI?

2016-04-27 Thread Daniel Baluta
On Wed, Apr 27, 2016 at 2:36 PM, Martin Kepplinger wrote: > Hi roberta or anyone who uses a diolan i2c/spi bridge device, > > I try to do get the kernel driver for the connected chip loaded, but I'm > having some trouble getting it right. > > Cables are connected to the device

Re: How to correctly decode fun+X/Y

2015-12-04 Thread Daniel Baluta
On Thu, Dec 3, 2015 at 8:14 PM, Matwey V. Kornilov wrote: > Hello, > > I have the following stack trace: > > [ 1351.381696] a.out S c0afb050 0 1676 1658 0x > [ 1351.387048] [] (__schedule) from [] > (schedule+0x58/0xcc) > [ 1351.392436] []

Re: i want to use the script in kernel script folder.

2015-11-17 Thread Daniel Baluta
On Tue, Nov 17, 2015 at 7:10 AM, 윤영석 wrote: > > hi, > i want to use a script in kernel, but i can't use this. > in my terminal. > yoon@pc:~/project/aosp/kernel/linux/scripts$ ./checkpatch.pl sortextable.c > Must be run from the top-level dir. of a kernel tree Hi, You can try

Re: Regirect /var/log/log/syslog messages to our own txt file

2015-09-19 Thread Daniel Baluta
On Sat, Sep 19, 2015 at 9:29 PM, Gunjan Mehta wrote: > Hi, > > I am working on a project, where i print my log messages in > /var/log/log/syslog like > > project_my:info::project started > project_my:debug::value of a is 1 > > i want to redirect project_my:info messages

Re: kernel.c//Starting for The Journey of The Kernel;

2015-09-17 Thread Daniel Baluta
On Thu, Sep 17, 2015 at 7:56 AM, GanesH AvacharE wrote: > if I have to start with the basics of the OS then what sequence should I > follow? You can start with Operating Systems Concepts book.

Re: samples driver is not compiling and building at present dir .ko file

2015-08-21 Thread Daniel Baluta
On Fri, Aug 21, 2015 at 10:25 AM, ravi ranjan Mishra raviranjanmishr...@gmail.com wrote: Hi, Just for learning purpose , i need to compile the sample directory in mainline kernel . can anybody tell to how build samples directory through make. Use: $ make menuconfig, to select

Re: Is there any tool can format source code according to kernel coding rule?

2015-08-03 Thread Daniel Baluta
On Mon, Aug 3, 2015 at 6:35 AM, Nan Xiao xiaonan830...@gmail.com wrote: Hi all, I am just wondering whether there is a script/tool which format source code according to kernel coding rule automatically? Such as tab, space, brace, etc. Try scripts/Lindent from the kernel source tree.

Re: How can I locate a struct's defination?

2015-08-02 Thread Daniel Baluta
On Sun, Aug 2, 2015 at 8:01 AM, Navy Cheng nav...@126.com wrote: Hi, I use emacs and tags to read kernel source. The tags is create by make tags in the kernel source tree. When I want to find a struct's defination, something goes wrong. For example: when I find *dentry* , the first

Re: Unit in which generic_buffer.c application gives data for sensors.

2015-07-02 Thread Daniel Baluta
On Thu, Jul 2, 2015 at 10:46 AM, s.rawat imsaurabhra...@gmail.com wrote: Hi, What are the unit in which the generic_buffer.c application gives the accelerometer , Gyro and Magnetometer values. Thanks in advance ! Hi, Look for process_scan function in generic_buffer.c. It says: process_scan()

Re: Unit in which generic_buffer.c application gives data for sensors.

2015-07-02 Thread Daniel Baluta
On Thu, Jul 2, 2015 at 2:53 PM, s.rawat imsaurabhra...@gmail.com wrote: On Thu, Jul 2, 2015 at 4:13 PM, Daniel Baluta daniel.bal...@gmail.com wrote: * accel - m/s^2 * gyro - rad/s * magneto - Gaus I get the data as below : in_accel_x 71000 71000.0 in_accel_y -45000 -45000.0 in_accel_z

Re: About guiding hello world module submission

2015-06-24 Thread Daniel Baluta
On Wed, Jun 24, 2015 at 7:49 AM, Mayur Patil linuxcra...@gmail.com wrote: Hi All, I am conducting one workshop at FUDCon in which I am trying to teach how to write and send your first linux kernel device driver. Could please suggest me the place where I can guide the students to send

Re: Suggested environments for kernel development

2015-05-05 Thread Daniel Baluta
On Sun, May 3, 2015 at 8:11 PM, Lewis Clark le...@lewmpk.uk wrote: I would really like to know how you guys do your kernel development. What distro do you use and whats the process? I’m very comfortable with debian, but i’ve heard it’s not the easiest distro to build kernels for as you need

Re: Writing driver for a net device which does not support interrupt

2015-03-24 Thread Daniel Baluta
On Tue, Mar 24, 2015 at 3:34 AM, Freeman Zhang freeman.zhang1...@gmail.com wrote: Hi phil, Thanks for your reply! I googled timer, it might be a solution except that interval granularity is a little bit large. This device is for high performance network. I'm not sure whether the missmatch

Re: Sysfs requirement for running generic_buffer.c application - IIO sensors

2015-03-23 Thread Daniel Baluta
On Mon, Mar 23, 2015 at 7:27 AM, s.rawat imsaurabhra...@gmail.com wrote: I have two system having different kernel version and drivers(IIO) on which i can run the generic_buffer.c application .On one system it works fine but on the other it does not give the input reports data. What kernel

Re: Delaying an interrupt handler

2015-03-23 Thread Daniel Baluta
On Mon, Mar 23, 2015 at 2:18 PM, Milton Krutt mil...@krutt.org wrote: Hi. It is known that no semaphore synchronization should be used inside an interrupt handler. Anyway, I am looking at a freeBSD device driver (written by a profesionist) and there are semaphores inside an interrupt

Re: CHECK: Alignment should match open parenthesis

2015-03-13 Thread Daniel Baluta
On Fri, Mar 13, 2015 at 3:47 PM, Nicholas Mc Guire der.h...@hofr.at wrote: On Fri, 13 Mar 2015, Nicholas Mc Guire wrote: On Fri, 13 Mar 2015, palik imre wrote: On Friday, 13 March 2015, 13:43, Nicholas Mc Guire der.h...@hofr.at wrote: On Fri, 13 Mar 2015, palik imre wrote:

Re: CHECK: Alignment should match open parenthesis

2015-03-13 Thread Daniel Baluta
On Fri, Mar 13, 2015 at 5:33 PM, Nicholas Mc Guire der.h...@hofr.at wrote: On Fri, 13 Mar 2015, Daniel Baluta wrote: On Fri, Mar 13, 2015 at 3:47 PM, Nicholas Mc Guire der.h...@hofr.at wrote: On Fri, 13 Mar 2015, Nicholas Mc Guire wrote: On Fri, 13 Mar 2015, palik imre wrote

Re: Getting error failed to setup attributes on Adding Custom Fields in accelerometer HID driver

2015-02-26 Thread Daniel Baluta
+ linux-iio list. On Thu, Feb 26, 2015 at 8:04 AM, s.rawat imsaurabhra...@gmail.com wrote: I have modified the hid-sensor-accel_3d.c driver to add the custom fields - CHANNEL_SCAN_DATA_MOTION and HID_USAGE_SENSOR_DATA_CUSTOM_VALUEX ( X = 2,3,4). Below are my modifications : enum

Re: from WHERE platform driver's probe is called?

2014-11-21 Thread Daniel Baluta
On Fri, Nov 21, 2014 at 3:16 PM, Sunil Shahu sunil.roc...@yahoo.in wrote: Hello, I am looking into platform driver and devices and understood HOW platform driver's probe is called from kernel doc and following forum. http://comments.gmane.org/gmane.linux.kernel.kernelnewbies/37050 For

Re: fd type from number

2014-08-19 Thread Daniel Baluta
On Tue, Aug 19, 2014 at 6:38 PM, Loris Degioanni lo...@draios.com wrote: (resending making sure this is not part of another thread) I'm looking for an efficient way to determine the type of an fd (file, socket...) given its number, from a kernel module. The closest thing I found by looking at

Re: A new way to dive into the kernel!

2014-03-14 Thread Daniel Baluta
It's there any solution to this issue? I'm using mutt, It's ok. Hi, Evolution works for me. thanks, Daniel. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: How can I 'getchar()' in module code?

2013-12-04 Thread Daniel Baluta
On Tue, Dec 3, 2013 at 4:20 PM, Bernd Petrovitsch be...@petrovitsch.priv.at wrote: On Die, 2013-12-03 at 08:38 -0500, valdis.kletni...@vt.edu wrote: On Tue, 03 Dec 2013 20:35:41 +0800, said: For debugging purpose, I want something like 'getchar()' that can pause execution in the module

Re: How can I 'getchar()' in module code?

2013-12-03 Thread Daniel Baluta
On Tue, Dec 3, 2013 at 2:35 PM, 乃宏周 naive...@gmail.com wrote: For debugging purpose, I want something like 'getchar()' that can pause execution in the module code. Do any candidates I can choose? No. ___ Kernelnewbies mailing list

Re: Can mm_struct of a process be null?

2013-11-15 Thread Daniel Baluta
On Fri, Nov 15, 2013 at 6:24 PM, Paul Davies C pauldavi...@gmail.com wrote: Hi, I happen to find this code snippet in the kernel source : struct mm_struct *mm=current-mm; /* some other code */ if(mm){ /*==Why is this here? */ /*read the contents by locking*/ }

Re: Initial git repository - kernel tree

2013-05-13 Thread Daniel Baluta
On Mon, May 13, 2013 at 10:51 AM, Kevin Wilson wkev...@gmail.com wrote: Hello, I have a question about git patches. When I run git log include/linux/skbuff.h and page down till the end, I reach 1da177e Linux-2.6.12-rc2 (I do it on the net-next tree.) git show 1da177e gives: Author:

Re: misc device question

2012-12-19 Thread Daniel Baluta
On Wed, Dec 19, 2012 at 10:36 AM, Kevin Wilson wkev...@gmail.com wrote: Hello,kernelnewbies I am trying to develop a misc driver in 3.7.0 kernel. As a basis I copy and paste this code, *without any change*, http://virtlog.com/2008/03/25/linux-miscdevice-sample/ And build it. after

Re: Linux Kernel Development

2012-09-09 Thread Daniel Baluta
On Sun, Sep 9, 2012 at 12:16 PM, Kaushal Shriyan kaushalshri...@gmail.com wrote: On Sun, Sep 9, 2012 at 9:02 AM, Alexandru Juncu alex.ju...@rosedu.org wrote: On 9 September 2012 06:15, Kaushal Shriyan kaushalshri...@gmail.com wrote: Hi, I am interested to contribute to linux kernel

Re: Profiling my Modules

2012-04-26 Thread Daniel Baluta
On Thu, Apr 26, 2012 at 10:33 AM, Rishi Agrawal rishi.b.agra...@gmail.com wrote: Hi All, I have a kernel module which has functions which take a lot of time in execution. I am curious to know how can I profile it, and find out the functions taking most of the time. I saw Oprofile, but it

Re: slacks usage,..

2012-03-05 Thread Daniel Baluta
On Mon, Mar 5, 2012 at 11:00 AM, trisha yad trisha1ma...@gmail.com wrote: Hi All, I am going through below topic http://patches.linaro.org/6833/. I could not got the meaning of slacks. Why I need this .. Is there some real example of need of slacks. Have you tried searching for it? :D [1].

Re: Check if specific functionally is built into the kernel

2012-02-26 Thread Daniel Baluta
On Sun, Feb 26, 2012 at 7:08 PM, Arokux B. aro...@gmail.com wrote: Dear all, I have the following problem. Some functionality can be either built into the kernel or it can be build as a module. In the latter case the application should load the module. Is there a general approach to test if

Re: cross compile linux

2012-02-11 Thread Daniel Baluta
On Sat, Feb 11, 2012 at 9:05 AM, chromaticwt zac zac.3.14...@gmail.com wrote: what is the proper way to cross compile the linux kernel from one arch to another? specifically, i386 - ppc. You should use a cross-compiler. I recommend you crosstool-ng. Use google for references. [1] thanks,

Re: How to create patch for checkpatch.pl cleanups

2012-02-05 Thread Daniel Baluta
On Sun, Feb 5, 2012 at 11:00 PM, kashyap gada kashyapg...@yahoo.com wrote: Hello Linux Newbies, I'm one too. I was looking out for some clean up work and I ran the checkpatch.pl script. I came across a file with some 400 errors and 200 warnings. Now there were bunch of 80 char per line warning

Re: How to use /proc

2012-02-05 Thread Daniel Baluta
On Sun, Feb 5, 2012 at 11:07 PM, Surenkumar Nihalani su...@gatech.edu wrote: Hello Guys, I am CS student trying to write a kernel module as a part of my class assignment. I wanted to know, from within kernel, how do I read and write data to my proc file? I need to store state from last call

Re: using sizeof operator

2012-01-22 Thread Daniel Baluta
On Sun, Jan 22, 2012 at 10:17 PM, Sukrit Sangwan sukritsang...@gmail.com wrote: I found an instance where sizeof(struct xyz) is used instead of sizeof(variablename). I want to ask if it would be appropriate to contact the author about the same. Well, this doesn't really matter, but the

Re: [OOT] About the symbols in binary file.

2012-01-20 Thread Daniel Baluta
On Fri, Jan 20, 2012 at 11:56 AM, nilesh nilesh.tay...@netscout.com wrote: Hi, The question is not completely related to kernel. But I came across similar question when debugging in kernel. I tried dissecting the SSL library using 'nm' command. It is showing the list of symbols along with

Re: multiple definition error from dl-addr.c with addition of printf, in glibc compilation

2011-12-08 Thread Daniel Baluta
On Thu, Dec 8, 2011 at 10:59 AM, solmac john johnsol...@gmail.com wrote: Hi All, in glibc-2.13/nptl/sigaction.c, i just put a simple printf(test\n); and my glibc compilation fails. Just adding a printf gives me multiple definitions of _itoa from dl-addr.c and i have no idea why. Can any body

Re: How to hook the system call?

2011-11-23 Thread Daniel Baluta
On Wed, Nov 23, 2011 at 11:22 AM, Alexandru Juncu alex.ju...@rosedu.org wrote: On Wed, Nov 23, 2011 at 10:40 AM, Geraint Yang geraint0...@gmail.com wrote: Hello everyone, I am going to hook a system call like 'read' or 'send' by modifying the sys_call_table, but it seems that the

Re: x86 kernel build chain - how bzImage gets created

2011-11-22 Thread Daniel Baluta
On Tue, Nov 22, 2011 at 12:46 PM, Graeme Russ graeme.r...@gmail.com wrote: Hi All, Hopefully this will help demystify the build process Notation: primary input file (file size in bytes)  |  + additional input file  |  * command  |  \- output file (file size in bytes) The file sizes

Re: Trouble removing character device

2011-10-19 Thread Daniel Baluta
On Wed, Oct 19, 2011 at 7:04 PM, Kai Meyer k...@gnukai.com wrote: I can't seem to get my character device to remove itself from the /proc/devices list. I'm calling all of the following functions like so: alloc_chrdev_region(dev, 0, 5, my_char); cdev_init(my_cdev, my_ops); cdev_add(my_cdev,

Re: Getting 'bad file number' error writing to device driver

2011-10-17 Thread Daniel Baluta
On Mon, Oct 17, 2011 at 6:49 PM, Philip Anil-QBW348 anil.phi...@motorolasolutions.com wrote: -Original Message- From: Daniel Baluta [mailto:daniel.bal...@gmail.com] Sent: Saturday, October 15, 2011 3:34 AM To: Philip Anil-QBW348 Cc: kernelnewbies@kernelnewbies.org Subject: Re

Re: Getting 'bad file number' error writing to device driver

2011-10-15 Thread Daniel Baluta
On Sat, Oct 15, 2011 at 2:42 AM, Philip Anil-QBW348 anil.phi...@motorolasolutions.com wrote: I am calling the driver from an Android program (OMAP4/Blaze). It calls a c++ program via JNI which then calls the device driver. Someone suggested it might be a permissions problem - the program is

Re: Why can the kernel be stuck by a busy kernel thread ?

2011-10-14 Thread Daniel Baluta
On Fri, Oct 14, 2011 at 5:04 PM, Parmenides mobile.parmeni...@gmail.com wrote: Hi,   I code a kernel module which do some nop. When inserted into the kernel, the kernel will be stuck and can not reponse my keypress anymore. So, I have to reboot to get out. Why? Is kernel preemption

Re: Getting 'bad file number' error writing to device driver

2011-10-13 Thread Daniel Baluta
Hello, I am trying to write to mydriver but get a 'Bad file number' error. int fd = open(/dev/mydriver,O_RDWR); this opens successfully as fd is not -1. ssize_t bytesToWrite = strlen(buf); value is: bytesToWrite 28 ssize_t bytesWritten = write(fd,buf,bytesToWrite); value is:

TCP_DELACK_MIN vs TCP_ATO_MIN

2011-09-21 Thread Daniel Baluta
Hello, RFC2582, Section 4.2 says: ... an ACK SHOULD be generated for at least every second full-sized segment, and MUST be generated within 500 ms of the arrival of the first unacknowledged packet. . I guess that the delayed ACK timeout is computed in tcp_send_delayed_ack: === void

Re: TCP_DELACK_MIN vs TCP_ATO_MIN

2011-09-21 Thread Daniel Baluta
Now the default value is of both the macros is same. But if you want to make delayed ack timeout configurable, then I think you should give proc interface for TCP_DELACK_MIN. Thanks Rohan. Then also I have to export TCP_DELACK_MAX since I think ato cannot grow over this value. thanks,

Re: how to use hashmap in kernel module?

2011-09-19 Thread Daniel Baluta
On Mon, Sep 19, 2011 at 9:23 AM, Jon Zhou jon.z...@jdsu.com wrote: Hi I want to hashmap to store datat in kernel module, how can I do this? Any existed code? Hello, There are a lot of places where hashes are used. Just grep for 'hash' through the kernel sources. For example have a look at

TCP - RST flag

2011-08-23 Thread Daniel Baluta
Hello, Please help me understanding the behavior of the following TCP conversation. You can find bellow a snippet of the (FTP) conversation captured both on client (C) and server (S). [client]$ tcpdump -n -r client-6-conv.cap [P1] 49.045690 IP 10.10.0.1.21 10.10.0.20.58277: Flags [P.], seq

Re: TCP - RST flag

2011-08-23 Thread Daniel Baluta
On Tue, Aug 23, 2011 at 11:55 PM, Eric Dumazet eric.duma...@gmail.com wrote: Le mardi 23 août 2011 à 23:31 +0300, Daniel Baluta a écrit : Hello, Please help me understanding the behavior of the following TCP conversation. You can find bellow a snippet of the (FTP) conversation captured both

Re: TCP - RST flag

2011-08-23 Thread Daniel Baluta
On Wed, Aug 24, 2011 at 12:50 AM, Eric Dumazet eric.duma...@gmail.com wrote: Le mercredi 24 août 2011 à 00:32 +0300, Daniel Baluta a écrit : On Tue, Aug 23, 2011 at 11:55 PM, Eric Dumazet eric.duma...@gmail.com wrote: TCP in RFC 1122 section 4.2.2.13:  A host MAY implement a half-duplex

Re: One more question on alignment

2011-08-06 Thread Daniel Baluta
On Sat, Aug 6, 2011 at 10:17 PM, subin gangadharan subingangadha...@gmail.com wrote: Hi, This is a text excerpt from the article [1]. Below paragraph I didn't understand quite well.Mainly in bold letters.Could anybody please explain how this will lead to an infinite loop. It seems

Re: question about staging tree branches

2011-07-12 Thread Daniel Baluta
On Tue, Jul 12, 2011 at 7:01 PM, Greg KH g...@kroah.com wrote: On Tue, Jul 12, 2011 at 12:15:17PM +0530, Prashant Shah wrote: Hi, There are 4 branches in the staging tree   remotes/staging/master   remotes/staging/ralink   remotes/staging/staging-linus   remotes/staging/staging-next Is

Re: timer problem

2011-07-06 Thread Daniel Baluta
Hello Prashant, struct timer_list tim; void timfunc(unsigned long data) { [..]        schedule_timeout(10 * HZ); [..] } static int __init init_testmod(void) {        init_timer(tim);        tim.expires = jiffies + HZ*5;        tim.data = 1000;        tim.function = timfunc;        

Re: Problem in compiling kernel

2011-06-29 Thread Daniel Baluta
On Wed, Jun 29, 2011 at 9:28 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Wed, Jun 29, 2011 at 01:08, Daniel Baluta daniel.bal...@gmail.com wrote: On Tue, Jun 28, 2011 at 8:39 PM, Ponkumaran Annadurai aspkuma...@gmail.com wrote: I got struck in making initrd file, I got

Re: Problem in compiling kernel

2011-06-29 Thread Daniel Baluta
On Wed, Jun 29, 2011 at 4:37 PM, Ponkumaran Annadurai aspkuma...@gmail.com wrote: On Wed, Jun 29, 2011 at 12:42 PM, Daniel Baluta daniel.bal...@gmail.com wrote: I got struck in making initrd file, I got the following error root@rocker:/boot# mkinitramfs -o  initrd.img-2.6.39.1

Re: Problem in compiling kernel

2011-06-28 Thread Daniel Baluta
Have you tried to setup some sort of cross-compilation environment? Could you check CROSS_COMPILE env variable?  Yes, I have given yes for that option during configuration OK, then that's your problem. CROSS_COMPILE is a string pointing to your cross compiler prefix. thanks, Daniel.

Re: Problem in compiling kernel

2011-06-28 Thread Daniel Baluta
On Tue, Jun 28, 2011 at 2:07 PM, Ponkumaran Annadurai aspkuma...@gmail.com wrote: On Tue, Jun 28, 2011 at 1:13 PM, Daniel Baluta daniel.bal...@gmail.com wrote: Have you tried to setup some sort of cross-compilation environment? Could you check CROSS_COMPILE env variable?  Yes, I have

Re: Problem in compiling kernel

2011-06-27 Thread Daniel Baluta
On Mon, Jun 27, 2011 at 7:21 PM, Ponkumaran Annadurai aspkuma...@gmail.com wrote: Hello, I encountered the following error while compiling the kernel version linux-2.6.39.1. So I am giving here what I got on my screen. root@rocker:/usr/src/linux-2.6.39.1# make   CHK

Re: threading problem

2011-06-22 Thread Daniel Baluta
Hello Murali, I have a device driver which provides the IOCTL function for the application to interact. when the application sends the IOCTL CMD_GO, my driver has to toggle a GPIO every 500 m Sec. until a 3 minute timeout occurs or a CMD_STOP IOCTL is received. I tried the DECLARE_WORK,

Getting started with kernel sources [Was: No subject]

2011-06-16 Thread Daniel Baluta
On Thu, Jun 16, 2011 at 2:41 PM, Venkateswarlu P p.venkatesh...@gmail.com wrote: how to understand the kernerl source  files in a simple way what header  files i have to understand first for example  to understand  do_fork() function  for process creation  which is defined in 

Re: Linux module for causing a system hard lock-up

2011-06-08 Thread Daniel Baluta
Hello, Could anyone please let me know how can I achieve this? Is hard lockup detector enabled in your system? Could you post your .config. thanks, Daniel. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

show_regs vs dump_stack in watchdog_timer_fn

2011-06-02 Thread Daniel Baluta
Hello, Why the stack isn't always dumped in watchdog_timer_fn ([1])? Registers content is useful, but without a stack trace it's very hard to find the task which caused system softlockup. thanks, Daniel. [1] http://lxr.linux.no/linux+v2.6.39/kernel/watchdog.c#L292

Re: OS Books suggestion

2011-06-01 Thread Daniel Baluta
Hello, * The design of unix operating system (Bach) * Modern operative systems (Tanenbaum) * Operating Systems design and implementation(Tanenbaum) I haven't done formal Computer Science studies, and I don't the time to read the three of them, but as I am working very close to the linux

Re: Can we map a device address to two different memory locations?

2011-05-27 Thread Daniel Baluta
On Fri, May 27, 2011 at 1:49 PM, sandeep kumar coolsandyfor...@gmail.com wrote: Hi all, Memory mapping is done so that CPU can access the devices, which it cant unless. Now the question is can we memory map a one device resource(say some iomemory) to two different memory locations? the

Re: how to download a specific kernel version from kernel.org

2011-05-23 Thread Daniel Baluta
Try this: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.tar.gz thanks, Daniel. On Mon, May 23, 2011 at 2:08 PM, sandeep kumar coolsandyfor...@gmail.com wrote: Hi all, I want to download kernel version 2.6.35 for a specific reason. I have a patch which is to be applied to that

Re: Linux kernel test suites

2011-05-21 Thread Daniel Baluta
On Sat, May 21, 2011 at 2:33 AM, Abu Rasheda rcpilot2...@gmail.com wrote: Can someone pass me pointer to Linux kernel test suite ? I am specially interested in iptables (netfilter) and socket APIs. Hello Abu, Linux Test Project can be a good starting point ([1]). thanks, Daniel. [1]

Re: unlocked_ioctl explanation

2011-05-19 Thread Daniel Baluta
2011/5/19 Ezequiel García elezegar...@yahoo.com.ar Thanks Dave for your answer. I guess the same question has been answered several times before. For the interest reader, I've found these:

Re: tools to identify bugs in driver

2011-05-12 Thread Daniel Baluta
On Thu, May 12, 2011 at 7:34 AM, Amit Nagal helloin.a...@gmail.com wrote: Hi , What are the mandatory tools that must be run to identify potential bugs ( say memory , locking etc ) in a linux device driver ? Turning on DEBUG_SLAB might be a good option. Have a look for all available options

Re: char driver error

2011-05-09 Thread Daniel Baluta
i create a character special file using mknod in /dev directory. i try to write data to my file by echo -n abcd /dev/memory and when i try to read from that file i get  the last char was written to that file that is d Hello Aravind, Can you post the output for: $ strace -n abcd

Re: char driver error

2011-05-09 Thread Daniel Baluta
OK. See how write and read works. $strace echo -n abcd /dev/memory(/home/aravind/me write(1, abcd, 4)                     = 1 write(1, bcd, 3)                      = 1 write(1, cd, 2)                       = 1 write(1, d, 1)                        = 1 $ strace cat

Re: perhaps confused about operation of alloc_chrdev_region()

2011-04-21 Thread Daniel Baluta
Hi Robert, static int __init bsr_init(void) {        struct device_node *np;        dev_t bsr_dev = MKDEV(bsr_major, 0);   --- You are right, this seems to be completely useless. Go on make a patch, compile and send it. thanks, Daniel.

Interpreting call trace

2011-04-06 Thread Daniel Baluta
Hello, I have the following stack trace: [3992.172/0] BUG: soft lockup - CPU#0 stuck for 61s! [events/0:39] [ 3992.215/0] Pid: 39, comm: events/0 Tainted: PW 2.6.32 #1 X8DTT-H [ 3992.222/0] RIP: 0010:[8115f989] [8115f989] __write_lock_failed+0x9/0x20 [ 3992.231/0] RSP:

Re: query regarding kernel daemon

2011-04-04 Thread Daniel Baluta
A daemon sleeps in the background. User can enter a string through the proc interface. Whenever a string is entered, the daemon is woke. The daemon keeps a copy of the last entered string in a variable. Initially the variable is initialized to NULL. When the daemon wakes, it checks if the

Re: Scheduling policy

2011-04-04 Thread Daniel Baluta
On Mon, Apr 4, 2011 at 4:13 PM, Laurențiu Dascălu dascalu.laurent...@gmail.com wrote: Hello, I'm trying to implement a simple scheduling policy in the Linux kernel, but I'm not sure if I correctly understand the sched_class interface. Specifically, I would like to know more about the

Re: why only C?

2011-04-03 Thread Daniel Baluta
On Sun, Apr 3, 2011 at 10:17 PM, mohit verma mohit89m...@gmail.com wrote: Hi list, I have a very basic question. How much time have you tried documenting on this topic [1]? thanks, Daniel. [1] http://answers.google.com/answers/threadview/id/718661.html

Re: how to get kernel functions calling stack/invokation ordert

2011-04-01 Thread Daniel Baluta
Is there a way to find, in the kernel src tree, which routine/function is calling another function OR kernel function invocation stack order? This would be helpful for me to know the various steps/functionalities involved during executing something in kernel space. At runtime you can use

Re: how to get kernel functions calling stack/invokation ordert

2011-04-01 Thread Daniel Baluta
Is there a way to find, in the kernel src tree, which routine/function is calling another function OR kernel function invocation stack order? This would be helpful for me to know the various steps/functionalities involved during executing something in kernel space. At runtime you can use

Re: Snooping on sockets/file descriptors

2011-03-31 Thread Daniel Baluta
On Thu, Mar 31, 2011 at 10:29 PM, Vimal j.vi...@gmail.com wrote: Hi, Is it possible for an application (say snoop, with sufficient privileges) to monitor data on any socket/file descriptor in the system? Here's an example:  suppose we have a browser and it creates a tcp socket to connect

Re: what is the kernel symbol for user space grant access driver

2011-03-02 Thread Daniel Baluta
Hello, I want to know with respect to an image here http://bderzhavets.files.wordpress.com/2010/04/pv-2-6-32-12.png I have already compiled a kernel it mentions to enable  user space grant access driver While compiling I did not notice it how can I now verify post compile some symbol

Re: messages printed lots of times

2011-02-26 Thread Daniel Baluta
i am putting a printk() on link_path_walk() kernel function ( the pathname resolution function). i access that printk() only at some special condition (like if pathname passed to link_path_walk() matches with some name) . but when it gets hit  like when i pass pathname via unlink(2) , lots of

Re: syscalls performance

2011-02-25 Thread Daniel Baluta
Hi Mauro, On Fri, Feb 25, 2011 at 7:03 PM, Mauro Romano Trajber traj...@gmail.com wrote: I was doing some performance tests of system calls and I find an interesting behavior. Using RDTSC to count the CPU cycles, a single call to the getpid() consumes about 7k of CPU clock cycles and ten

Re: syscalls performance

2011-02-25 Thread Daniel Baluta
On Fri, Feb 25, 2011 at 8:22 PM, Mauro Romano Trajber traj...@gmail.com wrote: Thanks Enrico and Daniel, you're right. glibc was caching getpid(); but this is not the root cause of this behavior. Going further, I decide to use call getpid without glibc, using  syscall(SYS_getpid) to test this

  1   2   >