From xjtuwjp at gmail.com Wed Jul 1 04:14:33 2015 From: xjtuwjp at gmail.com (Jack Wang) Date: Wed, 1 Jul 2015 10:14:33 +0200 Subject: About the SCSI command SERVICE_ACTION_IN (0x9e) In-Reply-To: References: <5538C1FA.4070803@outlook.com> Message-ID: Hi, You can find the definition in SCSI Block Commands spec: http://www.t10.org/cgi-bin/ac.pl?t=f&f=sbc4r07c.pdf That requires membership to download, but you can search online to find somewhere :) Regards, Jack Wang 2015-07-01 3:19 GMT+02:00 tianlilai : > Hi,Everyone,I cannot find the document which describe the SCSI command SERVICE_ACTION_IN(0x9e) and SAI_READ_CAPACITY_16(0x10),can tell me then? Thanks very much! > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From priyaranjan45678 at gmail.com Wed Jul 1 04:28:30 2015 From: priyaranjan45678 at gmail.com (priyaranjan) Date: Wed, 1 Jul 2015 13:58:30 +0530 Subject: How to handle float-point operations In-Reply-To: References: Message-ID: Hi Arun, >On Thu, Jun 25, 2015 at 2:33 PM, Arun KS wrote: >Hello Mudongliang, > > > >On Tue, Jun 23, 2015 at 9:01 AM, ??? wrote: > >> > >> I know there are rarely float-point operations! What's the exception? > > In the linux kernel, how does it handle the float-point operations in > the >userland? > > >>Most of the userspace programs do not use FP instructions. So by > >>default floating point engine is turned off during a context switch. > >>When a process executes floating point instruction, an undefined > >>exception is generated. Exception handler enables the floating point > >>engine and jump back to the same instruction which caused the > >>exception so that it will get re executed with FP engine on. > > Is this somehow related to the platform in which linux runs? If the FP > operations are valid, then will that still generate the exception or it > does a context switch, turns on FP engine and re-executed? > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150701/dbec3306/attachment.html From sioban at sioban.net Wed Jul 1 04:36:40 2015 From: sioban at sioban.net (Sioban) Date: Wed, 01 Jul 2015 10:36:40 +0200 Subject: Divide Error: 0000 [#1] SMP In-Reply-To: <557FB2E0.2030808@sioban.net> References: <557D6552.7010106@sioban.net> <557D821E.5020609@sioban.net> <3a6a1fd0479612f5a698c32657d5140f@webmail.sioban.net> <557FB2E0.2030808@sioban.net> Message-ID: Hi, After 14 days with a 4.0 kernel I didn't get any divide by zero errors. It looks good. Thank all for the help ! From luis at debethencourt.com Wed Jul 1 06:50:18 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Wed, 1 Jul 2015 11:50:18 +0100 Subject: Divide Error: 0000 [#1] SMP In-Reply-To: References: <557D6552.7010106@sioban.net> <557D821E.5020609@sioban.net> <3a6a1fd0479612f5a698c32657d5140f@webmail.sioban.net> <557FB2E0.2030808@sioban.net> Message-ID: On 1 July 2015 at 09:36, Sioban wrote: > Hi, > > After 14 days with a 4.0 kernel I didn't get any divide by zero errors. > It looks good. > > Thank all for the help ! > Hello Sioban, I don't understand. What is the context of this? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150701/8dd96a1a/attachment.html From luis at debethencourt.com Wed Jul 1 06:53:49 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Wed, 1 Jul 2015 11:53:49 +0100 Subject: How to handle float-point operations In-Reply-To: References: Message-ID: <20150701105349.GA26760@turing> On Wed, Jul 01, 2015 at 01:58:30PM +0530, priyaranjan wrote: > Hi Arun, > > > >On Thu, Jun 25, 2015 at 2:33 PM, Arun KS wrote: > >Hello Mudongliang, > > > > > > >On Tue, Jun 23, 2015 at 9:01 AM, ??? wrote: > > >> > > >> I know there are rarely float-point operations! What's the exception? > > > In the linux kernel, how does it handle the float-point operations in > > the >userland? > > > > >>Most of the userspace programs do not use FP instructions. So by > > >>default floating point engine is turned off during a context switch. > > >>When a process executes floating point instruction, an undefined > > >>exception is generated. Exception handler enables the floating point > > >>engine and jump back to the same instruction which caused the > > >>exception so that it will get re executed with FP engine on. > > > > Is this somehow related to the platform in which linux runs? If the FP > > operations are valid, then will that still generate the exception or it > > does a context switch, turns on FP engine and re-executed? > > Hi Priyaranjan, Your email got mangled. Please don't send HTML attachments in your emails to the Linux Kernel mailing lists. Try again to reply to Arun. Thanks, Luis From sudipm.mukherjee at gmail.com Wed Jul 1 06:59:17 2015 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Wed, 1 Jul 2015 16:29:17 +0530 Subject: Divide Error: 0000 [#1] SMP In-Reply-To: References: <557D6552.7010106@sioban.net> <557D821E.5020609@sioban.net> <3a6a1fd0479612f5a698c32657d5140f@webmail.sioban.net> <557FB2E0.2030808@sioban.net> Message-ID: > I don't understand. What is the context of this? Hi Luis, Please see the mail sent by Sioban on June 14th and you will understand the context . :) regards sudip From pavitra1729 at gmail.com Wed Jul 1 07:10:18 2015 From: pavitra1729 at gmail.com (pavi1729) Date: Wed, 1 Jul 2015 16:40:18 +0530 Subject: Query on ubifs_assert Message-ID: Hi, FILE: fs/ubifs/misc.h : FUNCTION : ubifs_compr_present "ubifs_compr_present" function has "ubifs_assert" which checks for the valid compression value and does a stack_dump if not. Could there be a case where the "compr_type" is corrupt; if yes, then does a stack_dump suffice? Thus if compr_type is invalid then the below return is not reliable. return !!ubifs_compressors[compr_type]->capi_name; So where does this end, eventually does it go to a point where the volume get corrupt and not unmountable ? Cheers From luis at debethencourt.com Wed Jul 1 07:23:43 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Wed, 1 Jul 2015 12:23:43 +0100 Subject: Divide Error: 0000 [#1] SMP In-Reply-To: References: <557D6552.7010106@sioban.net> <557D821E.5020609@sioban.net> <3a6a1fd0479612f5a698c32657d5140f@webmail.sioban.net> <557FB2E0.2030808@sioban.net> Message-ID: On 1 July 2015 at 11:59, Sudip Mukherjee wrote: > > I don't understand. What is the context of this? > Hi Luis, > Please see the mail sent by Sioban on June 14th and you will > understand the context . :) > > regards > sudip > I searched to see if it was in relation to some previous conversation. Google failed me and I didn't found it. Thanks for the context Sudip :) and congrats Sioban, happy to hear your issue is fixed. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150701/8720aab0/attachment.html From sioban at sioban.net Wed Jul 1 07:28:20 2015 From: sioban at sioban.net (Sioban) Date: Wed, 01 Jul 2015 13:28:20 +0200 Subject: Divide Error: 0000 [#1] SMP In-Reply-To: References: <557D6552.7010106@sioban.net> <557D821E.5020609@sioban.net> <3a6a1fd0479612f5a698c32657d5140f@webmail.sioban.net> <557FB2E0.2030808@sioban.net> Message-ID: <602c5720f1aa0fd9363e41084d5b6e6d@webmail.sioban.net> Yeah, the list helped me well :D In fact I wasn't able to find a reliable source for kernel issues except there. Le 2015-07-01 13:23, Luis de Bethencourt a ?crit?: > On 1 July 2015 at 11:59, Sudip Mukherjee > wrote: > >>> I don't understand. What is the context of this? >> Hi Luis, >> Please see the mail sent by Sioban on June 14th and you will >> understand the context . :) >> >> regards >> sudip > > I searched to see if it was in relation to some previous conversation. > Google failed me and I didn't found it. > > Thanks for the context Sudip :) > > and congrats Sioban, happy to hear your issue is fixed. > > Luis > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From sudipm.mukherjee at gmail.com Wed Jul 1 07:33:45 2015 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Wed, 1 Jul 2015 17:03:45 +0530 Subject: Divide Error: 0000 [#1] SMP In-Reply-To: References: <557D6552.7010106@sioban.net> <557D821E.5020609@sioban.net> <3a6a1fd0479612f5a698c32657d5140f@webmail.sioban.net> <557FB2E0.2030808@sioban.net> Message-ID: > I searched to see if it was in relation to some previous conversation. > Google failed me and I didn't found it. https://www.mail-archive.com/kernelnewbies at kernelnewbies.org/msg14044.html regards sudip From sudvijayr at gmail.com Wed Jul 1 13:00:23 2015 From: sudvijayr at gmail.com (Sudharsan Vijayaraghavan) Date: Wed, 1 Jul 2015 22:30:23 +0530 Subject: CONFIG_PREEMPT_NONE and interrupts Message-ID: HI All, Please validate my understanding regarding the following, While CONFIG_PREEMPT_NONE is set 1 and a process is already in kernel mode, interrupts to that core will not honored until it exits from kernel mode, Thanks, Sudharsan From dhylands at gmail.com Wed Jul 1 16:45:27 2015 From: dhylands at gmail.com (Dave Hylands) Date: Wed, 1 Jul 2015 13:45:27 -0700 Subject: CONFIG_PREEMPT_NONE and interrupts In-Reply-To: References: Message-ID: Meant to use reply-to-all: On Wed, Jul 1, 2015 at 10:00 AM, Sudharsan Vijayaraghavan < sudvijayr at gmail.com> wrote: > > HI All, > > Please validate my understanding regarding the following, > > While CONFIG_PREEMPT_NONE is set 1 and a process is already in kernel > mode, interrupts to that core will not honored until it exits from > kernel mode, My understanding is that CONFIG_PREEMPT_NONE has nothing to do with interrupts. Those will still happen. But if a thread is running, then it won't be preempted by another thread until it decides to block (as opposed to being preempted at the end of its time slice or by an interrupt making another thread ready-to-run). -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150701/935bdde3/attachment.html From dev at snitselaar.org Wed Jul 1 19:09:07 2015 From: dev at snitselaar.org (Jerry Snitselaar) Date: Wed, 1 Jul 2015 16:09:07 -0700 Subject: working with linux-next ... must tags be fetched separately? In-Reply-To: References: Message-ID: <20150701230907.GB2357@rhwork.redhat.com> On Sun Jun 28 15, Robert P. J. Day wrote: > On Sun, 28 Jun 2015, Harsh Jain wrote: > > > Hi, > > > > git fetch --tags linux-next > > > > Will only fetch the tags not changed files content/data. > > > > To fetch file changes > > git fetch linux-next > > > > Is required. > > > > > > > > On 28 June 2015 14:59:15 GMT+05:30, "Robert P. J. Day" wrote: > > > > perusing the current instructions on how to work with linux-next > > here: > > https://www.kernel.org/doc/man-pages/linux-next.html > > and i'm puzzled by this part of the instructions: > > Fetch linux-next plus tags > > $ git fetch linux-next > > ... > > $ git fetch --tags linux-next > > ... > > is it really necessary to run two separate fetch commands? from the > > man page for git-fetch, one reads: > > -t, --tags > > Fetch all tags from the remote (i.e., fetch remote tags refs/tags/* into local tags with > > the same name), in addition to whatever else would otherwise be fetched. > > so would it not be sufficient to run simply: > > $ git fetch --tags linux-next > > or am i misreading something? > > rday > > that suggests that the man page is slightly misleading, given that > it clearly states that "--tags" will fetch tags, "in addition to > whatever else would otherwise be fetched." or is there a different way > to read that phrase? > > rday > It seems to work as described in the manpage for me: snits at cantor:~/dev/linux=>git fetch -t linus remote: Counting objects: 888, done. remote: Compressing objects: 100% (158/158), done. remote: Total 888 (delta 798), reused 818 (delta 730) Receiving objects: 100% (888/888), 137.18 KiB | 0 bytes/s, done. Resolving deltas: 100% (798/798), completed with 368 local objects. >From git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 0890a26..6ac15ba master -> linus/master snits at cantor:~/dev/linux=>git --version git version 2.4.3.368.g7974889 From jinqiangzeng at gmail.com Wed Jul 1 20:28:25 2015 From: jinqiangzeng at gmail.com (Jinqiang Zeng) Date: Wed, 1 Jul 2015 17:28:25 -0700 Subject: Linux's MMC driver and SDCard life time doubt In-Reply-To: References: Message-ID: Hi,Daniel SD cards have internal algorithms for writing balance. 2015-06-09 10:56 GMT-07:00 Daniel. : > Hi for all, > > I have an application running on top of an sd card formated with vfat. > This application is Java and uses ActiveMQ on same vfat sdcard filesystem, > the ActiveMQ generates a huge I/O on sdcard. > > I know that SDCards sectors have an specific writing limits. I want to > know if Linux's mmc driver would spare the writes across whole SDCard > improving its life time or if this role is to be played by filesystem? > > The SDCards live about 15 days before crashing, after crashing I can't > format it again, I have no idea about tools for getting a status of SD > remaing life time, any pointing would be helpful! > > Thanks in advance! > > -- > *"Do or do not. There is no try"* > *Yoda Master* > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150701/120c8a5c/attachment.html From imsaurabhrawat at gmail.com Thu Jul 2 03:46:41 2015 From: imsaurabhrawat at gmail.com (s.rawat) Date: Thu, 2 Jul 2015 13:16:41 +0530 Subject: Unit in which generic_buffer.c application gives data for sensors. Message-ID: Hi, What are the unit in which the generic_buffer.c application gives the accelerometer , Gyro and Magnetometer values. Thanks in advance ! Rgd, S From daniel.baluta at gmail.com Thu Jul 2 06:43:26 2015 From: daniel.baluta at gmail.com (Daniel Baluta) Date: Thu, 2 Jul 2015 13:43:26 +0300 Subject: Unit in which generic_buffer.c application gives data for sensors. In-Reply-To: References: Message-ID: On Thu, Jul 2, 2015 at 10:46 AM, s.rawat 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() - print out the values in SI units. Then, look inside IIO ABI file [1] for units associated with _raw attributes. There you'll find: * accel - m/s^2 * gyro - rad/s * magneto - Gauss thanks, Daniel. [1] http://lxr.free-electrons.com/source/Documentation/ABI/testing/sysfs-bus-iio From imsaurabhrawat at gmail.com Thu Jul 2 07:53:21 2015 From: imsaurabhrawat at gmail.com (s.rawat) Date: Thu, 2 Jul 2015 17:23:21 +0530 Subject: Unit in which generic_buffer.c application gives data for sensors. In-Reply-To: References: Message-ID: On Thu, Jul 2, 2015 at 4:13 PM, Daniel Baluta 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 -1003000 -1003000.0 This seems correct except I think the data from the device is definitely not in m/s2 , seems like it is in "?g".What would be correct -> telling the device firmware writer to change the fw to send data in m/s2 or I convert this data to m/s^2 at host end? Rgds, S From daniel.baluta at gmail.com Thu Jul 2 07:56:50 2015 From: daniel.baluta at gmail.com (Daniel Baluta) Date: Thu, 2 Jul 2015 14:56:50 +0300 Subject: Unit in which generic_buffer.c application gives data for sensors. In-Reply-To: References: Message-ID: On Thu, Jul 2, 2015 at 2:53 PM, s.rawat wrote: > On Thu, Jul 2, 2015 at 4:13 PM, Daniel Baluta 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 > -1003000 -1003000.0 > > This seems correct except I think the data from the device is > definitely not in m/s2 , seems like it is in "?g".What would be > correct -> telling the device firmware writer to change the fw to > send data in m/s2 or I convert this data to m/s^2 at host end? What driver is this? generic_buffer application reads the data from device buffer than applies the offset and the scale. Perhaps, your driver doesn't correctly expose the scale? thanks, Daniel. From gnognoleba at gmail.com Thu Jul 2 12:44:32 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Thu, 2 Jul 2015 16:44:32 +0000 Subject: HELP All USEFULL LINK Message-ID: Hi All ! Please help me. Can you give me the all usefull link to understand how the kernel works. I am 62. I would like to be evangilist of linux in Africa. I have no money to buy books or courses. Thanks for your help. GNOGBO -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/7e6ebbd5/attachment.html From luis at debethencourt.com Thu Jul 2 13:52:34 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Thu, 2 Jul 2015 18:52:34 +0100 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: On 2 July 2015 at 17:44, Gnoleba GNOGBO wrote: > Hi All ! > > Please help me. > Can you give me the all usefull link to understand how the kernel works. > I am 62. I would like to be evangilist of linux in Africa. > I have no money to buy books or courses. > > Thanks for your help. > GNOGBO > Hi Gnogbo, http://kernelnewbies.org/Documents is full of good resources https://lwn.net/Kernel/LDD3/ Most recommended Linux Kernel book and it is free to download. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation The Kernel is very well documented. I recommend starting here: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/development-process http://eudyptula-challenge.org/ Eudyptula challenge is great to learn by doing. Join it :) http://free-electrons.com/training/kernel/ Same with this training. I'm sure people here will have more resources to recommend. That said, the Linux Kernel is huge. Currently at over 15 million lines of code. If you tell us which specific areas are of your interest, we can give you more pinpointed recommendations. Enjoy! It is a long path of learning but a fun and gratifying one. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/9ea5af71/attachment.html From gnognoleba at gmail.com Thu Jul 2 14:22:50 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Thu, 2 Jul 2015 18:22:50 +0000 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: Wonderfull Luis ! Nice and quick answer. Thanks ! 1) My first learn is to understand the structure of linux as os. 2) Admin all linux from console 3) programming under linux with the c or java language 4) networking in hetegerous environment 5 ) creat the web site. This is my learning program, of course you can propose me the best way in function of your experience. Best regards Gnogbo Le 2 juil. 2015 17:52, "Luis de Bethencourt" a ?crit : > On 2 July 2015 at 17:44, Gnoleba GNOGBO wrote: > >> Hi All ! >> >> Please help me. >> Can you give me the all usefull link to understand how the kernel works. >> I am 62. I would like to be evangilist of linux in Africa. >> I have no money to buy books or courses. >> >> Thanks for your help. >> GNOGBO >> > > Hi Gnogbo, > > http://kernelnewbies.org/Documents > is full of good resources > > https://lwn.net/Kernel/LDD3/ > Most recommended Linux Kernel book and it is free to download. > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation > The Kernel is very well documented. > I recommend starting here: > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/development-process > > http://eudyptula-challenge.org/ > Eudyptula challenge is great to learn by doing. Join it :) > > http://free-electrons.com/training/kernel/ > Same with this training. > > I'm sure people here will have more resources to recommend. > > That said, the Linux Kernel is huge. Currently at over 15 million lines of > code. If you tell us which specific areas are of your interest, we can give > you more pinpointed recommendations. > > Enjoy! It is a long path of learning but a fun and gratifying one. > Luis > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/3313cc54/attachment.html From luis at debethencourt.com Thu Jul 2 15:10:55 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Thu, 2 Jul 2015 20:10:55 +0100 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: On 2 July 2015 at 19:22, Gnoleba GNOGBO wrote: > Wonderfull Luis ! > Nice and quick answer. > Thanks ! > > 1) My first learn is to understand the structure of linux as os. > 2) Admin all linux from console > 3) programming under linux with the c or java language > 4) networking in hetegerous environment > 5 ) creat the web site. > > This is my learning program, of course you can propose me the best way in > function of your experience. > > Best regards > Gnogbo > I would rearrange the order of things. Learning to use, administrate and program in Linux machines first would make things a lot clearer when learning the internals. I would recommend you do: 2, 3, 1, 4 and 5. About 5; create which website? Not clear on what you mean. Thanks, Luis > Le 2 juil. 2015 17:52, "Luis de Bethencourt" a > ?crit : > >> On 2 July 2015 at 17:44, Gnoleba GNOGBO wrote: >> >>> Hi All ! >>> >>> Please help me. >>> Can you give me the all usefull link to understand how the kernel works. >>> I am 62. I would like to be evangilist of linux in Africa. >>> I have no money to buy books or courses. >>> >>> Thanks for your help. >>> GNOGBO >>> >> >> Hi Gnogbo, >> >> http://kernelnewbies.org/Documents >> is full of good resources >> >> https://lwn.net/Kernel/LDD3/ >> Most recommended Linux Kernel book and it is free to download. >> >> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation >> The Kernel is very well documented. >> I recommend starting here: >> >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/development-process >> >> http://eudyptula-challenge.org/ >> Eudyptula challenge is great to learn by doing. Join it :) >> >> http://free-electrons.com/training/kernel/ >> Same with this training. >> >> I'm sure people here will have more resources to recommend. >> >> That said, the Linux Kernel is huge. Currently at over 15 million lines >> of code. If you tell us which specific areas are of your interest, we can >> give you more pinpointed recommendations. >> >> Enjoy! It is a long path of learning but a fun and gratifying one. >> Luis >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/234c7bb4/attachment.html From gnognoleba at gmail.com Thu Jul 2 15:36:06 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Thu, 2 Jul 2015 19:36:06 +0000 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: Ok ! I don't know what the othet GUY think about your proposition. At this moment I'll do so. About the 5 create site web it is easy. Here we have not enough competence to write some web applications which can run on the smartphone or tablets Thanks Gnogbo Le 2 juil. 2015 19:10, "Luis de Bethencourt" a ?crit : > On 2 July 2015 at 19:22, Gnoleba GNOGBO wrote: > >> Wonderfull Luis ! >> Nice and quick answer. >> Thanks ! >> >> 1) My first learn is to understand the structure of linux as os. >> 2) Admin all linux from console >> 3) programming under linux with the c or java language >> 4) networking in hetegerous environment >> 5 ) creat the web site. >> >> This is my learning program, of course you can propose me the best way in >> function of your experience. >> >> Best regards >> Gnogbo >> > I would rearrange the order of things. Learning to use, administrate and > program in Linux machines first would make things a lot clearer when > learning the internals. > > I would recommend you do: 2, 3, 1, 4 and 5. > > About 5; create which website? Not clear on what you mean. > > Thanks, > Luis > > > >> Le 2 juil. 2015 17:52, "Luis de Bethencourt" a >> ?crit : >> >>> On 2 July 2015 at 17:44, Gnoleba GNOGBO wrote: >>> >>>> Hi All ! >>>> >>>> Please help me. >>>> Can you give me the all usefull link to understand how the kernel works. >>>> I am 62. I would like to be evangilist of linux in Africa. >>>> I have no money to buy books or courses. >>>> >>>> Thanks for your help. >>>> GNOGBO >>>> >>> >>> Hi Gnogbo, >>> >>> http://kernelnewbies.org/Documents >>> is full of good resources >>> >>> https://lwn.net/Kernel/LDD3/ >>> Most recommended Linux Kernel book and it is free to download. >>> >>> >>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation >>> The Kernel is very well documented. >>> I recommend starting here: >>> >>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/development-process >>> >>> http://eudyptula-challenge.org/ >>> Eudyptula challenge is great to learn by doing. Join it :) >>> >>> http://free-electrons.com/training/kernel/ >>> Same with this training. >>> >>> I'm sure people here will have more resources to recommend. >>> >>> That said, the Linux Kernel is huge. Currently at over 15 million lines >>> of code. If you tell us which specific areas are of your interest, we can >>> give you more pinpointed recommendations. >>> >>> Enjoy! It is a long path of learning but a fun and gratifying one. >>> Luis >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/c0cb700c/attachment-0001.html From greg.freemyer at gmail.com Thu Jul 2 16:05:08 2015 From: greg.freemyer at gmail.com (Greg Freemyer) Date: Thu, 2 Jul 2015 16:05:08 -0400 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: On Thu, Jul 2, 2015 at 3:36 PM, Gnoleba GNOGBO wrote: > Ok ! > I don't know what the othet GUY think about your proposition. > At this moment I'll do so. > About the 5 create site web it is easy. Here we have not enough competence > to write some web applications which can run on the smartphone or tablets > Thanks > Gnogbo If your fundamental goal relates to Androids and userspace applications you can skip the task of learning to program inside the linux kernel. There are various free applications that provide command line access and also that compile programs for the Android. Both C and Java compilers are readily available for free. Do you have a c and/or java programming background? A year or 2 of c experience specifically is really an important precursor to learning to program the Linux kernel. The linux kernel is a very advanced use of c programming, so you need to be skilled with c before you start trying to work seriously inside the linux kernel. Java is enough to write apps for Android devices, but you need c skills to work in the kernel. Greg From luis at debethencourt.com Thu Jul 2 16:09:44 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Thu, 2 Jul 2015 21:09:44 +0100 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: On 2 July 2015 at 21:05, Greg Freemyer wrote: > On Thu, Jul 2, 2015 at 3:36 PM, Gnoleba GNOGBO > wrote: > > Ok ! > > I don't know what the othet GUY think about your proposition. > > At this moment I'll do so. > > About the 5 create site web it is easy. Here we have not enough > competence > > to write some web applications which can run on the smartphone or tablets > > Thanks > > Gnogbo > > If your fundamental goal relates to Androids and userspace > applications you can skip the task of learning to program inside the > linux kernel. > I agree with this. If you want to write user applications, learning the internals of the Linux Kernel is too much. Just learn system calls and user space libraries (glib, for example). > > There are various free applications that provide command line access > and also that compile programs for the Android. Both C and Java > compilers are readily available for free. > > Do you have a c and/or java programming background? > > A year or 2 of c experience specifically is really an important > precursor to learning to program the Linux kernel. The linux kernel > is a very advanced use of c programming, so you need to be skilled > with c before you start trying to work seriously inside the linux > kernel. > > Java is enough to write apps for Android devices, but you need c > skills to work in the kernel. > > Greg > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/f8397c57/attachment.html From gnognoleba at gmail.com Thu Jul 2 17:18:52 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Thu, 2 Jul 2015 21:18:52 +0000 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: Luis. Can you give somes docs link for the order : 2, 3, 1, 4 and 5 please Thanks Gnogbo Le 2 juil. 2015 19:36, "Gnoleba GNOGBO" a ?crit : > Ok ! > I don't know what the othet GUY think about your proposition. > At this moment I'll do so. > About the 5 create site web it is easy. Here we have not enough competence > to write some web applications which can run on the smartphone or tablets > Thanks > Gnogbo > Le 2 juil. 2015 19:10, "Luis de Bethencourt" a > ?crit : > >> On 2 July 2015 at 19:22, Gnoleba GNOGBO wrote: >> >>> Wonderfull Luis ! >>> Nice and quick answer. >>> Thanks ! >>> >>> 1) My first learn is to understand the structure of linux as os. >>> 2) Admin all linux from console >>> 3) programming under linux with the c or java language >>> 4) networking in hetegerous environment >>> 5 ) creat the web site. >>> >>> This is my learning program, of course you can propose me the best way >>> in function of your experience. >>> >>> Best regards >>> Gnogbo >>> >> I would rearrange the order of things. Learning to use, administrate and >> program in Linux machines first would make things a lot clearer when >> learning the internals. >> >> I would recommend you do: 2, 3, 1, 4 and 5. >> >> About 5; create which website? Not clear on what you mean. >> >> Thanks, >> Luis >> >> >> >>> Le 2 juil. 2015 17:52, "Luis de Bethencourt" a >>> ?crit : >>> >>>> On 2 July 2015 at 17:44, Gnoleba GNOGBO wrote: >>>> >>>>> Hi All ! >>>>> >>>>> Please help me. >>>>> Can you give me the all usefull link to understand how the kernel >>>>> works. >>>>> I am 62. I would like to be evangilist of linux in Africa. >>>>> I have no money to buy books or courses. >>>>> >>>>> Thanks for your help. >>>>> GNOGBO >>>>> >>>> >>>> Hi Gnogbo, >>>> >>>> http://kernelnewbies.org/Documents >>>> is full of good resources >>>> >>>> https://lwn.net/Kernel/LDD3/ >>>> Most recommended Linux Kernel book and it is free to download. >>>> >>>> >>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation >>>> The Kernel is very well documented. >>>> I recommend starting here: >>>> >>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/development-process >>>> >>>> http://eudyptula-challenge.org/ >>>> Eudyptula challenge is great to learn by doing. Join it :) >>>> >>>> http://free-electrons.com/training/kernel/ >>>> Same with this training. >>>> >>>> I'm sure people here will have more resources to recommend. >>>> >>>> That said, the Linux Kernel is huge. Currently at over 15 million lines >>>> of code. If you tell us which specific areas are of your interest, we can >>>> give you more pinpointed recommendations. >>>> >>>> Enjoy! It is a long path of learning but a fun and gratifying one. >>>> Luis >>>> >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/c4c5b72a/attachment.html From luis at debethencourt.com Thu Jul 2 17:32:55 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Thu, 2 Jul 2015 22:32:55 +0100 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: On 2 July 2015 at 22:18, Gnoleba GNOGBO wrote: > Luis. > > Can you give somes docs link for the order : > 2, 3, 1, 4 and 5 please > > Thanks > Gnogbo > I recommend you ask in the specific places of each domain. This mailing list is about Linux Kernel internals development. We are not experts of everything. 2: http://www.tldp.org/ https://wiki.archlinux.org/ https://help.ubuntu.com/community/CommunityHelpWiki Most distributions have good documentation about how to install, administrate, and do interesting things with it. 3: Depends on the libraries you want to use: https://developer.gnome.org/glib/2.44/ http://www.gnu.org/software/bash/manual/bashref.html http://man7.org/tlpi/ 1: Already mentioned The above is already a substantial amount of learning time. Once you learnt this you will have a clearer idea of what you want with 4 and 5, and how to get the resources for that. You can't lay down all the resources you will need for the next few years right now. Consider how quickly things evolve in web development. Take it one step at a time and be ready to adapt. Enjoy, Luis > Le 2 juil. 2015 19:36, "Gnoleba GNOGBO" a ?crit : > >> Ok ! >> I don't know what the othet GUY think about your proposition. >> At this moment I'll do so. >> About the 5 create site web it is easy. Here we have not enough >> competence to write some web applications which can run on the smartphone >> or tablets >> Thanks >> Gnogbo >> Le 2 juil. 2015 19:10, "Luis de Bethencourt" a >> ?crit : >> >>> On 2 July 2015 at 19:22, Gnoleba GNOGBO wrote: >>> >>>> Wonderfull Luis ! >>>> Nice and quick answer. >>>> Thanks ! >>>> >>>> 1) My first learn is to understand the structure of linux as os. >>>> 2) Admin all linux from console >>>> 3) programming under linux with the c or java language >>>> 4) networking in hetegerous environment >>>> 5 ) creat the web site. >>>> >>>> This is my learning program, of course you can propose me the best way >>>> in function of your experience. >>>> >>>> Best regards >>>> Gnogbo >>>> >>> I would rearrange the order of things. Learning to use, administrate and >>> program in Linux machines first would make things a lot clearer when >>> learning the internals. >>> >>> I would recommend you do: 2, 3, 1, 4 and 5. >>> >>> About 5; create which website? Not clear on what you mean. >>> >>> Thanks, >>> Luis >>> >>> >>> >>>> Le 2 juil. 2015 17:52, "Luis de Bethencourt" >>>> a ?crit : >>>> >>>>> On 2 July 2015 at 17:44, Gnoleba GNOGBO wrote: >>>>> >>>>>> Hi All ! >>>>>> >>>>>> Please help me. >>>>>> Can you give me the all usefull link to understand how the kernel >>>>>> works. >>>>>> I am 62. I would like to be evangilist of linux in Africa. >>>>>> I have no money to buy books or courses. >>>>>> >>>>>> Thanks for your help. >>>>>> GNOGBO >>>>>> >>>>> >>>>> Hi Gnogbo, >>>>> >>>>> http://kernelnewbies.org/Documents >>>>> is full of good resources >>>>> >>>>> https://lwn.net/Kernel/LDD3/ >>>>> Most recommended Linux Kernel book and it is free to download. >>>>> >>>>> >>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation >>>>> The Kernel is very well documented. >>>>> I recommend starting here: >>>>> >>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/development-process >>>>> >>>>> http://eudyptula-challenge.org/ >>>>> Eudyptula challenge is great to learn by doing. Join it :) >>>>> >>>>> http://free-electrons.com/training/kernel/ >>>>> Same with this training. >>>>> >>>>> I'm sure people here will have more resources to recommend. >>>>> >>>>> That said, the Linux Kernel is huge. Currently at over 15 million >>>>> lines of code. If you tell us which specific areas are of your interest, we >>>>> can give you more pinpointed recommendations. >>>>> >>>>> Enjoy! It is a long path of learning but a fun and gratifying one. >>>>> Luis >>>>> >>>>> >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/41e4300e/attachment-0001.html From gnognoleba at gmail.com Thu Jul 2 17:40:24 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Thu, 2 Jul 2015 21:40:24 +0000 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: Thanks Greg ! Ok, I understand your point of view. Now, can you provide me somes links for the docs in order of those objectives ? I have somes notions in programming but not in c or java. I want to know very well linux. To begin in first time by c isn't a problem. I am waiting the docs to begin. Help me please. Thanks Gnogbo -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/816281b7/attachment.html From gnognoleba at gmail.com Thu Jul 2 17:45:41 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Thu, 2 Jul 2015 21:45:41 +0000 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: Great Luis ! God bless you ! I have something to do ! Thanks ! Gnogbo Le 2 juil. 2015 21:32, "Luis de Bethencourt" a ?crit : > On 2 July 2015 at 22:18, Gnoleba GNOGBO wrote: > >> Luis. >> >> Can you give somes docs link for the order : >> 2, 3, 1, 4 and 5 please >> >> Thanks >> Gnogbo >> > > I recommend you ask in the specific places of each domain. This mailing > list is about Linux Kernel internals development. We are not experts of > everything. > > 2: > http://www.tldp.org/ > https://wiki.archlinux.org/ > https://help.ubuntu.com/community/CommunityHelpWiki > Most distributions have good documentation about how to install, > administrate, and do interesting things with it. > > 3: > Depends on the libraries you want to use: > https://developer.gnome.org/glib/2.44/ > http://www.gnu.org/software/bash/manual/bashref.html > http://man7.org/tlpi/ > > 1: > Already mentioned > > The above is already a substantial amount of learning time. Once you > learnt this you will have a clearer idea of what you want with 4 and 5, and > how to get the resources for that. > > You can't lay down all the resources you will need for the next few years > right now. Consider how quickly things evolve in web development. > Take it one step at a time and be ready to adapt. > > Enjoy, > Luis > > >> Le 2 juil. 2015 19:36, "Gnoleba GNOGBO" a ?crit : >> >>> Ok ! >>> I don't know what the othet GUY think about your proposition. >>> At this moment I'll do so. >>> About the 5 create site web it is easy. Here we have not enough >>> competence to write some web applications which can run on the smartphone >>> or tablets >>> Thanks >>> Gnogbo >>> Le 2 juil. 2015 19:10, "Luis de Bethencourt" a >>> ?crit : >>> >>>> On 2 July 2015 at 19:22, Gnoleba GNOGBO wrote: >>>> >>>>> Wonderfull Luis ! >>>>> Nice and quick answer. >>>>> Thanks ! >>>>> >>>>> 1) My first learn is to understand the structure of linux as os. >>>>> 2) Admin all linux from console >>>>> 3) programming under linux with the c or java language >>>>> 4) networking in hetegerous environment >>>>> 5 ) creat the web site. >>>>> >>>>> This is my learning program, of course you can propose me the best way >>>>> in function of your experience. >>>>> >>>>> Best regards >>>>> Gnogbo >>>>> >>>> I would rearrange the order of things. Learning to use, administrate >>>> and program in Linux machines first would make things a lot clearer when >>>> learning the internals. >>>> >>>> I would recommend you do: 2, 3, 1, 4 and 5. >>>> >>>> About 5; create which website? Not clear on what you mean. >>>> >>>> Thanks, >>>> Luis >>>> >>>> >>>> >>>>> Le 2 juil. 2015 17:52, "Luis de Bethencourt" >>>>> a ?crit : >>>>> >>>>>> On 2 July 2015 at 17:44, Gnoleba GNOGBO wrote: >>>>>> >>>>>>> Hi All ! >>>>>>> >>>>>>> Please help me. >>>>>>> Can you give me the all usefull link to understand how the kernel >>>>>>> works. >>>>>>> I am 62. I would like to be evangilist of linux in Africa. >>>>>>> I have no money to buy books or courses. >>>>>>> >>>>>>> Thanks for your help. >>>>>>> GNOGBO >>>>>>> >>>>>> >>>>>> Hi Gnogbo, >>>>>> >>>>>> http://kernelnewbies.org/Documents >>>>>> is full of good resources >>>>>> >>>>>> https://lwn.net/Kernel/LDD3/ >>>>>> Most recommended Linux Kernel book and it is free to download. >>>>>> >>>>>> >>>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation >>>>>> The Kernel is very well documented. >>>>>> I recommend starting here: >>>>>> >>>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/development-process >>>>>> >>>>>> http://eudyptula-challenge.org/ >>>>>> Eudyptula challenge is great to learn by doing. Join it :) >>>>>> >>>>>> http://free-electrons.com/training/kernel/ >>>>>> Same with this training. >>>>>> >>>>>> I'm sure people here will have more resources to recommend. >>>>>> >>>>>> That said, the Linux Kernel is huge. Currently at over 15 million >>>>>> lines of code. If you tell us which specific areas are of your interest, we >>>>>> can give you more pinpointed recommendations. >>>>>> >>>>>> Enjoy! It is a long path of learning but a fun and gratifying one. >>>>>> Luis >>>>>> >>>>>> >>>>> >>>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/e0e91878/attachment.html From greg.freemyer at gmail.com Thu Jul 2 17:53:21 2015 From: greg.freemyer at gmail.com (Greg Freemyer) Date: Thu, 2 Jul 2015 17:53:21 -0400 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: On Thu, Jul 2, 2015 at 5:18 PM, Gnoleba GNOGBO wrote: > Luis. > > Can you give somes docs link for the order : > 2, 3, 1, 4 and 5 please > > Thanks > Gnogbo Gnogbo, You should be aware this is the linux kernel newbies list. It is expected most people coming here are already very comfortable working with Linux. If you're not, you need to find a Linux Newbies resource. Regardless: Have you picked a distribution? I get the impression you're very new to Linux. Ubuntu has a reputation as easy to learn. (I've been doing Unix/Linux for 30+ years, so I haven't felt the urge to look into it. openSUSE is my personal choice.). Assumuning you have Ubuntu installed, here is a very basic intro: http://www.tecmint.com/useful-linux-commands-for-newbies/ Most of the commands will apply to any version of linux. The exception being package management tools like "apt". Typically a distribution supports DEBs or RPMs and the ways to work with them are different. apt is typically used with DEBs. openSUSE uses rpm and zypper for package management from the command line. If that is too basic for you, then here is the next tier: http://www.tecmint.com/20-advanced-commands-for-middle-level-linux-users/ Most of those are in the basic skill set of a Linux admin. All 40 of the above commands have been around for at least a decade and most since 1980 or before. After that, you move in to more advanced topics and in some cases the tools are newer. You need to make sure you have current docs. An example is systemd. It is now mainstream, but 5 years ago I had not heard of it. Things like ifconfig from decades ago still work and is commonly used by documentation, but they are no longer the preferred way to work with the NICs and especially not with IPv6. If by chance you want to go with openSUSE, they have a set of books available at: https://activedoc.opensuse.org/ As an example here is the section on openSUSE services: https://activedoc.opensuse.org/book/opensuse-reference/part-iv-services Greg -- Greg Freemyer www.IntelligentAvatar.net From gnognoleba at gmail.com Thu Jul 2 18:11:57 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Thu, 2 Jul 2015 22:11:57 +0000 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: Greg, just thanks ! In a few hours I learn a lot from you and Luis. Always, you, the experts , help the others new people in linux. Remember what appened in 1991 to Linus T. and how we get Gnu/linux ! B. Regards GNOGBO. Le 2 juil. 2015 21:54, "Greg Freemyer" a ?crit : > On Thu, Jul 2, 2015 at 5:18 PM, Gnoleba GNOGBO > wrote: > > Luis. > > > > Can you give somes docs link for the order : > > 2, 3, 1, 4 and 5 please > > > > Thanks > > Gnogbo > > Gnogbo, > > You should be aware this is the linux kernel newbies list. It is > expected most people coming here are already very comfortable working > with Linux. If you're not, you need to find a Linux Newbies resource. > > Regardless: > > Have you picked a distribution? I get the impression you're very new to > Linux. > > Ubuntu has a reputation as easy to learn. (I've been doing Unix/Linux > for 30+ years, so I haven't felt the urge to look into it. openSUSE > is my personal choice.). > > Assumuning you have Ubuntu installed, here is a very basic intro: > > http://www.tecmint.com/useful-linux-commands-for-newbies/ > > Most of the commands will apply to any version of linux. The > exception being package management tools like "apt". Typically a > distribution supports DEBs or RPMs and the ways to work with them are > different. apt is typically used with DEBs. openSUSE uses rpm and > zypper for package management from the command line. > > If that is too basic for you, then here is the next tier: > > http://www.tecmint.com/20-advanced-commands-for-middle-level-linux-users/ > > Most of those are in the basic skill set of a Linux admin. > > All 40 of the above commands have been around for at least a decade > and most since 1980 or before. > > After that, you move in to more advanced topics and in some cases the > tools are newer. You need to make sure you have current docs. An > example is systemd. It is now mainstream, but 5 years ago I had not > heard of it. > > Things like ifconfig from decades ago still work and is commonly used > by documentation, but they are no longer the preferred way to work > with the NICs and especially not with IPv6. > > If by chance you want to go with openSUSE, they have a set of books > available at: https://activedoc.opensuse.org/ > > As an example here is the section on openSUSE services: > https://activedoc.opensuse.org/book/opensuse-reference/part-iv-services > > Greg > -- > Greg Freemyer > www.IntelligentAvatar.net > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150702/6ec50ae0/attachment-0001.html From greg.freemyer at gmail.com Thu Jul 2 18:33:20 2015 From: greg.freemyer at gmail.com (Greg Freemyer) Date: Thu, 2 Jul 2015 18:33:20 -0400 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: On Thu, Jul 2, 2015 at 5:40 PM, Gnoleba GNOGBO wrote: > Thanks Greg ! > > Ok, I understand your point of view. > > Now, can you provide me somes links for the docs in order of those > objectives ? > > I have somes notions in programming but not in c or java. > > I want to know very well linux. > > To begin in first time by c isn't a problem. > I am waiting the docs to begin. > Help me please. If you have the ability to listen to english, this 9-part series of video's is worth watching: https://www.youtube.com/watch?v=rk2fK2IIiiQ https://www.youtube.com/watch?v=FwpP_MsZWnU https://www.youtube.com/watch?v=TpcdSWsVhG8 https://www.youtube.com/watch?v=huMTljgjPrg https://www.youtube.com/watch?v=Dtbqs0M-B-s https://www.youtube.com/watch?v=qMlnFwYdqIw https://www.youtube.com/watch?v=m2ooG5akhS8 https://www.youtube.com/watch?v=f2fVU_FAJIE https://www.youtube.com/watch?v=32uNkhplNpY They are talking about the basics of using c in Linux. There is no IDE to clutter things up. If you want to be expert on Linux and programming with linux I recommend you start without using an IDE. You can add that step on later. Note that I learned c 30 years ago and basically everything in these videos worked then. That is the great thing about learning to use the basic tools and basic languages. Greg From gnognoleba at gmail.com Thu Jul 2 23:28:04 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Fri, 3 Jul 2015 03:28:04 +0000 Subject: HELP All USEFULL LINK In-Reply-To: References: Message-ID: Merci beaucoup GREG ! Or Thanks a lot GREG ! I ' ll do ! Regards Gnogbo Le 2 juil. 2015 22:34, "Greg Freemyer" a ?crit : > On Thu, Jul 2, 2015 at 5:40 PM, Gnoleba GNOGBO > wrote: > > Thanks Greg ! > > > > Ok, I understand your point of view. > > > > Now, can you provide me somes links for the docs in order of those > > objectives ? > > > > I have somes notions in programming but not in c or java. > > > > I want to know very well linux. > > > > To begin in first time by c isn't a problem. > > I am waiting the docs to begin. > > Help me please. > > If you have the ability to listen to english, this 9-part series of > video's is worth watching: > > https://www.youtube.com/watch?v=rk2fK2IIiiQ > https://www.youtube.com/watch?v=FwpP_MsZWnU > https://www.youtube.com/watch?v=TpcdSWsVhG8 > https://www.youtube.com/watch?v=huMTljgjPrg > https://www.youtube.com/watch?v=Dtbqs0M-B-s > https://www.youtube.com/watch?v=qMlnFwYdqIw > https://www.youtube.com/watch?v=m2ooG5akhS8 > https://www.youtube.com/watch?v=f2fVU_FAJIE > https://www.youtube.com/watch?v=32uNkhplNpY > > > They are talking about the basics of using c in Linux. > > There is no IDE to clutter things up. If you want to be expert on > Linux and programming with linux I recommend you start without using > an IDE. You can add that step on later. > > Note that I learned c 30 years ago and basically everything in these > videos worked then. That is the great thing about learning to use the > basic tools and basic languages. > > Greg > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150703/1f839f0e/attachment.html From gnognoleba at gmail.com Wed Jul 1 17:43:36 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Wed, 1 Jul 2015 21:43:36 +0000 Subject: All links for a dummy Message-ID: Hi All ! Step by step I would like to understand how work the linux kernel help me please and give me all useful link. I shall work hard but I ' ll become evangelist for linux ! Help me please. I am sixty two, I have no money to buy courses or books. Thanks Gnoleba -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150701/0a129e54/attachment.html From Valdis.Kletnieks at vt.edu Fri Jul 3 20:58:14 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Fri, 03 Jul 2015 20:58:14 -0400 Subject: Changel anguage In-Reply-To: Your message of "Sat, 27 Jun 2015 10:57:18 -0000." References: Message-ID: <97100.1435971494@turing-police.cc.vt.edu> On Sat, 27 Jun 2015 10:57:18 -0000, Gnoleba GNOGBO said: > I would like to change my language to french please. Feel free to do so. However, note that although almost everybody in the kernel community can manage enough English to make themselves understood, relatively few are proficient in French. So you may as well say everything in English the first time around, and avoid everybody saying "Can you repeat that in English please?" From gnognoleba at gmail.com Fri Jul 3 22:42:03 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Sat, 4 Jul 2015 02:42:03 +0000 Subject: Changel anguage In-Reply-To: <97100.1435971494@turing-police.cc.vt.edu> References: <97100.1435971494@turing-police.cc.vt.edu> Message-ID: Ok Valdis ! Your answer has a sens. Thanks B. Regards. Gnogbo Le 4 juil. 2015 00:58, a ?crit : > On Sat, 27 Jun 2015 10:57:18 -0000, Gnoleba GNOGBO said: > > I would like to change my language to french please. > > Feel free to do so. However, note that although almost everybody in the > kernel > community can manage enough English to make themselves understood, > relatively > few are proficient in French. > > So you may as well say everything in English the first time around, and > avoid everybody saying "Can you repeat that in English please?" > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150704/04ea9ba2/attachment.html From reachme01 at ymail.com Sun Jul 5 05:17:21 2015 From: reachme01 at ymail.com (Mohit .) Date: Sun, 5 Jul 2015 09:17:21 +0000 (UTC) Subject: Test Message-ID: <733232280.1662198.1436087841943.JavaMail.yahoo@mail.yahoo.com> Test mail From gnognoleba at gmail.com Sun Jul 5 05:48:02 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Sun, 5 Jul 2015 09:48:02 +0000 Subject: Test In-Reply-To: <733232280.1662198.1436087841943.JavaMail.yahoo@mail.yahoo.com> References: <733232280.1662198.1436087841943.JavaMail.yahoo@mail.yahoo.com> Message-ID: Ok ! Gnogbo Le 5 juil. 2015 09:25, "Mohit ." a ?crit : > > > Test mail > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150705/64093d89/attachment.html From priyaranjan45678 at gmail.com Mon Jul 6 03:43:59 2015 From: priyaranjan45678 at gmail.com (priyaranjan) Date: Mon, 6 Jul 2015 13:13:59 +0530 Subject: How to handle float-point operations In-Reply-To: <20150701105349.GA26760@turing> References: <20150701105349.GA26760@turing> Message-ID: On Wed, Jul 01, 2015 at 01:58:30PM +0530, priyaranjan wrote: > Hi Arun, > > > >On Thu, Jun 25, 2015 at 2:33 PM, Arun KS wrote: > >Hello Mudongliang, > > > > > > >On Tue, Jun 23, 2015 at 9:01 AM, ??? wrote: > > >> > > >> I know there are rarely float-point operations! What's the exception? > > > In the linux kernel, how does it handle the float-point operations in > > the >userland? > > > > >>Most of the userspace programs do not use FP instructions. So by > > >>default floating point engine is turned off during a context switch. > > >>When a process executes floating point instruction, an undefined > > >>exception is generated. Exception handler enables the floating point > > >>engine and jump back to the same instruction which caused the > > >>exception so that it will get re executed with FP engine on. > > > > Is this somehow related to the platform in which linux runs? If the FP > > operations are valid, then will that still generate the exception or it > > does a context switch, turns on FP engine and re-executed? > > >Hi Priyaranjan, >Your email got mangled. Please don't send HTML attachments in your >emails to >the Linux Kernel mailing lists. >Try again to reply to Arun. >Thanks, >Luis Sent in plain text format From laitianli2015 at outlook.com Mon Jul 6 04:23:57 2015 From: laitianli2015 at outlook.com (tianlilai) Date: Mon, 6 Jul 2015 16:23:57 +0800 Subject: How to uer the commnd git-send-email to send three email? Message-ID: Hello,Everyone: Can help me to use the command git-send-email to send 3 emails as follows: 1th email: contain two files email. the subject is [fb57a8ed] Task 08 results 2th email: one patch file. the subject is [fb57a8ed] [PATCH 01/02] Task 08: add jiffies file 3th email: another patch file. the subject is [fb57a8ed] [PATCH 02/02] Task 08: add foo file and in receiver client,this three email sould link like that: [fb57a8ed] Task 08 results ??>[fb57a8ed] [PATCH 01/02] Task 08: add jiffies file ??>[fb57a8ed] [PATCH 02/02] Task 08: add foo file thanks very much! From sudipm.mukherjee at gmail.com Mon Jul 6 04:31:51 2015 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Mon, 6 Jul 2015 14:01:51 +0530 Subject: How to uer the commnd git-send-email to send three email? In-Reply-To: References: Message-ID: On Mon, Jul 6, 2015 at 1:53 PM, tianlilai wrote: > [fb57a8ed] Task 08 results > ??>[fb57a8ed] [PATCH 01/02] Task 08: add jiffies file > ??>[fb57a8ed] [PATCH 02/02] Task 08: add foo file You are not supposed to ask questions related to Eudyptula Challenge. :( And sending this is part of the task. regards sudip From gregkh at linuxfoundation.org Mon Jul 6 22:22:09 2015 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Mon, 6 Jul 2015 19:22:09 -0700 Subject: [PATCH 0/4] staging: wilc1000: cover letter In-Reply-To: <20150626144340.GA29835@goodgumbo.baconseed.org> References: <20150626144340.GA29835@goodgumbo.baconseed.org> Message-ID: <20150707022209.GD12574@kroah.com> On Fri, Jun 26, 2015 at 04:43:44PM +0200, Luis de Bethencourt wrote: > Patches to be applied on top of > https://patchwork.kernel.org/patch/6655831/ I don't use patchwork, and when on an airplane with no internet access (like right now), a url provides no context at all. Always use email subject lines or something that I can actually reference properly while offline... thanks, greg k-h From mudongliangabcd at gmail.com Tue Jul 7 04:25:08 2015 From: mudongliangabcd at gmail.com (=?UTF-8?B?5oWV5Yas5Lqu?=) Date: Tue, 7 Jul 2015 16:25:08 +0800 Subject: spell problem in faq website Message-ID: http://kernelnewbies.org/FAQ/current In this website , there are only one "accross" which is badly spelled. It should be "across". -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150707/dc5e5fe2/attachment.html From luis at debethencourt.com Tue Jul 7 05:23:37 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Tue, 7 Jul 2015 11:23:37 +0200 Subject: [PATCH 0/4] staging: wilc1000: cover letter In-Reply-To: <20150707022209.GD12574@kroah.com> References: <20150626144340.GA29835@goodgumbo.baconseed.org> <20150707022209.GD12574@kroah.com> Message-ID: <20150707092337.GA1502@goodgumbo.baconseed.org> On Mon, Jul 06, 2015 at 07:22:09PM -0700, Greg Kroah-Hartman wrote: > On Fri, Jun 26, 2015 at 04:43:44PM +0200, Luis de Bethencourt wrote: > > Patches to be applied on top of > > https://patchwork.kernel.org/patch/6655831/ > > I don't use patchwork, and when on an airplane with no internet access > (like right now), a url provides no context at all. Always use email > subject lines or something that I can actually reference properly while > offline... > > thanks, > > greg k-h OK. Sorry. Didn't knew this but noted for the future. Thanks for the reviews and merges! Luis From Sebastien.Hinderer at ens-lyon.org Tue Jul 7 10:53:10 2015 From: Sebastien.Hinderer at ens-lyon.org (=?utf-8?Q?S=C3=A9bastien?= Hinderer) Date: Tue, 7 Jul 2015 16:53:10 +0200 Subject: Message not appearing in mesg Message-ID: <20150707145310.GA9480@pema> Dear all, I have a module that uses pr_debug at init. Although the module is successfully loaded, the message appears neither in dmesg, nor at the console. I tried toprint a 8 to /proc/sys/kernel/printk but that does not change anything. Any hint would be warmly appreciated. Thanks! S?bastien. From luis at debethencourt.com Tue Jul 7 11:02:59 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Tue, 7 Jul 2015 16:02:59 +0100 Subject: Message not appearing in mesg In-Reply-To: <20150707145310.GA9480@pema> References: <20150707145310.GA9480@pema> Message-ID: On 7 July 2015 at 15:53, S?bastien Hinderer wrote: > Dear all, > > I have a module that uses pr_debug at init. > Although the module is successfully loaded, the message appears > neither in dmesg, nor at the console. I tried toprint a 8 to > /proc/sys/kernel/printk but that does not change anything. > > Any hint would be warmly appreciated. > > Thanks! > > S?bastien Do you have the relevant DEBUG macros activated in your kernel's configuration? https://www.kernel.org/doc/local/pr_debug.txt http://elinux.org/Debugging_by_printing If not, activate them. Or if in a pinch, switch to using pr_alert() for development. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150707/ca26df84/attachment.html From Sebastien.Hinderer at ens-lyon.org Tue Jul 7 11:11:36 2015 From: Sebastien.Hinderer at ens-lyon.org (=?utf-8?Q?S=C3=A9bastien?= Hinderer) Date: Tue, 7 Jul 2015 17:11:36 +0200 Subject: Message not appearing in mesg In-Reply-To: References: <20150707145310.GA9480@pema> Message-ID: <20150707151136.GA9917@pema> Hi Luis, Many thanks for your prompt and helpfulresponse! > Do you have the relevant DEBUG macros activated in your kernel's > configuration? Perhaps not... > https://www.kernel.org/doc/local/pr_debug.txt Read this, thanks. But that has nothing to do with KConfigmacros, has it? > http://elinux.org/Debugging_by_printing > > If not, activate them. Or if in a pinch, switch to using pr_alert() for > development. What surprises me is that I made sue the message appears inthe .ko file and it was there,whereas it seems pr_debug discards its argument at compile time. Or is it at execution time? Thanks! S?bastien. From luis at debethencourt.com Tue Jul 7 11:43:42 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Tue, 7 Jul 2015 16:43:42 +0100 Subject: Message not appearing in mesg In-Reply-To: <20150707151136.GA9917@pema> References: <20150707145310.GA9480@pema> <20150707151136.GA9917@pema> Message-ID: On 7 July 2015 at 16:11, S?bastien Hinderer wrote: > Hi Luis, > > Many thanks for your prompt and helpfulresponse! > > > Do you have the relevant DEBUG macros activated in your kernel's > > configuration? > > Perhaps not... > > > https://www.kernel.org/doc/local/pr_debug.txt > > Read this, thanks. But that has nothing to do with KConfigmacros, has > it? > > > http://elinux.org/Debugging_by_printing > > > > If not, activate them. Or if in a pinch, switch to using pr_alert() for > > development. > > What surprises me is that I made sue the message appears inthe .ko file > and it was there,whereas it seems pr_debug discards its argument at > compile time. Or is it at execution time? > > Thanks! > > S?bastien > Compile time. pr_debug() is meant only for development and discarded for "production" builds. pr_debug(), which is ordinarily an empty macro that discards its arguments at compile time. To enable debugging output, build the appropriate file with -DDEBUG by adding CFLAGS_[filename].o := -DDEBUG That is the key part there. But it is good to also check the options you have in: make menuconfig-> Kernel Hacking Enjoy, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150707/310e3572/attachment.html From Sebastien.Hinderer at ens-lyon.org Tue Jul 7 12:34:31 2015 From: Sebastien.Hinderer at ens-lyon.org (=?utf-8?Q?Sh=C3=A9rab?=) Date: Tue, 7 Jul 2015 18:34:31 +0200 Subject: Message not appearing in mesg In-Reply-To: References: <20150707145310.GA9480@pema> <20150707151136.GA9917@pema> Message-ID: <20150707163431.GA19048@pema> Thanks a lot Luis! Everything is clear now. Sh?rab. From getarunks at gmail.com Wed Jul 8 03:56:50 2015 From: getarunks at gmail.com (Arun KS) Date: Wed, 8 Jul 2015 13:26:50 +0530 Subject: How to handle float-point operations In-Reply-To: References: <20150701105349.GA26760@turing> Message-ID: Hello Priyaranjan, On Mon, Jul 6, 2015 at 1:13 PM, priyaranjan wrote: > On Wed, Jul 01, 2015 at 01:58:30PM +0530, priyaranjan wrote: >> Hi Arun, >> >> >> >On Thu, Jun 25, 2015 at 2:33 PM, Arun KS wrote: >> >Hello Mudongliang, >> > >> > >> > >On Tue, Jun 23, 2015 at 9:01 AM, ??? wrote: >> > >> >> > >> I know there are rarely float-point operations! What's the exception? >> > > In the linux kernel, how does it handle the float-point operations in >> > the >userland? >> > >> > >>Most of the userspace programs do not use FP instructions. So by >> > >>default floating point engine is turned off during a context switch. >> > >>When a process executes floating point instruction, an undefined >> > >>exception is generated. Exception handler enables the floating point >> > >>engine and jump back to the same instruction which caused the >> > >>exception so that it will get re executed with FP engine on. >> > >> > Is this somehow related to the platform in which linux runs? If the FP >> > operations are valid, then will that still generate the exception or it >> > does a context switch, turns on FP engine and re-executed? Usually kernel code never uses FP instructions. In case if kernel uses FP, it has to save and restore the FP registers. FP engine is turned off when a process starts to execute. When a process encounters FP instruction for the first time, it results in an undefined exception(because FP engine is off). Now the control jumps into kernel undefined exception handler. Here kernel check the op-code which resulted in undefined exception. Why? Because kernel need to verify that it is a co processsor instruction or is it really an undefined instruction. In the later case, kernel kills the task. In the former case, the kernel enables the corresponding co processor(in our case FP engine) and jumps back to user space and re-execute the same instruction(this time with co processor turned on). From now on all the FP instruction will not result in undef exception. Now when kernel decides to move this task away from cpu, it saves the FP registers in thread_info of that corresponding task and disables the FP engine. The explained scenario is for SMP kernel where same task can migrate to different cpus. For single cpu systems, FP register saving is done in lazy manner. This is how ARM handles the FP instructions. I think other architectures also does it in similar manner. Thanks, Arun >> > > >>Hi Priyaranjan, > >>Your email got mangled. Please don't send HTML attachments in your >emails to >>the Linux Kernel mailing lists. > >>Try again to reply to Arun. > >>Thanks, >>Luis > > Sent in plain text format From priyaranjan45678 at gmail.com Wed Jul 8 06:41:24 2015 From: priyaranjan45678 at gmail.com (priyaranjan) Date: Wed, 8 Jul 2015 16:11:24 +0530 Subject: How to handle float-point operations In-Reply-To: References: <20150701105349.GA26760@turing> Message-ID: Hello Arun, On Wed, Jul 8, 2015 at 1:26 PM, Arun KS wrote: > Hello Priyaranjan, > > On Mon, Jul 6, 2015 at 1:13 PM, priyaranjan wrote: >> On Wed, Jul 01, 2015 at 01:58:30PM +0530, priyaranjan wrote: >>> Hi Arun, >>> >>> >>> >On Thu, Jun 25, 2015 at 2:33 PM, Arun KS wrote: >>> >Hello Mudongliang, >>> > >>> > >>> > >On Tue, Jun 23, 2015 at 9:01 AM, ??? wrote: >>> > >> >>> > >> I know there are rarely float-point operations! What's the exception? >>> > > In the linux kernel, how does it handle the float-point operations in >>> > the >userland? >>> > >>> > >>Most of the userspace programs do not use FP instructions. So by >>> > >>default floating point engine is turned off during a context switch. >>> > >>When a process executes floating point instruction, an undefined >>> > >>exception is generated. Exception handler enables the floating point >>> > >>engine and jump back to the same instruction which caused the >>> > >>exception so that it will get re executed with FP engine on. >>> > >>> > Is this somehow related to the platform in which linux runs? If the FP >>> > operations are valid, then will that still generate the exception or it >>> > does a context switch, turns on FP engine and re-executed? > > Usually kernel code never uses FP instructions. In case if kernel uses > FP, it has to save and restore the FP registers. > > FP engine is turned off when a process starts to execute. When a > process encounters FP instruction for the first time, it results in an > undefined exception(because FP engine is off). Now the control jumps > into kernel undefined exception handler. Here kernel check the op-code > which resulted in undefined exception. Why? Because kernel need to > verify that it is a co processsor instruction or is it really an > undefined instruction. In the later case, kernel kills the task. In > the former case, the kernel enables the corresponding co processor(in > our case FP engine) and jumps back to user space and re-execute the > same instruction(this time with co processor turned on). From now on > all the FP instruction will not result in undef exception. Now when > kernel decides to move this task away from cpu, it saves the FP > registers in thread_info of that corresponding task and disables the > FP engine. The explained scenario is for SMP kernel where same task > can migrate to different cpus. For single cpu systems, FP register > saving is done in lazy manner. > > This is how ARM handles the FP instructions. I think other > architectures also does it in similar manner. > > Thanks, > Arun > Thanks a lot ! Is this explained anywhere? I guess, I need to dig into kernel docs. >>> > >> >>>Hi Priyaranjan, >> >>>Your email got mangled. Please don't send HTML attachments in your >emails to >>>the Linux Kernel mailing lists. >> >>>Try again to reply to Arun. >> >>>Thanks, >>>Luis >> >> Sent in plain text format From support at mega.co.nz Wed Jul 8 22:20:33 2015 From: support at mega.co.nz (MEGA) Date: Thu, 9 Jul 2015 04:20:33 +0200 (CEST) Subject: MEGA Invitation Message-ID: <20150709022040.917D7436D2@lu2.api.mega.nz> sheldon.corey at gmail.com sent you an invitation to join MEGA.\n\n"; --- Message from user: --- Hello, join me on MEGA and get access to encrypted storage and communication. Get 50 GB free! --- Please create your free MEGA account by clicking on the following link:\n\n"; https://mega.nz/#newsignupa2VybmVsbmV3Ymllc0BrZXJuZWxuZXdiaWVzLm9yZ32Jpxxarx7u Best regards, Team MEGA -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/8c250d3d/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 11184 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/8c250d3d/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1849 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/8c250d3d/attachment-0003.png From zc77leo at gmail.com Wed Jul 8 22:34:27 2015 From: zc77leo at gmail.com (=?UTF-8?Q?Leonardo_Ariel_Carreras_Rodr=C3=ADguez?=) Date: Wed, 8 Jul 2015 22:34:27 -0400 Subject: MEGA Invitation In-Reply-To: <20150709022040.917D7436D2@lu2.api.mega.nz> References: <20150709022040.917D7436D2@lu2.api.mega.nz> Message-ID: kernel newbies list is not for spammers or spammy mails 2015-07-08 22:20 GMT-04:00 MEGA : > [image: Mega Icon] Let's connect kernelnewbies at kernelnewbies.org > sheldon.corey at gmail.com <#14e70a845dc6a501_> sent > you an invitation to join MEGA. "Hello, join me on MEGA and get > access to encrypted storage and communication. Get 50 GB free!" Join > sheldon.corey at gmail.com <#14e70a845dc6a501_> on MEGA by clicking the big > button below. Create Account > Or > copy and paste this link into your web browser: > https://mega.nz/#newsignupa2VybmVsbmV3Ymllc0BrZXJuZWxuZXdiaWVzLm9yZ32Jpxxarx7u > > > Best regards, > > Team MEGA ? Mega Limited 2015 > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150708/37b40177/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1849 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150708/37b40177/attachment.png -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 11184 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150708/37b40177/attachment-0001.png From naam at lse.epita.fr Wed Jul 8 22:41:21 2015 From: naam at lse.epita.fr (Nahim `Naam` El Atmani) Date: Thu, 09 Jul 2015 04:41:21 +0200 Subject: MEGA Invitation In-Reply-To: <20150709022040.917D7436D2@lu2.api.mega.nz> Message-ID: Hello, On Thu, Jul 09, 2015 at 04:20:33AM +0200, MEGA wrote: > sheldon.corey at gmail.com sent you an invitation to join MEGA.\n\n"; I don't think your sponsorship full HTML stuff about mega is somehow related to kernelnewbies mailing list. Best regards, -- El Atmani (Naam) Nahim If less(1) is more than more(1), most(1) is more than less(1). From jinzhao at wingtech.com Wed Jul 8 22:41:06 2015 From: jinzhao at wingtech.com (jinzhao at wingtech.com) Date: Thu, 9 Jul 2015 10:41:06 +0800 Subject: Kernel idle References: , , , <20150701105349.GA26760@turing>, , , Message-ID: <20150709104105850651138@wingtech.com> Dear sir: How to check if the device can enter into deep idle mode or sleep mode? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/4d2b110b/attachment.html From ramon.fried at tandemg.com Thu Jul 9 02:39:20 2015 From: ramon.fried at tandemg.com (Ramon Fried) Date: Thu, 9 Jul 2015 06:39:20 +0000 Subject: is there a way to register for processes state changes from userspace ? Message-ID: Hi. I'm developing an application that needs to know if any of its clients (different processes) terminated or got killed by a signal. Currently I'm implementing it by looking at the specific PID procfs directory. Is there a better way to achieve that ? Something like netlink notifications for subscribed processes will be great... Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/6d957e36/attachment.html From n.borisov.lkml at gmail.com Thu Jul 9 03:08:19 2015 From: n.borisov.lkml at gmail.com (Nikolay Borisov) Date: Thu, 09 Jul 2015 10:08:19 +0300 Subject: is there a way to register for processes state changes from userspace ? In-Reply-To: References: Message-ID: <559E1DE3.2060806@gmail.com> On 07/09/2015 09:39 AM, Ramon Fried wrote: > at the specific PID procfs directory. > Is there a better way to achieve that ? Something like netlink notifications for subscribed processes will be great... > Thanks. If your process is abruptly killed then there is no way for the process to tell you that (it's dead after all). Just implement a simple time-out mechanism in the spirit of ping. From jason at ball.net Thu Jul 9 05:19:16 2015 From: jason at ball.net (Jason Ball) Date: Thu, 9 Jul 2015 19:19:16 +1000 Subject: is there a way to register for processes state changes from userspace ? In-Reply-To: <559E1DE3.2060806@gmail.com> References: <559E1DE3.2060806@gmail.com> Message-ID: Look at netlink sockets. On 9 Jul 2015 5:08 pm, "Nikolay Borisov" wrote: > > > On 07/09/2015 09:39 AM, Ramon Fried wrote: > > at the specific PID procfs directory. > > Is there a better way to achieve that ? Something like netlink > notifications for subscribed processes will be great... > > Thanks. > > If your process is abruptly killed then there is no way for the process > to tell you that (it's dead after all). Just implement a simple time-out > mechanism in the spirit of ping. > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/4ba58dae/attachment.html From amanduch at gmail.com Thu Jul 9 05:48:37 2015 From: amanduch at gmail.com (Andrej Manduch) Date: Thu, 09 Jul 2015 05:48:37 -0400 Subject: MEGA Invitation In-Reply-To: <20150709022040.917D7436D2@lu2.api.mega.nz> References: <20150709022040.917D7436D2@lu2.api.mega.nz> Message-ID: <559E4375.2090806@gmail.com> Dear Mega providers, One of your users (sheldon.corey at gmail.com) is useing his Mega account to sending unsolicited bulk e-mail to some comunity mailing lists (kernel newbies kernelnewbies at kernelnewbies.org and fedora devel devel at lists.fedoraproject.org in particular). Those Mailing lists are here for helping developers create great product like Linux Kernel or Fedora Linux and this kind of behaviour is discouraging developers and slowly destroying morale and comunity. Can you please take care about this? And maybe disable sending invitation for this user? On 07/08/2015 10:20 PM, MEGA wrote: > Mega Icon > Let's connect > kernelnewbies at kernelnewbies.org > > sheldon.corey at gmail.com <#> sent you an invitation to join MEGA. > "Hello, join me on MEGA and get access to encrypted storage and > communication. Get 50 GB free!" > > Join sheldon.corey at gmail.com <#> on MEGA by clicking the big button below. > Create Account > > > > Or copy and paste this link into your web browser: > https://mega.nz/#newsignupa2VybmVsbmV3Ymllc0BrZXJuZWxuZXdiaWVzLm9yZ32Jpxxarx7u > > > > > Best regards, > > Team MEGA > > ? Mega Limited 2015 > > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- Kind regards, b. From davidkiarie4 at gmail.com Thu Jul 9 07:12:02 2015 From: davidkiarie4 at gmail.com (David kiarie) Date: Thu, 9 Jul 2015 14:12:02 +0300 Subject: Kernel parameter "memmap=" Message-ID: Am trying to reserve memory using the kernel parameter "memmap=66M$0x3b000000" on Qemu but it happens that the kernel does not boot. I get a panic with the error : kernel not syncing: Out of memory and not killable processes Is there something I am missing ?Should I use some options when building the kernel to allow this command line option ? Cheers, Asla -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/9ebdecaa/attachment.html From 3daughterdad at gmail.com Thu Jul 9 11:08:21 2015 From: 3daughterdad at gmail.com (Marty) Date: Thu, 9 Jul 2015 08:08:21 -0700 Subject: I need help understanding how to locate implementation of rdmsr_safe_regs() in the linux kernel Message-ID: I am presently working with Model Specific Registers and have been studying the kernel module implementation found in arch/x86/kernel/msr.c. I am attempting to understand what the implementation of the msr_ioctl(X86_IOC_RDMSR_REGS) call is doing. msr_ioctl(X86_IOC_RDMSR_REGS) calls rdmsr_safe_regs_on_cpu() (arch/x86/lib/msr-smp.c, line 180) which sets up __rdmsr_safe_regs_on_cpu () (arch/x86/lib/msr-smp.c, line 166) as a callback function to perform the actual work. This callback function then calls rdmsr_safe_regs(). I am unable to find the implementation for rdmsr_safe_regs(). lxr only mentions references and a prototype definition. I've also manually grepped through the entire kernel source tree and have not been able to find where rdmsr_safe_regs is defined. I have poked around online, but have so far not been able to generate the correct query to find an answer. Can someone point me to the right documentation where I can figure this out? Thanks, Marty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/a08eccbc/attachment-0001.html From reachme01 at ymail.com Thu Jul 9 13:56:15 2015 From: reachme01 at ymail.com (Mohit .) Date: Thu, 9 Jul 2015 17:56:15 +0000 (UTC) Subject: Knowledge of Protocols Message-ID: <277293065.1356584.1436464575919.JavaMail.yahoo@mail.yahoo.com> Hi, I have just finished C & linux application programming with a tinge of socket programming. I would like to know what do statements like the following mean - ?"Have knowledge of Protocols such as TCP/IP, IPSec, IPV6 or SSL" Does it mean to have a theoretical view of the facets which constitute the protocol which can be done by reading RFC ?or does it also mean to have implementation knowledge (code understanding) as well. I am not very clear about this statement which is generally used quite often. Secondly, it the latter understanding is correct (Theory - RFC + Implementation - Code) then where to look for the code which deals with a particular protocol ? Thanks ! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/24cfdf56/attachment.html From Valdis.Kletnieks at vt.edu Thu Jul 9 14:34:34 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Thu, 09 Jul 2015 14:34:34 -0400 Subject: Knowledge of Protocols In-Reply-To: Your message of "Thu, 09 Jul 2015 17:56:15 -0000." <277293065.1356584.1436464575919.JavaMail.yahoo@mail.yahoo.com> References: <277293065.1356584.1436464575919.JavaMail.yahoo@mail.yahoo.com> Message-ID: <8481.1436466874@turing-police.cc.vt.edu> On Thu, 09 Jul 2015 17:56:15 -0000, "Mohit ." said: > I would like to know what do statements like the following mean > - "Have knowledge of Protocols such as TCP/IP, IPSec, IPV6 or SSL" > > > Does it mean to have a theoretical view of the facets which constitute the > protocol which can be done by reading RFC or does it also mean to have > implementation knowledge (code understanding) as well. It usually means "understand it from the point of view of the job you're applying for", and "know it well enough to be productive/useful without extensive training". If you're applying for a network engineer, it means you understand at least a bit about BGP and routing, how to use wireshark or other tools to look at bits on the wire, identifying nodes that are having issues, etc. If you're applying for a userspace programming job, it means you know how to use gethostbyname(), send()/recv()/ and friends, and how to use OpenSSL to connect to a remote system that wants to talk TLS. If you're doing kernel hacking, it means you understand how all the stuff under net/ works - and that if it says SSL it's time to go running screaming into the night. :) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150709/a30623ec/attachment.bin From anupam.kapoor at gmail.com Thu Jul 9 23:24:58 2015 From: anupam.kapoor at gmail.com (Anupam Kapoor) Date: Fri, 10 Jul 2015 08:54:58 +0530 Subject: Knowledge of Protocols In-Reply-To: <277293065.1356584.1436464575919.JavaMail.yahoo@mail.yahoo.com> References: <277293065.1356584.1436464575919.JavaMail.yahoo@mail.yahoo.com> Message-ID: <874mlcpud1.fsf@fatcat.parallelwireless> >>>>> [2015-07-09T23:26:15+0530]: "Mohit ." (Mohit): ,----[ Mohit ] | I have just finished C & linux application programming with a tinge of socket programming. | I would like to know what do statements like the following mean | | - "Have knowledge of Protocols such as TCP/IP, IPSec, IPV6 or SSL" | | | Does it mean to have a theoretical view of the facets which constitute the protocol which can be done by reading RFC or does it also mean to have implementation knowledge (code understanding) as well. I am not very clear about this statement which is generally used quite often. | Secondly, it the latter understanding is correct (Theory - RFC + Implementation - Code) then where to look for the code which deals with a particular protocol ? `---- rfc's etc come in play once you start digging into internals of said protocols. humble suggestion would be to start in a top->down manner. first as a user of these, and then go 'down the stack' (so to speak) if it strikes your fancy. if you don't know it already, richard-steven's networking books would serve as an indispensable guide on your journey. have fun ! -- kind regards anupam From sophian.yoma at gmail.com Fri Jul 10 11:07:24 2015 From: sophian.yoma at gmail.com (yoma sophian) Date: Fri, 10 Jul 2015 23:07:24 +0800 Subject: what block layer parameter events_dfl_poll_msecs used for? Message-ID: hi all: in block layer, there is one paramter like below: /sys/module/block/parameters/events_dfl_poll_msecs when I search the usage in Document, I cannot find anything. from the src, it seems firing media_chage at a fixed interval. is my guess correct? and is there any furhter debug option I can open to make sure block layer did firing those events to lower device? appreciate your kind help in advance, From ender.dai at gmail.com Fri Jul 10 14:17:13 2015 From: ender.dai at gmail.com (Ender Dai) Date: Fri, 10 Jul 2015 11:17:13 -0700 Subject: I need help understanding how to locate implementation of rdmsr_safe_regs() in the linux kernel In-Reply-To: References: Message-ID: <20150710181713.GA2384@black> On Thu, Jul 09, 2015 at 08:08:21AM -0700, Marty wrote: > I am unable to find the implementation for rdmsr_safe_regs(). lxr > only mentions > references and a prototype definition. > > I've also manually grepped through the entire kernel source tree and have > not been able to find where rdmsr_safe_regs is defined. Try http://lxr.free-electrons.com/source/arch/x86/lib/msr-reg.S If I can not grep out the definition of a function by its name, I will try to grep with part of its name again, because most likely it is created by a macro. In your case, I tried "grep safe_regs" under arch/x86/ and got what you need. From 3daughterdad at gmail.com Fri Jul 10 14:46:58 2015 From: 3daughterdad at gmail.com (Marty) Date: Fri, 10 Jul 2015 11:46:58 -0700 Subject: I need help understanding how to locate implementation of rdmsr_safe_regs() in the linux kernel In-Reply-To: <20150710181713.GA2384@black> References: <20150710181713.GA2384@black> Message-ID: Thanks for the public response (and to those who responded to me privately). I did not think about macro definitions and will definitely add that to my 'grep list' when finding things in the future. Thanks again, Marty On Fri, Jul 10, 2015 at 11:17 AM, Ender Dai wrote: > On Thu, Jul 09, 2015 at 08:08:21AM -0700, Marty wrote: > > I am unable to find the implementation for rdmsr_safe_regs(). lxr > > only mentions > > references and a prototype definition. > > > > I've also manually grepped through the entire kernel source tree and have > > not been able to find where rdmsr_safe_regs is defined. > > Try http://lxr.free-electrons.com/source/arch/x86/lib/msr-reg.S > > If I can not grep out the definition of a function by its name, I will > try to grep with part of its name again, because most likely it is > created by a macro. In your case, I tried "grep safe_regs" under > arch/x86/ and got what you need. > -- -marty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150710/406be700/attachment.html From listmail368 at gmail.com Sat Jul 11 09:06:30 2015 From: listmail368 at gmail.com (Orion Agali) Date: Sat, 11 Jul 2015 23:06:30 +1000 Subject: Displaying debug level printk messages in systemd Message-ID: <55A114D6.8030707@gmail.com> I'm using Arch and I cannot figure out how to get printk debug messages to display in journalctl. I tried the following: * Set LogLevel=debug in /etc/systemd/systemd.conf * Add kernel parameter 'debug' on boot * Setting loglevel=8 in /proc/sys/kernel/printk * dmsg -n 8 Consider the following module: Konsole output ---------- #include #include #include static int __init task1_init(void) { pr_notice("I am at level notice"); pr_debug("I am at level debug."); return 0; } static void __exit task1_exit(void){} module_init(task1_init); module_exit(task1_exit); ------------ The notice level is printed but the debug level is not. The debug message is not in dmesg or /dev/kmsg either The answer is probably straight forward, but I've hit a wall so I'm hoping somebody here will be able to point me in the right direction -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150711/c34b4ecd/attachment.html From greg at kroah.com Sat Jul 11 10:36:19 2015 From: greg at kroah.com (Greg KH) Date: Sat, 11 Jul 2015 07:36:19 -0700 Subject: Displaying debug level printk messages in systemd In-Reply-To: <55A114D6.8030707@gmail.com> References: <55A114D6.8030707@gmail.com> Message-ID: <20150711143619.GA3754@kroah.com> On Sat, Jul 11, 2015 at 11:06:30PM +1000, Orion Agali wrote: > I'm using Arch and I cannot figure out how to get printk debug messages to > display in journalctl. > > I tried the following: > ? * Set LogLevel=debug in /etc/systemd/systemd.conf > ? * Add kernel parameter 'debug' on boot > ? * Setting loglevel=8 in /proc/sys/kernel/printk > ? * dmsg -n 8 > > Consider the following module: > > ---------- > #include > #include > #include > static int __init task1_init(void) > { > ??? pr_notice("I am at level notice"); > ??? pr_debug("I am at level debug."); > ??? return 0; > } > static void __exit task1_exit(void){} > module_init(task1_init); > module_exit(task1_exit); > ------------ > > The notice level is printed but the debug level is not. > The debug message is not in dmesg or /dev/kmsg either > > The answer is probably straight forward, but I've hit a wall so I'm hoping > somebody here will be able to point me in the right direction Take a look at Documentation/dynamic-debug-howto.txt for how to get pr_debug() working properly for your module. From listmail368 at gmail.com Sat Jul 11 11:42:50 2015 From: listmail368 at gmail.com (Orion Agali) Date: Sun, 12 Jul 2015 01:42:50 +1000 Subject: Displaying debug level printk messages in systemd In-Reply-To: <20150711143619.GA3754@kroah.com> References: <55A114D6.8030707@gmail.com> <20150711143619.GA3754@kroah.com> Message-ID: <55A1397A.1080809@gmail.com> On 07/12/2015 12:36 AM, Greg KH wrote: > On Sat, Jul 11, 2015 at 11:06:30PM +1000, Orion Agali wrote: >> I'm using Arch and I cannot figure out how to get printk debug messages to >> display in journalctl. >> >> I tried the following: >> * Set LogLevel=debug in /etc/systemd/systemd.conf >> * Add kernel parameter 'debug' on boot >> * Setting loglevel=8 in /proc/sys/kernel/printk >> * dmsg -n 8 >> >> Consider the following module: >> >> ---------- >> #include >> #include >> #include >> static int __init task1_init(void) >> { >> pr_notice("I am at level notice"); >> pr_debug("I am at level debug."); >> return 0; >> } >> static void __exit task1_exit(void){} >> module_init(task1_init); >> module_exit(task1_exit); >> ------------ >> >> The notice level is printed but the debug level is not. >> The debug message is not in dmesg or /dev/kmsg either >> >> The answer is probably straight forward, but I've hit a wall so I'm hoping >> somebody here will be able to point me in the right direction > Take a look at Documentation/dynamic-debug-howto.txt for how to get > pr_debug() working properly for your module. > Great reference! After reading and testing I realize I can * activate at compile time using -DDEBUG * use dyndbg in the module paramaters * add queries to /dynamic_debug/control * use dyndbg in the boot string Thank you. From buyit at live.cn Sat Jul 11 21:39:45 2015 From: buyit at live.cn (buyitian) Date: Sun, 12 Jul 2015 09:39:45 +0800 Subject: Level irq clear has latency Message-ID: Hi Experts: My SOC has a RTC module which has a level irq connected to ARM GIC interrupt controller. Once RTC irq is triggered, it will pull high the pin to GIC so that GIC will notify ARM core and at last RTC irq handler will be called, inside handler, I will write a RTC register to clear this irq, RTC HW will pull low the pin to GIC, however, the latency between the writing to RTC register and RTC pull low the pin to GIC is big, let's assume it needs 10ms to complete this, that means I cannot return from RTC irq handler directly because the level irq has not been cleared really, and it needs 10ms to be cleared. I have some choices: 1. Call disable_irq in RTC irq handler, start a timer and then return from irq handler. When timer expires, check RTC irq status again and enable_irq. 2. Pulling RTC irq status register inside RTC irq handler. Which register shall I pull? The GIC irq pending register? Or the RTC module register? 3. Use threaded irq, pulling inside threaded irq handler. Is there any existing code or document or discussion about this irq clear issue? Thanks in advance. Best Regards From amir6723 at gmail.com Sun Jul 12 06:20:49 2015 From: amir6723 at gmail.com (Amir Hezarkhani) Date: Sun, 12 Jul 2015 14:50:49 +0430 Subject: filesystem encryption problem. Message-ID: hello I am working on adding a simple encryption to file contents in ext4 driver (for learning purposes) I added simple XOR encryption to aio_read and aio_write functions and it worked until I faced this problem: when I open a file in encrypted filesystem using VIM text editor and when I try to save it it gives me this error: >>pointer block id wrong >>can not find line 1 and it just corrupts the entire file! this is my aio_write function: aio_write_enc(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t pos) { size_t i; ssize_t ret; char *data=vmalloc(sizeof(char)*iov->iov_len); copy_from_user(data,iov->iov_base,iov->iov_len); for(i=0;iiov_len;i++) { data[i]^=5; } struct iovec iov_enc= { .iov_base = iov->iov_base, .iov_len = iov->iov_len }; copy_to_user(iov_enc.iov_base,data,iov->iov_len); ret=ext4_file_write(iocb,&iov_enc,nr_segs,pos); vfree(data); return ret; } this just changes the data and then calls original function. is there anything wrong with this function? can anyone help me? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150712/66e6c67a/attachment.html From freeman.zhang1992 at gmail.com Sun Jul 12 10:38:53 2015 From: freeman.zhang1992 at gmail.com (Freeman Zhang) Date: Sun, 12 Jul 2015 22:38:53 +0800 Subject: filesystem encryption problem. In-Reply-To: References: Message-ID: <55A27BFD.2010009@gmail.com> -------- Original Message -------- > hello > I am working on adding a simple encryption to file contents in ext4 driver > (for learning purposes) I added simple XOR encryption to aio_read and > aio_write functions and it worked until I faced this problem: > > when I open a file in encrypted filesystem using VIM text editor and when I > try to save it it gives me this error: > >>> pointer block id wrong >>> can not find line 1 > > and it just corrupts the entire file! > > this is my aio_write function: > > aio_write_enc(struct kiocb *iocb, const struct iovec *iov, > unsigned long nr_segs, loff_t pos) > { > size_t i; > ssize_t ret; > char *data=vmalloc(sizeof(char)*iov->iov_len); > copy_from_user(data,iov->iov_base,iov->iov_len); > > for(i=0;iiov_len;i++) > { > data[i]^=5; > } > struct iovec iov_enc= { .iov_base = iov->iov_base, .iov_len = > iov->iov_len }; > > copy_to_user(iov_enc.iov_base,data,iov->iov_len); > ret=ext4_file_write(iocb,&iov_enc,nr_segs,pos); > vfree(data); > return ret; > } > > this just changes the data and then calls original function. > > is there anything wrong with this function? can anyone help me? > > > Hi Amir, I'm not quite sure about what's wrong with your function, but here are two suggestions I got from the list when I did similar things: 1. wrapfs 2. ecryptfs I think you should check these two stackable filesystems if you haven't. Hope this can help a little bit! Freeman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150712/a9929b1d/attachment.bin From rohan.puri15 at gmail.com Sun Jul 12 11:03:33 2015 From: rohan.puri15 at gmail.com (Rohan Puri) Date: Sun, 12 Jul 2015 20:33:33 +0530 Subject: filesystem encryption problem. In-Reply-To: <55A27BFD.2010009@gmail.com> References: <55A27BFD.2010009@gmail.com> Message-ID: On Sun, Jul 12, 2015 at 8:08 PM, Freeman Zhang wrote: > -------- Original Message -------- > > hello > > I am working on adding a simple encryption to file contents in ext4 > driver > > (for learning purposes) I added simple XOR encryption to aio_read and > > aio_write functions and it worked until I faced this problem: > > > > when I open a file in encrypted filesystem using VIM text editor and > when I > > try to save it it gives me this error: > > > >>> pointer block id wrong > >>> can not find line 1 > > > > and it just corrupts the entire file! > > > > this is my aio_write function: > > > > aio_write_enc(struct kiocb *iocb, const struct iovec *iov, > > unsigned long nr_segs, loff_t pos) > > { > > size_t i; > > ssize_t ret; > > char *data=vmalloc(sizeof(char)*iov->iov_len); > > copy_from_user(data,iov->iov_base,iov->iov_len); > > > > for(i=0;iiov_len;i++) > > { > > data[i]^=5; > > } > > struct iovec iov_enc= { .iov_base = iov->iov_base, .iov_len = > > iov->iov_len }; > > > > copy_to_user(iov_enc.iov_base,data,iov->iov_len); > > ret=ext4_file_write(iocb,&iov_enc,nr_segs,pos); > > vfree(data); > > return ret; > > } > > > > this just changes the data and then calls original function. > > > > is there anything wrong with this function? can anyone help me? > > > > > > > Hi Amir, > > I'm not quite sure about what's wrong with your function, but here are > two suggestions I got from the list when I did similar things: > > 1. wrapfs > 2. ecryptfs > > I think you should check these two stackable filesystems if you haven't. > > Hope this can help a little bit! > > Freeman > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > Hi Amir, I agree with Freeman Zhang over here. The way you are doing it is not right. There is a mechanism to create stacks of file system and you should go down that path. Having said this, you should definitely debug the issue that you are facing. Some pointers : - 1. As you have already mentioned that this is happening only for vim and not while regular read(using cat, etc), you need to check what vim does special to read a file. I would suggest make use of strace and do reading with and without vim, maybe you will get something of interest. 2. re-read code to check, you might be messing up while write or read. Apart from these some basic practices you need to follow is : - 1. check for error conditions, like you missed checking error from vmalloc() and the below code will execute even if it failed, this should be avoided. 2. copy_from_user & again copying back to user is in-efficient. Enjoy life, Rohan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150712/b26a2e91/attachment.html From amir6723 at gmail.com Sun Jul 12 12:50:33 2015 From: amir6723 at gmail.com (Amir Hezarkhani) Date: Sun, 12 Jul 2015 21:20:33 +0430 Subject: filesystem encryption problem. In-Reply-To: References: <55A27BFD.2010009@gmail.com> Message-ID: Thank for replies. About copy_to_user and copy_from_user, whats the better way? I dont have much experience in kernel development but I'm trying to learn. Can you recommend me some books, documents, etc so I can learn more about filesystems in kernel. I am also interested to learn how mmap works because I have problems with execution of binary files in my encrypted filesystem. On Jul 12, 2015 8:30 PM, wrote: > > > On Sun, Jul 12, 2015 at 8:08 PM, Freeman Zhang < > freeman.zhang1992 at gmail.com> wrote: > >> -------- Original Message -------- >> > hello >> > I am working on adding a simple encryption to file contents in ext4 >> driver >> > (for learning purposes) I added simple XOR encryption to aio_read and >> > aio_write functions and it worked until I faced this problem: >> > >> > when I open a file in encrypted filesystem using VIM text editor and >> when I >> > try to save it it gives me this error: >> > >> >>> pointer block id wrong >> >>> can not find line 1 >> > >> > and it just corrupts the entire file! >> > >> > this is my aio_write function: >> > >> > aio_write_enc(struct kiocb *iocb, const struct iovec *iov, >> > unsigned long nr_segs, loff_t pos) >> > { >> > size_t i; >> > ssize_t ret; >> > char *data=vmalloc(sizeof(char)*iov->iov_len); >> > copy_from_user(data,iov->iov_base,iov->iov_len); >> > >> > for(i=0;iiov_len;i++) >> > { >> > data[i]^=5; >> > } >> > struct iovec iov_enc= { .iov_base = iov->iov_base, .iov_len = >> > iov->iov_len }; >> > >> > copy_to_user(iov_enc.iov_base,data,iov->iov_len); >> > ret=ext4_file_write(iocb,&iov_enc,nr_segs,pos); >> > vfree(data); >> > return ret; >> > } >> > >> > this just changes the data and then calls original function. >> > >> > is there anything wrong with this function? can anyone help me? >> > >> > >> > >> Hi Amir, >> >> I'm not quite sure about what's wrong with your function, but here are >> two suggestions I got from the list when I did similar things: >> >> 1. wrapfs >> 2. ecryptfs >> >> I think you should check these two stackable filesystems if you haven't. >> >> Hope this can help a little bit! >> >> Freeman >> >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> >> > Hi Amir, > > I agree with Freeman Zhang over here. The way you are doing it is not > right. There is a mechanism to create stacks of file system and you should > go down that path. > > Having said this, you should definitely debug the issue that you are > facing. Some pointers : - > 1. As you have already mentioned that this is happening only for vim and > not while regular read(using cat, etc), you need to check what vim does > special to read a file. I would suggest make use of strace and do reading > with and without vim, maybe you will get something of interest. > 2. re-read code to check, you might be messing up while write or read. > > Apart from these some basic practices you need to follow is : - > > 1. check for error conditions, like you missed checking error from > vmalloc() and the below code will execute even if it failed, this should be > avoided. > 2. copy_from_user & again copying back to user is in-efficient. > > > Enjoy life, > Rohan > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150712/111dc5bb/attachment.html From rohan.puri15 at gmail.com Sun Jul 12 13:30:37 2015 From: rohan.puri15 at gmail.com (Rohan Puri) Date: Sun, 12 Jul 2015 23:00:37 +0530 Subject: filesystem encryption problem. In-Reply-To: References: <55A27BFD.2010009@gmail.com> Message-ID: On 12 Jul 2015 22:20, "Amir Hezarkhani" wrote: > > Thank for replies. About copy_to_user and copy_from_user, whats the better way? > I dont have much experience in kernel development but I'm trying to learn. Can you recommend me some books, documents, etc so I can learn more about filesystems in kernel. I am also interested to learn how mmap works because I have problems with execution of binary files in my encrypted filesystem. > > On Jul 12, 2015 8:30 PM, wrote: >> >> >> >> On Sun, Jul 12, 2015 at 8:08 PM, Freeman Zhang < freeman.zhang1992 at gmail.com> wrote: >>> >>> -------- Original Message -------- >>> > hello >>> > I am working on adding a simple encryption to file contents in ext4 driver >>> > (for learning purposes) I added simple XOR encryption to aio_read and >>> > aio_write functions and it worked until I faced this problem: >>> > >>> > when I open a file in encrypted filesystem using VIM text editor and when I >>> > try to save it it gives me this error: >>> > >>> >>> pointer block id wrong >>> >>> can not find line 1 >>> > >>> > and it just corrupts the entire file! >>> > >>> > this is my aio_write function: >>> > >>> > aio_write_enc(struct kiocb *iocb, const struct iovec *iov, >>> > unsigned long nr_segs, loff_t pos) >>> > { >>> > size_t i; >>> > ssize_t ret; >>> > char *data=vmalloc(sizeof(char)*iov->iov_len); >>> > copy_from_user(data,iov->iov_base,iov->iov_len); >>> > >>> > for(i=0;iiov_len;i++) >>> > { >>> > data[i]^=5; >>> > } >>> > struct iovec iov_enc= { .iov_base = iov->iov_base, .iov_len = >>> > iov->iov_len }; >>> > >>> > copy_to_user(iov_enc.iov_base,data,iov->iov_len); >>> > ret=ext4_file_write(iocb,&iov_enc,nr_segs,pos); >>> > vfree(data); >>> > return ret; >>> > } >>> > >>> > this just changes the data and then calls original function. >>> > >>> > is there anything wrong with this function? can anyone help me? >>> > >>> > >>> > >>> Hi Amir, >>> >>> I'm not quite sure about what's wrong with your function, but here are >>> two suggestions I got from the list when I did similar things: >>> >>> 1. wrapfs >>> 2. ecryptfs >>> >>> I think you should check these two stackable filesystems if you haven't. >>> >>> Hope this can help a little bit! >>> >>> Freeman >>> >>> >>> _______________________________________________ >>> Kernelnewbies mailing list >>> Kernelnewbies at kernelnewbies.org >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>> >> >> Hi Amir, >> >> I agree with Freeman Zhang over here. The way you are doing it is not right. There is a mechanism to create stacks of file system and you should go down that path. >> >> Having said this, you should definitely debug the issue that you are facing. Some pointers : - >> 1. As you have already mentioned that this is happening only for vim and not while regular read(using cat, etc), you need to check what vim does special to read a file. I would suggest make use of strace and do reading with and without vim, maybe you will get something of interest. >> 2. re-read code to check, you might be messing up while write or read. >> >> Apart from these some basic practices you need to follow is : - >> >> 1. check for error conditions, like you missed checking error from vmalloc() and the below code will execute even if it failed, this should be avoided. >> 2. copy_from_user & again copying back to user is in-efficient. >> >> >> Enjoy life, >> Rohan > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > Hi Amir, Please reply at the bottom. Regarding what's the better way would depend on how you design stuff. Following is my recommendation :- For conceptual knowledge of general file systems the best would be OS book by Prof Remzi Arpaci-Dusseau. Excellently explained. For linux kernel conceptual stuff get hold of Robert love Linux kernel development. Read lots of kernel generic filesystem code in FS dir. Lots of basic functionality is implemented in helper functions present in this dir. Enjoy life, Rohan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150712/3014d68e/attachment.html From linuxcraz23 at gmail.com Mon Jul 13 02:43:28 2015 From: linuxcraz23 at gmail.com (Mayur Patil) Date: Mon, 13 Jul 2015 12:13:28 +0530 Subject: About Low Hanging Fruits Message-ID: Hi, I just want to know like other Open source projects is there a thing in linux kernel as Low hanging fruits. I have searched in bugzilla but not able to find it. Thanks !! -- *Regards,Mayur S Patil,Looking for R&D or Soft Engg positions,Pune, India.* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150713/f52c2b69/attachment.html From rohan.puri15 at gmail.com Mon Jul 13 12:46:16 2015 From: rohan.puri15 at gmail.com (Rohan Puri) Date: Mon, 13 Jul 2015 22:16:16 +0530 Subject: filesystem encryption problem. In-Reply-To: References: <55A27BFD.2010009@gmail.com> Message-ID: On 13 Jul 2015 22:08, "Amir Hezarkhani" wrote: > > > On Jul 13, 2015 1:18 AM, "Rohan Puri" wrote: > > > > No issues, you are welcome. > > > > Enjoy life, > > Rohan > > > > On 13 Jul 2015 01:19, "Amir Hezarkhani" wrote: > >> > >> > >> On Jul 12, 2015 10:00 PM, "Rohan Puri" wrote: > >> > > >> > > >> > On 12 Jul 2015 22:20, "Amir Hezarkhani" wrote: > >> > > > >> > > Thank for replies. About copy_to_user and copy_from_user, whats the better way? > >> > > I dont have much experience in kernel development but I'm trying to learn. Can you recommend me some books, documents, etc so I can learn more about filesystems in kernel. I am also interested to learn how mmap works because I have problems with execution of binary files in my encrypted filesystem. > >> > > > >> > > On Jul 12, 2015 8:30 PM, wrote: > >> > >> > >> > >> > >> > >> > >> > >> On Sun, Jul 12, 2015 at 8:08 PM, Freeman Zhang < freeman.zhang1992 at gmail.com> wrote: > >> > >>> > >> > >>> -------- Original Message -------- > >> > >>> > hello > >> > >>> > I am working on adding a simple encryption to file contents in ext4 driver > >> > >>> > (for learning purposes) I added simple XOR encryption to aio_read and > >> > >>> > aio_write functions and it worked until I faced this problem: > >> > >>> > > >> > >>> > when I open a file in encrypted filesystem using VIM text editor and when I > >> > >>> > try to save it it gives me this error: > >> > >>> > > >> > >>> >>> pointer block id wrong > >> > >>> >>> can not find line 1 > >> > >>> > > >> > >>> > and it just corrupts the entire file! > >> > >>> > > >> > >>> > this is my aio_write function: > >> > >>> > > >> > >>> > aio_write_enc(struct kiocb *iocb, const struct iovec *iov, > >> > >>> > unsigned long nr_segs, loff_t pos) > >> > >>> > { > >> > >>> > size_t i; > >> > >>> > ssize_t ret; > >> > >>> > char *data=vmalloc(sizeof(char)*iov->iov_len); > >> > >>> > copy_from_user(data,iov->iov_base,iov->iov_len); > >> > >>> > > >> > >>> > for(i=0;iiov_len;i++) > >> > >>> > { > >> > >>> > data[i]^=5; > >> > >>> > } > >> > >>> > struct iovec iov_enc= { .iov_base = iov->iov_base, .iov_len = > >> > >>> > iov->iov_len }; > >> > >>> > > >> > >>> > copy_to_user(iov_enc.iov_base,data,iov->iov_len); > >> > >>> > ret=ext4_file_write(iocb,&iov_enc,nr_segs,pos); > >> > >>> > vfree(data); > >> > >>> > return ret; > >> > >>> > } > >> > >>> > > >> > >>> > this just changes the data and then calls original function. > >> > >>> > > >> > >>> > is there anything wrong with this function? can anyone help me? > >> > >>> > > >> > >>> > > >> > >>> > > >> > >>> Hi Amir, > >> > >>> > >> > >>> I'm not quite sure about what's wrong with your function, but here are > >> > >>> two suggestions I got from the list when I did similar things: > >> > >>> > >> > >>> 1. wrapfs > >> > >>> 2. ecryptfs > >> > >>> > >> > >>> I think you should check these two stackable filesystems if you haven't. > >> > >>> > >> > >>> Hope this can help a little bit! > >> > >>> > >> > >>> Freeman > >> > >>> > >> > >>> > >> > >>> _______________________________________________ > >> > >>> Kernelnewbies mailing list > >> > >>> Kernelnewbies at kernelnewbies.org > >> > >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > >> > >>> > >> > >> > >> > >> Hi Amir, > >> > >> > >> > >> I agree with Freeman Zhang over here. The way you are doing it is not right. There is a mechanism to create stacks of file system and you should go down that path. > >> > >> > >> > >> Having said this, you should definitely debug the issue that you are facing. Some pointers : - > >> > >> 1. As you have already mentioned that this is happening only for vim and not while regular read(using cat, etc), you need to check what vim does special to read a file. I would suggest make use of strace and do reading with and without vim, maybe you will get something of interest. > >> > >> 2. re-read code to check, you might be messing up while write or read. > >> > >> > >> > >> Apart from these some basic practices you need to follow is : - > >> > >> > >> > >> 1. check for error conditions, like you missed checking error from vmalloc() and the below code will execute even if it failed, this should be avoided. > >> > >> 2. copy_from_user & again copying back to user is in-efficient. > > Yes you are right. This was the problem. > > >> > >> > >> > >> > >> > >> Enjoy life, > >> > >> Rohan > >> > > > >> > > > >> > > _______________________________________________ > >> > > Kernelnewbies mailing list > >> > > Kernelnewbies at kernelnewbies.org > >> > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > >> > > > >> > > >> > Hi Amir, > >> > > >> > Please reply at the bottom. Regarding what's the better way would depend on how you design stuff. > >> > > >> > Following is my recommendation :- > >> > > >> > For conceptual knowledge of general file systems the best would be OS book by Prof Remzi Arpaci-Dusseau. > >> > Excellently explained. > >> > > >> > For linux kernel conceptual stuff get hold of Robert love Linux kernel development. > >> > > >> > Read lots of kernel generic filesystem code in FS dir. Lots of basic functionality is implemented in helper functions present in this dir. > >> > > >> > Enjoy life, > >> > Rohan > >> > >> Thanks a lot Rohan. And sorry about the bad reply. > > Ok I solved the problem. As Rohan said, copy_from_user and then copy_to_user was inefficient. So I removed 'copy to user' part and assigned 'data' to iov_enc.base . thanks guys and Happy codding. Hi Amir, Good to know. Enjoy life, Rohan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150713/7232de5a/attachment.html From Valdis.Kletnieks at vt.edu Mon Jul 13 13:09:20 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Mon, 13 Jul 2015 13:09:20 -0400 Subject: About Low Hanging Fruits In-Reply-To: Your message of "Mon, 13 Jul 2015 12:13:28 +0530." References: Message-ID: <10024.1436807360@turing-police.cc.vt.edu> On Mon, 13 Jul 2015 12:13:28 +0530, Mayur Patil said: > I just want to know like other Open source projects is there a thing in > linux kernel as Low hanging fruits. The Linux kernel has been worked over by professional programmers for more than a decade, and as a result the number of things that can be attacked by a relatively unskilled newcomer is fairly low. Your best place to start is probably under drivers/staging, where we put all the stuff that's *not* up to standards yet. Each driver should have a TO-DO file describing what needs doing, and Greg HK is always willing to take checkpatch style fixups for the staging tree (many other maintainers *don't* want style patches that aren't connected to other work - if there's other active work, they can introduce merge conflicts, and if nobody's working on something, it's best to not touch stable code...) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150713/9a44bbfd/attachment.bin From rpjday at crashcourse.ca Mon Jul 13 13:11:57 2015 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Mon, 13 Jul 2015 13:11:57 -0400 (EDT) Subject: About Low Hanging Fruits In-Reply-To: <10024.1436807360@turing-police.cc.vt.edu> References: <10024.1436807360@turing-police.cc.vt.edu> Message-ID: On Mon, 13 Jul 2015, Valdis.Kletnieks at vt.edu wrote: > On Mon, 13 Jul 2015 12:13:28 +0530, Mayur Patil said: > > > I just want to know like other Open source projects is there a thing in > > linux kernel as Low hanging fruits. > > The Linux kernel has been worked over by professional programmers > for more than a decade, and as a result the number of things that > can be attacked by a relatively unskilled newcomer is fairly low. > > Your best place to start is probably under drivers/staging, where we > put all the stuff that's *not* up to standards yet. Each driver > should have a TO-DO file describing what needs doing, and Greg HK is > always willing to take checkpatch style fixups for the staging tree > (many other maintainers *don't* want style patches that aren't > connected to other work - if there's other active work, they can > introduce merge conflicts, and if nobody's working on something, > it's best to not touch stable code...) actually, one area of low-hanging fruit is the Documentation/ directory, which could always use some attention. documentation is always getting out of date, so pick a subsystem and clean up the docs. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== From jasaw at dius.com.au Mon Jul 13 23:26:44 2015 From: jasaw at dius.com.au (Joo Aun Saw) Date: Tue, 14 Jul 2015 13:26:44 +1000 Subject: st_magn_i2c DRDY on INT1 not available error Message-ID: Hi, I have an lsm303dlhc chip with accelerometer and magnetometer sensors. I'm having difficulty getting the st_magn_i2c driver to work. I get this error message: iio iio:device0: DRDY on INT1 not available. st-magn-i2c: probe of 1-001e failed with error -22 This is my device tree fragment: fragment at 0 { target = <&i2c_arm>; __overlay__ { #address-cells = <0x1>; #size-cells = <0x0>; status = "okay"; lsm303dlhc-magn at 1e { compatible = "st,lsm303dlhc-magn"; reg = <0x1e>; status = "okay"; st,drdy-int-pin = <1>; }; }; }; I'm running kernel 3.18.11. The accelerometer driver works fine though. What am I doing wrong? Any help would be greatly appreciated. Thanks. Joo From navych at 126.com Mon Jul 13 23:39:09 2015 From: navych at 126.com (Navy) Date: Tue, 14 Jul 2015 11:39:09 +0800 Subject: Test Message-ID: <20150714033909.GB2427@debian> I'm a student and it's my first time to use Mailing List. I want to see if somebody can see this mail. Thank you. From dreamyphone at gmail.com Mon Jul 13 23:42:24 2015 From: dreamyphone at gmail.com (Leng Xuedong) Date: Tue, 14 Jul 2015 12:42:24 +0900 Subject: Test In-Reply-To: <20150714033909.GB2427@debian> References: <20150714033909.GB2427@debian> Message-ID: Sorry your mail sent to kernelnewbies HSA failed forever. On Jul 14, 2015 12:41 PM, "Navy" wrote: > I'm a student and it's my first time to use Mailing List. I want to see if > somebody can see this mail. > Thank you. > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150714/d6f46fc4/attachment.html From jasaw at dius.com.au Tue Jul 14 02:39:45 2015 From: jasaw at dius.com.au (Joo Aun Saw) Date: Tue, 14 Jul 2015 16:39:45 +1000 Subject: st_magn_i2c DRDY on INT1 not available error In-Reply-To: References: Message-ID: To answer my own question in case someone else is facing the same problem. The driver that came with kernel 3.18 is broken. The driver assumes the magnetometer has a configurable DRDY interrupt when in fact it does not. To fix the problem, backport the st sensors iio drivers from kernel 4.2-rc2. Cheers, Joo. From amit at amit-agarwal.co.in Tue Jul 14 08:13:56 2015 From: amit at amit-agarwal.co.in (Amit Agarwal) Date: Tue, 14 Jul 2015 17:43:56 +0530 Subject: Query on operstatus for link, can I change it? Message-ID: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> Hi, I am looking for a way to change the operstatus shown for the network interface. Problem: I have an extra interface on the machine that I would like to use for some program like tcpreplay and tcpdump/wireshark. So, I would like to play a pcap file on this interface and then capture on the same interface with wireshark. Now the problem with this is that unless a cable is plugged in I do not see any packets in wireshark, although I do not see any failures in sending the packets. I would like to do this without any cable being plugged in as I do not intend to send the packets out, is this possible? The reason I cannot use lo interface for doing this is: there will be other packets on the lo interface and I want to capture only the packets in the pcap file that I am playing with tcpreplay. Thanks in advance for any advice on this. -- Thanks, -aka From Jeff.Haran at citrix.com Tue Jul 14 12:06:39 2015 From: Jeff.Haran at citrix.com (Jeff Haran) Date: Tue, 14 Jul 2015 16:06:39 +0000 Subject: Query on operstatus for link, can I change it? In-Reply-To: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> References: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> Message-ID: <4E5779AD88B2F040B8A7E83ECF544D1A606CA2@SJCPEX01CL03.citrite.net> > -----Original Message----- > From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- > bounces at kernelnewbies.org] On Behalf Of Amit Agarwal > Sent: Tuesday, July 14, 2015 5:14 AM > To: Kernelnewbies > Subject: Query on operstatus for link, can I change it? > > > Hi, > > I am looking for a way to change the operstatus shown for the network > interface. > > Problem: > I have an extra interface on the machine that I would like to use for some > program like tcpreplay and tcpdump/wireshark. So, I would like to play a pcap > file on this interface and then capture on the same interface with wireshark. > Now the problem with this is that unless a cable is plugged in I do not see any > packets in wireshark, although I do not see any failures in sending the > packets. I would like to do this without any cable being plugged in as I do not > intend to send the packets out, is this possible? > > The reason I cannot use lo interface for doing this is: there will be other > packets on the lo interface and I want to capture only the packets in the pcap > file that I am playing with tcpreplay. > > Thanks in advance for any advice on this. > > -- > Thanks, > -aka You might be able to make something like this work using network namespaces and veth devices. Depends on whether you really need to use your extra physical interface as the tcpreplay device. Jeff Haran From navych at 126.com Tue Jul 14 13:07:14 2015 From: navych at 126.com (Navy) Date: Wed, 15 Jul 2015 01:07:14 +0800 Subject: Which comments is unnessary? Message-ID: <20150714170713.GA12270@debian> Hi, Here is a code fragment, which comments is unnessary? I think the all the comments should be remove because the comments should show "What to do rather than "How to do?". Am I right? /************************************************************************ * Unit flag definitions for un_flags. ************************************************************************/ #define UN_ISOPEN 0x0001 /* Device is open */ #define UN_CLOSING 0x0002 /* Line is being closed */ #define UN_IMM 0x0004 /* Service immediately */ #define UN_BUSY 0x0008 /* Some work this channel */ #define UN_BREAKI 0x0010 /* Input break received */ #define UN_PWAIT 0x0020 /* Printer waiting for terminal */ #define UN_TIME 0x0040 /* Waiting on time */ #define UN_EMPTY 0x0080 /* Waiting output queue empty */ #define UN_LOW 0x0100 /* Waiting output low water mark*/ #define UN_EXCL_OPEN 0x0200 /* Open for exclusive use */ #define UN_WOPEN 0x0400 /* Device waiting for open */ #define UN_WIOCTL 0x0800 /* Device waiting for open */ #define UN_HANGUP 0x8000 /* Carrier lost */ struct device; /************************************************************************ * Structure for terminal or printer unit. ************************************************************************/ struct un_t { int magic; /* Unit Magic Number. */ struct channel_t *un_ch; ulong un_time; uint un_type; uint un_open_count; /* Counter of opens to port */ struct tty_struct *un_tty;/* Pointer to unit tty structure */ uint un_flags; /* Unit flags */ wait_queue_head_t un_flags_wait; /* Place to sleep to wait on unit */ uint un_dev; /* Minor device number */ struct device *un_sysfs; }; From mfidelman at meetinghouse.net Tue Jul 14 13:38:24 2015 From: mfidelman at meetinghouse.net (Miles Fidelman) Date: Tue, 14 Jul 2015 13:38:24 -0400 Subject: Which comments is unnessary? In-Reply-To: <20150714170713.GA12270@debian> References: <20150714170713.GA12270@debian> Message-ID: <55A54910.4060508@meetinghouse.net> Seems to me that every comment there is useful to someone who might come along later and try to understand that piece of code, and what it's doing. Navy wrote: > Hi, > Here is a code fragment, which comments is unnessary? I think the all the comments should be remove because the comments should show "What to do rather than "How to do?". Am I right? > > > /************************************************************************ > * Unit flag definitions for un_flags. > ************************************************************************/ > #define UN_ISOPEN 0x0001 /* Device is open */ > #define UN_CLOSING 0x0002 /* Line is being closed */ > #define UN_IMM 0x0004 /* Service immediately */ > #define UN_BUSY 0x0008 /* Some work this channel */ > #define UN_BREAKI 0x0010 /* Input break received */ > #define UN_PWAIT 0x0020 /* Printer waiting for terminal */ > #define UN_TIME 0x0040 /* Waiting on time */ > #define UN_EMPTY 0x0080 /* Waiting output queue empty */ > #define UN_LOW 0x0100 /* Waiting output low water mark*/ > #define UN_EXCL_OPEN 0x0200 /* Open for exclusive use */ > #define UN_WOPEN 0x0400 /* Device waiting for open */ > #define UN_WIOCTL 0x0800 /* Device waiting for open */ > #define UN_HANGUP 0x8000 /* Carrier lost */ > > struct device; > > /************************************************************************ > * Structure for terminal or printer unit. > ************************************************************************/ > struct un_t { > int magic; /* Unit Magic Number. */ > struct channel_t *un_ch; > ulong un_time; > uint un_type; > uint un_open_count; /* Counter of opens to port */ > struct tty_struct *un_tty;/* Pointer to unit tty structure */ > uint un_flags; /* Unit flags */ > wait_queue_head_t un_flags_wait; /* Place to sleep to wait on unit */ > uint un_dev; /* Minor device number */ > struct device *un_sysfs; > }; > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- In theory, there is no difference between theory and practice. In practice, there is. .... Yogi Berra From amit at amit-agarwal.co.in Tue Jul 14 14:41:23 2015 From: amit at amit-agarwal.co.in (Amit Agarwal) Date: Wed, 15 Jul 2015 00:11:23 +0530 Subject: Query on operstatus for link, can I change it? In-Reply-To: <4E5779AD88B2F040B8A7E83ECF544D1A606CA2@SJCPEX01CL03.citrite.net> References: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606CA2@SJCPEX01CL03.citrite.net> Message-ID: <20150714184122.GA9380@BALP-Fed-amitag.mobileum.com> Hi Jeff, On 15-07-14 16:06:39, Jeff Haran wrote: > > -----Original Message----- > > You might be able to make something like this work using network namespaces and veth devices. Depends on whether you really need to use your extra physical interface as the tcpreplay device. Thanks for this pointer. I will check if I can achieve what I want with netns. Also, I was wondering if I can just copy the loopback.c file, build it as module and do insmod after changing the network name from "lo" to something else, will that work? -- Thanks, -aka From Jeff.Haran at citrix.com Tue Jul 14 15:34:42 2015 From: Jeff.Haran at citrix.com (Jeff Haran) Date: Tue, 14 Jul 2015 19:34:42 +0000 Subject: Query on operstatus for link, can I change it? In-Reply-To: <20150714184122.GA9380@BALP-Fed-amitag.mobileum.com> References: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606CA2@SJCPEX01CL03.citrite.net> <20150714184122.GA9380@BALP-Fed-amitag.mobileum.com> Message-ID: <4E5779AD88B2F040B8A7E83ECF544D1A606D33@SJCPEX01CL03.citrite.net> > -----Original Message----- > From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- > bounces at kernelnewbies.org] On Behalf Of Amit Agarwal > Sent: Tuesday, July 14, 2015 11:41 AM > To: Kernelnewbies > Subject: Re: Query on operstatus for link, can I change it? > > Hi Jeff, > On 15-07-14 16:06:39, Jeff Haran wrote: > > > -----Original Message----- > > > > You might be able to make something like this work using network > namespaces and veth devices. Depends on whether you really need to use > your extra physical interface as the tcpreplay device. > > Thanks for this pointer. I will check if I can achieve what I want with netns. > > Also, I was wondering if I can just copy the loopback.c file, build it as module > and do insmod after changing the network name from "lo" to something > else, will that work? The last time I looked into this (and this was quite a while ago so take this with much salt) the lo device was not a "regular network device". The stack sets up an instance of lo in every network name space created, more or less automatically via the registration of its init routine in a struct pernet_operations. So lo doesn't initialize like most other network devices. You might have issues there. I know I did last time I tried to "borrow" loopback.c to do something similar for some prototyping I was doing. If you are willing to monkey with kernel code, it might be easier to just twiddle the link sense routine in driver for the "other NIC" you were planning to use to always report the link as up regardless of what the PHY says. Jeff Haran From Valdis.Kletnieks at vt.edu Tue Jul 14 15:37:23 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Tue, 14 Jul 2015 15:37:23 -0400 Subject: About Low Hanging Fruits In-Reply-To: Your message of "Mon, 13 Jul 2015 13:11:57 -0400." References: <10024.1436807360@turing-police.cc.vt.edu> Message-ID: <23901.1436902643@turing-police.cc.vt.edu> On Mon, 13 Jul 2015 13:11:57 -0400, "Robert P. J. Day" said: > actually, one area of low-hanging fruit is the Documentation/ > directory, which could always use some attention. documentation is > always getting out of date, so pick a subsystem and clean up the docs. Good catch, I'll add it to my standard reply. :) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150714/158d491b/attachment.bin From amit at amit-agarwal.co.in Tue Jul 14 15:54:05 2015 From: amit at amit-agarwal.co.in (Amit Agarwal) Date: Wed, 15 Jul 2015 01:24:05 +0530 Subject: Query on operstatus for link, can I change it? In-Reply-To: <4E5779AD88B2F040B8A7E83ECF544D1A606D33@SJCPEX01CL03.citrite.net> References: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606CA2@SJCPEX01CL03.citrite.net> <20150714184122.GA9380@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606D33@SJCPEX01CL03.citrite.net> Message-ID: <20150714195404.GB9380@BALP-Fed-amitag.mobileum.com> On 15-07-14 19:34:42, Jeff Haran wrote: > > The last time I looked into this (and this was quite a while ago so take this with much salt) the lo device was not a "regular network device". The stack sets up an instance of lo in every network name space created, more or less automatically via the registration of its init routine in a struct pernet_operations. So lo doesn't initialize like most other network devices. You might have issues there. I know I did last time I tried to "borrow" loopback.c to do something similar for some prototyping I was doing. Realized that while looking at this code. But thankd for pointing this. > > If you are willing to monkey with kernel code, it might be easier to just twiddle the link sense routine in driver for the "other NIC" you were planning to use to always report the link as up regardless of what the PHY says. > This too is good option. Found anther option that looks like should solve the problem I am after. veth device - as you suggested earlier. So, as I understand veth device creates a sender and receiver. So, if I send on veth0, I will receive on veth1. So, the steps that I would need is (using iproute2 utility): ip link add type veth name veth0 peer name veth1 ip link set dev veth0 up ip link set dev veth1 up and then add the address to what ever I require. I quickly tested and seems that I am able to play on veth0 and receive on veth1. One last query on this, does this interface receive any packet by default of any protocol. If so, how do I make sure that no packets other than one injected by me are seen on this interface. Sorry, if this sounds too stupid, but I am noob in this area. > > > -- Thanks, -aka From Jeff.Haran at citrix.com Tue Jul 14 16:38:49 2015 From: Jeff.Haran at citrix.com (Jeff Haran) Date: Tue, 14 Jul 2015 20:38:49 +0000 Subject: Query on operstatus for link, can I change it? In-Reply-To: <20150714195404.GB9380@BALP-Fed-amitag.mobileum.com> References: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606CA2@SJCPEX01CL03.citrite.net> <20150714184122.GA9380@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606D33@SJCPEX01CL03.citrite.net> <20150714195404.GB9380@BALP-Fed-amitag.mobileum.com> Message-ID: <4E5779AD88B2F040B8A7E83ECF544D1A606D60@SJCPEX01CL03.citrite.net> > -----Original Message----- > From: kernelnewbies-bounces+jharan=bytemobile.com at kernelnewbies.org > [mailto:kernelnewbies- > bounces+jharan=bytemobile.com at kernelnewbies.org] On Behalf Of Amit > Agarwal > Sent: Tuesday, July 14, 2015 12:54 PM > To: Kernelnewbies > Subject: Re: Query on operstatus for link, can I change it? > ... > One last query on this, does this interface receive any packet by default of > any protocol. I think of the two virtual interfaces as real NICs with a cable between them. I am pretty sure they are protocol agnostic. > If so, how do I make sure that no packets other than one > injected by me are seen on this interface. Sorry, if this sounds too stupid, but > I am noob in this area. That's what routing tables are for. 8^) Jeff Haran From amit at amit-agarwal.co.in Tue Jul 14 17:23:04 2015 From: amit at amit-agarwal.co.in (Amit Agarwal) Date: Wed, 15 Jul 2015 02:53:04 +0530 Subject: Query on operstatus for link, can I change it? In-Reply-To: <4E5779AD88B2F040B8A7E83ECF544D1A606D60@SJCPEX01CL03.citrite.net> References: <20150714121356.GA22650@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606CA2@SJCPEX01CL03.citrite.net> <20150714184122.GA9380@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606D33@SJCPEX01CL03.citrite.net> <20150714195404.GB9380@BALP-Fed-amitag.mobileum.com> <4E5779AD88B2F040B8A7E83ECF544D1A606D60@SJCPEX01CL03.citrite.net> Message-ID: <20150714212302.GA3709@BALP-Fed-amitag.mobileum.com> On 15-07-14 20:38:49, Jeff Haran wrote: > > -----Original Message----- > > I think of the two virtual interfaces as real NICs with a cable between them. I am pretty sure they are protocol agnostic. Yes, pretty much that. > > > If so, how do I make sure that no packets other than one > > injected by me are seen on this interface. Sorry, if this sounds too stupid, but > > I am noob in this area. > > That's what routing tables are for. 8^) right :) Thanks a ton Jeff. With your advice and some google, I think I can settle for dummy interface which is similar to veth - only difference being it creates one interface. Commands remain the same and I have to change only veth to dummy for type in the ip command. Also I found that I can set netmask to /32, turn off multicast and arp which should get me to what I wanted. Thanks again. -- Thanks, -aka Beware of Programmers who carry screwdrivers. -- Leonard Brandwein From bineet.cusat at gmail.com Wed Jul 15 02:56:29 2015 From: bineet.cusat at gmail.com (bineet) Date: Wed, 15 Jul 2015 12:26:29 +0530 Subject: Configuration settings for WM8850 wolfson audio codec Message-ID: I need to check setting done for WM8850 wolfson audio codec chip. I tried browsing linux code, but couldn't find any clue. Could someone please help with the same? Thanks, Bineet -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150715/3e263caf/attachment.html From Valdis.Kletnieks at vt.edu Wed Jul 15 06:37:59 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 15 Jul 2015 06:37:59 -0400 Subject: Configuration settings for WM8850 wolfson audio codec In-Reply-To: Your message of "Wed, 15 Jul 2015 12:26:29 +0530." References: Message-ID: <23382.1436956679@turing-police.cc.vt.edu> On Wed, 15 Jul 2015 12:26:29 +0530, bineet said: > I need to check setting done for WM8850 wolfson audio codec chip. I tried > browsing linux code, but couldn't find any clue. > Could someone please help with the same? Hmm.. are you sure it's an audio codec chip? WMB8850 appears to be an entire ARM architecture. [/usr/src/linux-next] git grep WM8850 Documentation/devicetree/bindings/arm/vt8500.txt:Boards with the Wondermedia WM8850 SoC shall have the following properties: Documentation/devicetree/bindings/clock/vt8500.txt: "wm,wm8850-pll-clock" - for a WM8850 PLL clock Documentation/devicetree/bindings/serial/vt8500-uart.txt: including WM8850/WM8950), or "wm,wm8880-uart" (for WM8880 and later) arch/arm/Kconfig.debug: devices, including VT8500, WM8505, WM8650 and WM8850. arch/arm/boot/dts/wm8850-w70v2.dts: * - Device tree file for Wondermedia WM8850 Tablet arch/arm/boot/dts/wm8850-w70v2.dts: model = "Wondermedia WM8850-W70v2 Tablet"; arch/arm/boot/dts/wm8850.dtsi: * wm8850.dtsi - Device tree file for Wondermedia WM8850 SoC arch/arm/configs/multi_v7_defconfig:CONFIG_ARCH_WM8850=y arch/arm/configs/vt8500_v6_v7_defconfig:CONFIG_ARCH_WM8850=y arch/arm/mach-vt8500/Kconfig:config ARCH_WM8850 arch/arm/mach-vt8500/Kconfig: bool "WonderMedia WM8850" arch/arm/mach-vt8500/Kconfig: Support for WonderMedia WM8850 System-on-Chip. drivers/clk/clk-vt8500.c:#define PLL_TYPE_WM8850 3 drivers/clk/clk-vt8500.c:/* Helper macros for PLL_WM8850 */ drivers/clk/clk-vt8500.c:#define WM8850_PLL_MUL(x) ((((x >> 16) & 0x7F) + 1) * 2) drivers/clk/clk-vt8500.c:#define WM8850_PLL_DIV(x) ((((x >> 8) & 1) + 1) * (1 << (x & 3))) drivers/clk/clk-vt8500.c:#define WM8850_BITS_TO_FREQ(r, m, d1, d2) \ drivers/clk/clk-vt8500.c:#define WM8850_BITS_TO_VAL(m, d1, d2) \ drivers/clk/clk-vt8500.c: case PLL_TYPE_WM8850: drivers/clk/clk-vt8500.c: pll_val = WM8850_BITS_TO_VAL(mul, div1, div2); drivers/clk/clk-vt8500.c: case PLL_TYPE_WM8850: drivers/clk/clk-vt8500.c: round_rate = WM8850_BITS_TO_FREQ(*prate, mul, div1, div2); drivers/clk/clk-vt8500.c: case PLL_TYPE_WM8850: drivers/clk/clk-vt8500.c: pll_freq = parent_rate * WM8850_PLL_MUL(pll_val); drivers/clk/clk-vt8500.c: pll_freq /= WM8850_PLL_DIV(pll_val); drivers/clk/clk-vt8500.c: vtwm_pll_clk_init(node, PLL_TYPE_WM8850); drivers/pinctrl/vt8500/Kconfig:config PINCTRL_WM8850 drivers/pinctrl/vt8500/Kconfig: bool "Wondermedia WM8850 pin controller driver" drivers/pinctrl/vt8500/Kconfig: depends on ARCH_WM8850 drivers/pinctrl/vt8500/Kconfig: Wondermedia WM8850 SoCs. drivers/pinctrl/vt8500/Makefile:obj-$(CONFIG_PINCTRL_WM8850) += pinctrl-wm8850.o drivers/pinctrl/vt8500/pinctrl-wm8850.c: * Pinctrl data for Wondermedia WM8850 SoC drivers/pinctrl/vt8500/pinctrl-wm8850.c:MODULE_DESCRIPTION("Wondermedia WM8850 Pincontrol driver"); drivers/video/fbdev/Kconfig: and WM8850 SoCs. Hope that helps. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150715/bf004bdf/attachment.bin From xerofoify at gmail.com Thu Jul 9 15:33:58 2015 From: xerofoify at gmail.com (nick) Date: Thu, 09 Jul 2015 15:33:58 -0400 Subject: Formal Apology Message-ID: <559ECCA6.7000502@gmail.com> Greetings All, I am formally apologizing for last year. After reading back other it all I can state is wow no wonder I was banned, not only did I not listen but all my patches were not tested. All I can state is I am so sorry and really feel stupid about so much that I feel like hitting my head against the wall a few times. In addition I cannot even believe I was that stupid and arrogant. To be honest I am surprised I wasn't banned a few weeks earlier :((((. Sorry, Nick From navych at 126.com Thu Jul 16 00:33:25 2015 From: navych at 126.com (Navy) Date: Thu, 16 Jul 2015 12:33:25 +0800 Subject: Can I submit a patch? Message-ID: <20150716043325.GA2085@debian> Hi, I have done some cleanups in /drivers/staging/dgnc. I have compiled the driver and insmod/lsmod it. As I have no "dgnc" divice in my laptop, I don't kown whether it works well. Can I submit the patch? Thanks. From sudipm.mukherjee at gmail.com Thu Jul 16 00:36:21 2015 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Thu, 16 Jul 2015 10:06:21 +0530 Subject: Can I submit a patch? In-Reply-To: <20150716043325.GA2085@debian> References: <20150716043325.GA2085@debian> Message-ID: On Thu, Jul 16, 2015 at 10:03 AM, Navy wrote: > Hi, > I have done some cleanups in /drivers/staging/dgnc. I have compiled the driver and insmod/lsmod it. As I have no "dgnc" divice in my laptop, I don't kown whether it works well. Can I submit the patch? Sure, you are always welcome to submit a patch for staging. But just remember that you should not do different types of changes in a single patch. regards sudip From navych at 126.com Fri Jul 17 03:55:55 2015 From: navych at 126.com (Navy) Date: Fri, 17 Jul 2015 15:55:55 +0800 Subject: goto??? Message-ID: <20150717075555.GA29600@debian> Hello, Goto is recommend in linux kernel programming, but it is despised in many other situation. There are four rationable for using goto in Documentation/CodingStyle. Do you have some viewpoints about "why goto" or "why not goto"? I'm glad to get your point. Thank you. From sudipm.mukherjee at gmail.com Fri Jul 17 04:11:16 2015 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Fri, 17 Jul 2015 13:41:16 +0530 Subject: goto??? In-Reply-To: <20150717075555.GA29600@debian> References: <20150717075555.GA29600@debian> Message-ID: On Fri, Jul 17, 2015 at 1:25 PM, Navy wrote: > Hello, > Goto is recommend in linux kernel programming, but it is despised in many other situation. There are four rationable for using goto in Documentation/CodingStyle. Do you have some viewpoints about "why goto" or "why not goto"? I'm glad to get your point. Check the file drivers/staging/dgap/dgap.c there is a function called dgap_init_one() which is using 6 goto statements. Please try to convert that file without using goto and i hope you will understand practically why goto. regards sudip From chambilkethakur at gmail.com Fri Jul 17 05:07:35 2015 From: chambilkethakur at gmail.com (Anuz Pratap Singh Tomar) Date: Fri, 17 Jul 2015 10:07:35 +0100 Subject: goto??? In-Reply-To: <20150717075555.GA29600@debian> References: <20150717075555.GA29600@debian> Message-ID: On Fri, Jul 17, 2015 at 8:55 AM, Navy wrote: > Hello, > Goto is recommend in linux kernel programming, but it is despised in many > other situation. There are four rationable for using goto in > Documentation/CodingStyle. Do you have some viewpoints about "why goto" or > "why not goto"? I'm glad to get your point. > Thank you. > > Bit of kernel History here, read what Linus said about goto http://koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code/ Thank you Warm Regards Anuz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150717/868725ac/attachment.html From sudipm.mukherjee at gmail.com Fri Jul 17 05:13:50 2015 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Fri, 17 Jul 2015 14:43:50 +0530 Subject: goto??? In-Reply-To: <7290c20fdca267b5f7dae838466b2c3d@posteo.de> References: <20150717075555.GA29600@debian> <7290c20fdca267b5f7dae838466b2c3d@posteo.de> Message-ID: On Fri, Jul 17, 2015 at 2:18 PM, Martin Knappe wrote: > Very easy: Looks good. :) But for me, now while reading the code I have to keep a note of the value of cleanupState variable and the error path becomes confusing. And besides in your opinion now which code is more readable, the original code or this one? regards sudip From sudipm.mukherjee at gmail.com Fri Jul 17 05:31:21 2015 From: sudipm.mukherjee at gmail.com (Sudip Mukherjee) Date: Fri, 17 Jul 2015 15:01:21 +0530 Subject: goto??? In-Reply-To: <7933ea7ccd079d6e1aef32c0f70400e2@posteo.de> References: <20150717075555.GA29600@debian> <7290c20fdca267b5f7dae838466b2c3d@posteo.de> <7933ea7ccd079d6e1aef32c0f70400e2@posteo.de> Message-ID: On Fri, Jul 17, 2015 at 2:52 PM, Martin Knappe wrote: > I'm just messing ... > I guess I felt a bit challenged by your "try to write that without using > goto" Hey, it was not a challenge. main thing is the readability. But going by your general rules how will you modify this same function of dgap? I think I can get rid of multiple return only if i modify the code into a series of if - else . or anything simple? regards sudip From bernd at petrovitsch.priv.at Fri Jul 17 06:00:32 2015 From: bernd at petrovitsch.priv.at (Bernd Petrovitsch) Date: Fri, 17 Jul 2015 12:00:32 +0200 Subject: goto??? In-Reply-To: <20150717075555.GA29600@debian> References: <20150717075555.GA29600@debian> Message-ID: <1437127234.32331.16.camel@thorin> Hi! On Fre, 2015-07-17 at 15:55 +0800, Navy wrote: [...] > Goto is recommend in linux kernel programming, but it is despised in > many other situation. There are four rationable for using goto in "goto" is (usually totally) forbidden for beginners/inexperienced programmers because some of us are old enough to have started programming with Basic on the C64 (no functions there - just "goto" and "gosub") and know what may happen in the long run if you write more than a hello-world.c ... My usual answer to "when may or should I use 'goto'" is: You will know when it's time - before that, simply don't use it. > Documentation/CodingStyle. Do you have some viewpoints about "why > goto" or "why not goto"? I'm glad to get your point. It mainly depends *how* you use it - see the patterns in the kernel for not so bad ones;-) And - as others wrote - rewrite the code without 'goto' and look into it after 3 months and decide which version is more readable/understandable. BTW that holds for all programming "style advices" (starting from "when should i factor out a function" over "how large should a function should be" and "too few or too many comments" to ...). It is like everywhere else: If the guideline is trivial to check, it is probably silly anyways. The big goal in (99,9% of) software development is: You want source code to be as easy to read and understand as possible - and nothing else! Coding style guidelines are just that: guidelines in that direction but never necessary nor sufficient to guarantee that (so the occasional violation for good reason - which one writes into a comment;-) - is not evil). Bernd -- "I dislike type abstraction if it has no real reason. And saving on typing is not a good reason - if your typing speed is the main issue when you're coding, you're doing something seriously wrong." - Linus Torvalds From luis at debethencourt.com Fri Jul 17 06:21:26 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Fri, 17 Jul 2015 11:21:26 +0100 Subject: goto??? In-Reply-To: <1437127234.32331.16.camel@thorin> References: <20150717075555.GA29600@debian> <1437127234.32331.16.camel@thorin> Message-ID: On 17 July 2015 at 11:00, Bernd Petrovitsch wrote: > Hi! > > On Fre, 2015-07-17 at 15:55 +0800, Navy wrote: > [...] > > Goto is recommend in linux kernel programming, but it is despised in > > many other situation. There are four rationable for using goto in > > "goto" is (usually totally) forbidden for beginners/inexperienced > programmers because some of us are old enough to have started > programming with Basic on the C64 (no functions there - just "goto" and > "gosub") and know what may happen in the long run if you write more than > a hello-world.c ... > My usual answer to "when may or should I use 'goto'" is: You will know > when it's time - before that, simply don't use it. > > > Documentation/CodingStyle. Do you have some viewpoints about "why > > goto" or "why not goto"? I'm glad to get your point. > > It mainly depends *how* you use it - see the patterns in the kernel for > not so bad ones;-) > And - as others wrote - rewrite the code without 'goto' and look into it > after 3 months and decide which version is more readable/understandable. > > BTW that holds for all programming "style advices" (starting from "when > should i factor out a function" over "how large should a function should > be" and "too few or too many comments" to ...). > It is like everywhere else: If the guideline is trivial to check, it is > probably silly anyways. > > The big goal in (99,9% of) software development is: You want source code > to be as easy to read and understand as possible - and nothing else! > > Coding style guidelines are just that: guidelines in that direction but > never necessary nor sufficient to guarantee that (so the occasional > violation for good reason - which one writes into a comment;-) - is not > evil). > > Bernd This is an interesting article about the history of goto being considered harmful; and how Dijkstra?s paper about it was misunderstood. http://videlalvaro.github.io/2015/02/programming-myths.html Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150717/d85b83d1/attachment.html From ahmedsoliman0x666 at gmail.com Fri Jul 17 08:40:19 2015 From: ahmedsoliman0x666 at gmail.com (Ahmed Soliman) Date: Fri, 17 Jul 2015 14:40:19 +0200 Subject: how to build Documentation/DocBook/ Message-ID: I have fresh kernel downloaded by git and I want to know how to build Documentation/DocBook/ as pdf I have tried make pdfdocs >output but I got those warnings Warning(.//include/linux/init.h): no structured comments found Warning(.//kernel/sys.c): no structured comments found Warning(.//drivers/dma-buf/seqno-fence.c): no structured comments found Warning(.//drivers/dma-buf/reservation.c): no structured comments found Warning(.//include/linux/reservation.h): no structured comments found Warning(.//include/linux/hsi/hsi.h:150): Excess struct/union/enum/typedef member 'e_handler' description in 'hsi_client' Warning(.//include/linux/hsi/hsi.h:150): Excess struct/union/enum/typedef member 'pclaimed' description in 'hsi_client' Warning(.//include/linux/hsi/hsi.h:150): Excess struct/union/enum/typedef member 'nb' description in 'hsi_client' make[1]: *** [Documentation/DocBook/kernel-hacking.pdf] Error 9 make: *** [pdfdocs] Error 2 and the file output look like this DOCPROC Documentation/DocBook/z8530book.xml PDF Documentation/DocBook/z8530book.pdf Using catalogs: /etc/sgml/catalog Using stylesheet: /usr/share/docbook-utils/docbook-utils.dsl#print Working on: /home/oddcoder/linux/Documentation/DocBook/z8530book.xml Done. DOCPROC Documentation/DocBook/device-drivers.xml PDF Documentation/DocBook/device-drivers.pdf Using catalogs: /etc/sgml/catalog Using stylesheet: /usr/share/docbook-utils/docbook-utils.dsl#print Working on: /home/oddcoder/linux/Documentation/DocBook/device-drivers.xml Done. DOCPROC Documentation/DocBook/kernel-hacking.xml PDF Documentation/DocBook/kernel-hacking.pdf Using catalogs: /etc/sgml/catalog Using stylesheet: /usr/share/docbook-utils/docbook-utils.dsl#print Working on: /home/oddcoder/linux/Documentation/DocBook/kernel-hacking.xml This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) restricted \write18 enabled. entering extended mode (/home/oddcoder/linux/Documentation/DocBook/kernel-hacking.tex JadeTeX 2003/04/27: 3.13 (/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1ptm.fd) Elements will be labelled Jade begin document sequence at 20 No file kernel-hacking.aux. (/usr/share/texmf/tex/latex/tipa/t3ptm.fd) (/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd) (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] ) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty) (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty)) (/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1phv.fd) [1.0.30{/var/lib/texm f/fonts/map/pdftex/updmap/pdftex.map}] (/usr/share/texlive/texmf-dist/tex/latex/psnfss/ts1ptm.fd) [2.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 315. LaTeX Warning: Reference `0:introduction' on page iii undefined on input line 3 72. LaTeX Warning: Reference `0:basic-players' on page iii undefined on input line 406. LaTeX Warning: Reference `0:basics-usercontext' on page iii undefined on input line 432. LaTeX Warning: Reference `0:basics-hardirqs' on page iii undefined on input lin e 457. LaTeX Warning: Reference `0:basics-softirqs' on page iii undefined on input lin e 482. LaTeX Warning: Reference `0:basic-rules' on page iii undefined on input line 51 6. LaTeX Warning: Reference `0:ioctls' on page iii undefined on input line 550. LaTeX Warning: Reference `0:deadlock-recipes' on page iii undefined on input li ne 584. LaTeX Warning: Reference `0:common-routines' on page iii undefined on input lin e 618. (/usr/share/texlive/texmf-dist/tex/latex/psnfss/t1pcr.fd) LaTeX Warning: Reference `0:routines-printk' on page iii undefined on input lin e 655. LaTeX Warning: Reference `0:routines-copy' on page iii undefined on input line 705. LaTeX Warning: Reference `0:routines-kmalloc' on page iii undefined on input li ne 746. LaTeX Warning: Reference `0:routines-current' on page iii undefined on input li ne 782. LaTeX Warning: Reference `0:routines-udelay' on page iii undefined on input lin e 829. LaTeX Warning: Reference `0:routines-endian' on page iii undefined on input lin e 880. LaTeX Warning: Reference `0:routines-local-irqs' on page iii undefined on input line 921. LaTeX Warning: Reference `0:routines-softirqs' on page iii undefined on input l ine 962. LaTeX Warning: Reference `0:routines-processorids' on page iii undefined on inp ut line 998. LaTeX Warning: Reference `0:routines-init' on page iii undefined on input line 1041. LaTeX Warning: Reference `0:routines-init-again' on page iii undefined on input line 1082. LaTeX Warning: Reference `0:routines-moduleexit' on page iii undefined on input line 1118. LaTeX Warning: Reference `0:routines-module-use-counters' on page iii undefined on input line 1159. LaTeX Warning: Reference `0:queues' on page iii undefined on input line 1199. LaTeX Warning: Reference `0:queue-declaring' on page iii undefined on input lin e 1225. LaTeX Warning: Reference `0:queue-waitqueue' on page iii undefined on input lin e 1250. LaTeX Warning: Reference `0:queue-waking' on page iii undefined on input line 1 275. LaTeX Warning: Reference `0:atomic-ops' on page iii undefined on input line 130 9. LaTeX Warning: Reference `0:symbols' on page iii undefined on input line 1343. LaTeX Warning: Reference `0:sym-exportsymbols' on page iii undefined on input l ine 1380. LaTeX Warning: Reference `0:sym-exportsymbols-gpl' on page iii undefined on inp ut line 1416. LaTeX Warning: Reference `0:conventions' on page iii undefined on input line 14 50. LaTeX Warning: Reference `0:conventions-doublelinkedlist' on page iii undefined on input line 1482. LaTeX Warning: Reference `0:convention-returns' on page iii undefined on input line 1507. LaTeX Warning: Reference `0:conventions-borkedcompile' on page iii undefined on input line 1532. LaTeX Warning: Reference `0:conventions-initialising' on page iii undefined on input line 1557. LaTeX Warning: Reference `0:conventions-gnu-extns' on page iii undefined on inp ut line 1582. LaTeX Warning: Reference `0:conventions-cplusplus' on page iii undefined on inp ut line 1607. LaTeX Warning: Reference `0:conventions-ifdef' on page iii undefined on input l ine 1632. LaTeX Warning: Reference `0:submitting' on page iii undefined on input line 166 6. LaTeX Warning: Reference `0:cantrips' on page iii undefined on input line 1700. LaTeX Warning: Reference `0:credits' on page iii undefined on input line 1734. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 1734. [3.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 1825. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 1825. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 1917. pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has been already used, duplicate ignored \relax l.1917 \endPar{}\endNode{}\endSeq{}\endSpS {}\endNode{}\Node% [1.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 2004. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 2004. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 2499. pdfTeX warning (ext4): destination with the same identifier (name{page.2}) has been already used, duplicate ignored \relax l.2499 \endPar{} \endNode{}\Node% [2.0.30] [3.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 2978. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 2978. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 3217. [4.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 3304. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 3304. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 3601. [5.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 3688. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 3688. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 3908. [6.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 3995. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 3995. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 4357. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 4357. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 4357. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 4357. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 4459. [7.0.30] [8.0.30] Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5193. Overfull \hbox (31.63298pt too wide) in paragraph at lines 5161--5193 \T1/pcr/b/n/15.552 cpu_to_be32()\T1/phv/b/n/17.28 /\T1/pcr/b/n/15.552 be32_to_c pu()\T1/phv/b/n/17.28 /\T1/pcr/b/n/15.552 cpu_to_le32()\T1/phv/b/n/17.28 /\T1/p cr/b/n/15.552 le32_to_cpu() Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5314. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5314. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5314. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5314. [9.0.30] Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5409. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5409. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5409. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5409. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5486. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5486. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5601. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5601. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5601. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5601. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5601. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5601. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5703. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5703. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5703. [10.0.30] Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5845. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5946. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5946. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 5946. [11.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 6112. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 6112. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 6462. [12.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 6549. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 6549. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 6787. [13.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 6874. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 6874. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 7000. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 7074. Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref) removing `subscript' on input line 7074. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 7113. [14.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 7200. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 7200. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 7633. [15.0.30] ! Undefined control sequence. \Hy at wrapper@babel ...set at display@protect \edef \x {#2}\@onelevel at sanitize \x... l.8111 \endHeadPar{} \endSeq{}\Node% ! Argument of \HyWrap at new@pdflink has an extra }. \par l.8111 \endHeadPar{} \endSeq{}\Node% Runaway argument? ! Paragraph ended before \HyWrap at new@pdflink was complete. \par l.8111 \endHeadPar{} \endSeq{}\Node% ! Extra \else. \endHeadPar ...headingTwo}{1}{\HeadingText }\else \ifnum \HeadingLevel =3\ad... l.8111 \endHeadPar{} \endSeq{}\Node% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8129 {1}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8148 {0}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8161 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8161 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8161 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8161 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8161 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8161 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8161 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8169 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8182 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8182 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8182 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8197 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8197 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8197 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8197 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8197 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8197 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8197 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8205 ... the Kernel\endSeq{}\endNode{}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8218 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8218 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8218 {}\endSeq{}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8220 {} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8220 {} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8220 {} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8220 {} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8220 {} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8220 {} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8221 {} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8222 {} \HeadPar% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8238 {1}} Chapter 11. \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8239 {} \Node% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8264 {1}} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8265 {} \endSeq{}\endPar{}\endSeq{}\Node% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8283 {1}} ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8296 {1}} \Node% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8301 {0}} \Par% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8310 {1}} \Seq% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8311 {} \LineField% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8317 {0}} \Character{8226}\endLineField{}\endSeq{}\Node% ! Use of \begin doesn't match its definition. \LineField ...ieldNIC \FlowObjectSetup {0}\begin { LRbox}{\dssslbox } l.8317 {0}} \Character{8226}\endLineField{}\endSeq{}\Node% ! Use of \\pdfbookmark doesn't match its definition. \SetupICs ...mName \endcsname \fi }}\set at fontsize \baselinestretch {\fSize }... l.8317 {0}}\Character{8226} \endLineField{}\endSeq{}\Node% ! Use of \end doesn't match its definition. \endLineField ->\end { LRbox}\ifdim \wd \dssslbox >\FieldWidth \def \FieldWid... l.8317 {0}}\Character{8226}\endLineField {}\endSeq{}\Node% ! Missing \endcsname inserted. \expandafter l.8317 {0}}\Character{8226}\endLineField {}\endSeq{}\Node% ! Extra \endcsname. \HyPsd@@LetCommand ...ter \expandafter \endcsname \fi \fi l.8317 {0}}\Character{8226}\endLineField {}\endSeq{}\Node% [16.0.30] [17.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 8631. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 8631. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 8905. [18.0.30] [19.0.30] Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 9046. Package Fancyhdr Warning: \fancyhead's `E' option without twoside option is use less on input line 9046. Package Fancyhdr Warning: \fancyfoot's `E' option without twoside option is use less on input line 9121. [20.0.30] (/home/oddcoder/linux/Documentation/DocBook/kernel-hacking.aux) Package rerunfilecheck Warning: File `kernel-hacking.out' has changed. (rerunfilecheck) Rerun to get outlines right (rerunfilecheck) or use package `bookmark'. LaTeX Warning: There were undefined references. ) (\end occurred inside a group at level 1) ### semi simple group (level 1) entered at line 7128 (\begingroup) ### bottom level (\end occurred when \ifnum on line 8244 was incomplete) (\end occurred when \ifnum on line 8111 was incomplete) (see the transcript file for additional information)pdfTeX warning (dest): name {0:submitting} has been referenced but does not exist, replaced by a fixed one {/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc} Output written on kernel-hacking.pdf (23 pages, 161706 bytes). Transcript written on kernel-hacking.log. and I could only find those pdfs in directory Documentation/DocBook/ 1-device-drivers.pdf 2-kernel-hacking.pdf 3-z8530book.pdf so if there is something that I missed please tell me note that the building process required docbook-utils and I installed it by apt-get thanks in advance From luis at debethencourt.com Fri Jul 17 09:18:04 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Fri, 17 Jul 2015 14:18:04 +0100 Subject: how to build Documentation/DocBook/ In-Reply-To: References: Message-ID: On 17 July 2015 at 13:40, Ahmed Soliman wrote: > I have fresh kernel downloaded by git and I want to know how to build > Documentation/DocBook/ as pdf I have tried > make pdfdocs >output > but I got those warnings > Warning(.//include/linux/init.h): no structured comments found > Warning(.//kernel/sys.c): no structured comments found > Warning(.//drivers/dma-buf/seqno-fence.c): no structured comments found > Warning(.//drivers/dma-buf/reservation.c): no structured comments found > Warning(.//include/linux/reservation.h): no structured comments found > Warning(.//include/linux/hsi/hsi.h:150): Excess > struct/union/enum/typedef member 'e_handler' description in > 'hsi_client' > Warning(.//include/linux/hsi/hsi.h:150): Excess > struct/union/enum/typedef member 'pclaimed' description in > 'hsi_client' > Warning(.//include/linux/hsi/hsi.h:150): Excess > struct/union/enum/typedef member 'nb' description in 'hsi_client' > make[1]: *** [Documentation/DocBook/kernel-hacking.pdf] Error 9 > make: *** [pdfdocs] Error 2 > > and the file output look like this > > Which Kernel version are you using? It looks like your error has been fixed by: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9e39dc1e563e8d390bae42ee80e1e665c18b7de2 Unfortunately. make pdfdocs fails when building DocBook/scsi.pdf in the latest stable release (4.1.2) Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150717/8b5fe4df/attachment.html From ronit.linux at gmail.com Fri Jul 17 11:06:05 2015 From: ronit.linux at gmail.com (roni) Date: Fri, 17 Jul 2015 20:36:05 +0530 Subject: dev_* mesage Message-ID: <1437145565.4166.1.camel@roni> What is the difference between dev_* (like dev_err) and pr_* (like pr_err)? In which situations we use them? From luis at debethencourt.com Fri Jul 17 11:28:09 2015 From: luis at debethencourt.com (Luis de Bethencourt) Date: Fri, 17 Jul 2015 16:28:09 +0100 Subject: dev_* mesage In-Reply-To: <1437145565.4166.1.camel@roni> References: <1437145565.4166.1.camel@roni> Message-ID: On 17 July 2015 at 16:06, roni wrote: > What is the difference between dev_* (like dev_err) and pr_* (like > pr_err)? > In which situations we use them? > > dev_*() is prefered when you have a struct device object. Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150717/e458d61c/attachment.html From kohaerenzstifter at posteo.de Fri Jul 17 04:48:53 2015 From: kohaerenzstifter at posteo.de (Martin Knappe) Date: Fri, 17 Jul 2015 10:48:53 +0200 Subject: =?UTF-8?Q?goto=3F=3F=3F?= In-Reply-To: References: <20150717075555.GA29600@debian> Message-ID: <7290c20fdca267b5f7dae838466b2c3d@posteo.de> Very easy: static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { int rc = 0; int cleanupState = 0; struct board_t *brd; void cleanup() { if (cleanupState > 4) { dgap_tty_free(brd); } if (cleanupState > 3) { dgap_free_irq(brd); dgap_tty_unregister(brd); } if (cleanupState > 2) { dgap_tty_unregister(brd); } if (cleanupState > 1) { dgap_free_flipbuf(brd); } if (cleanupState > 0) { dgap_cleanup_nodes(); dgap_unmap(brd); kfree(brd); } } if (dgap_numboards >= MAXBOARDS) return -EPERM; rc = pci_enable_device(pdev); if (rc) return -EIO; brd = dgap_found_board(pdev, ent->driver_data, dgap_numboards); if (IS_ERR(brd)) return PTR_ERR(brd); rc = dgap_firmware_load(pdev, ent->driver_data, brd); cleanupState++; if (rc) { cleanup(); return rc; } rc = dgap_alloc_flipbuf(brd); if (rc) { cleanup(); return rc; } rc = dgap_tty_register(brd); cleanupState++; if (rc) { cleanup(); return rc; } rc = dgap_request_irq(brd); cleanupState++; if (rc) { cleanup(); return rc; } /* * Do tty device initialization. */ rc = dgap_tty_init(brd); cleanupState++; if (rc) { cleanup(); return rc; } rc = dgap_tty_register_ports(brd); cleanupState++; if (rc) { cleanup(); return rc; } brd->state = BOARD_READY; brd->dpastatus = BD_RUNNING; dgap_board[dgap_numboards++] = brd; return 0; } Am 17.07.2015 10:11 schrieb Sudip Mukherjee: > On Fri, Jul 17, 2015 at 1:25 PM, Navy wrote: >> Hello, >> Goto is recommend in linux kernel programming, but it is despised in >> many other situation. There are four rationable for using goto in >> Documentation/CodingStyle. Do you have some viewpoints about "why >> goto" or "why > not goto"? I'm glad to get your point. > Check the file drivers/staging/dgap/dgap.c there is a function > called dgap_init_one() which is using 6 goto statements. Please > try to convert that file without using goto and i hope you will > understand > practically why goto. > > regards > sudip > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From kohaerenzstifter at posteo.de Fri Jul 17 05:22:58 2015 From: kohaerenzstifter at posteo.de (Martin Knappe) Date: Fri, 17 Jul 2015 11:22:58 +0200 Subject: =?UTF-8?Q?goto=3F=3F=3F?= In-Reply-To: References: <20150717075555.GA29600@debian> <7290c20fdca267b5f7dae838466b2c3d@posteo.de> Message-ID: <7933ea7ccd079d6e1aef32c0f70400e2@posteo.de> I'm just messing ... I guess I felt a bit challenged by your "try to write that without using goto" I use goto myself very much for function cleanup. I wouldn't normally code the way I did in that snippet. Apart from that, my general rule for any function is: 1) Only ONE return statement. 2) Only ONE cleanup label to goto in case of an error. Call that label "finish", ALWAYS. Am 17.07.2015 11:13 schrieb Sudip Mukherjee: > On Fri, Jul 17, 2015 at 2:18 PM, Martin Knappe > wrote: >> Very easy: > Looks good. :) > But for me, now while reading the code I have to keep a note of the > value of cleanupState variable and the error path becomes confusing. > And besides in your opinion now which code is more readable, the > original > code or this one? > > regards > sudip From kohaerenzstifter at posteo.de Fri Jul 17 05:40:00 2015 From: kohaerenzstifter at posteo.de (Martin Knappe) Date: Fri, 17 Jul 2015 11:40:00 +0200 Subject: =?UTF-8?Q?goto=3F=3F=3F?= In-Reply-To: References: <20150717075555.GA29600@debian> <7290c20fdca267b5f7dae838466b2c3d@posteo.de> <7933ea7ccd079d6e1aef32c0f70400e2@posteo.de> Message-ID: Like so: static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { int rc = 0; int cleanupState = 0; struct board_t *brd; if (dgap_numboards >= MAXBOARDS) { rc = -EPERM; goto finish; } rc = pci_enable_device(pdev); if (rc) { rc = -EIO; goto finish; } brd = dgap_found_board(pdev, ent->driver_data, dgap_numboards); if (IS_ERR(brd)) { rc = PTR_ERR(brd); goto finish; } rc = dgap_firmware_load(pdev, ent->driver_data, brd); cleanupState++; if (rc) { goto finish; } rc = dgap_alloc_flipbuf(brd); if (rc) { goto finish; } rc = dgap_tty_register(brd); cleanupState++; if (rc) { goto finish; } rc = dgap_request_irq(brd); cleanupState++; if (rc) { goto finish; } /* * Do tty device initialization. */ rc = dgap_tty_init(brd); cleanupState++; if (rc) { goto finish; } rc = dgap_tty_register_ports(brd); cleanupState++; if (rc) { goto finish; } brd->state = BOARD_READY; brd->dpastatus = BD_RUNNING; dgap_board[dgap_numboards++] = brd; finish: if (cleanupState > 4) { dgap_tty_free(brd); } if (cleanupState > 3) { dgap_free_irq(brd); dgap_tty_unregister(brd); } if (cleanupState > 2) { dgap_tty_unregister(brd); } if (cleanupState > 1) { dgap_free_flipbuf(brd); } if (cleanupState > 0) { dgap_cleanup_nodes(); dgap_unmap(brd); kfree(brd); } return rc; } Am 17.07.2015 11:31 schrieb Sudip Mukherjee: > On Fri, Jul 17, 2015 at 2:52 PM, Martin Knappe > wrote: >> I'm just messing ... >> I guess I felt a bit challenged by your "try to write that without >> using >> goto" > Hey, it was not a challenge. main thing is the readability. > But going by your general rules how will you modify this > same function of dgap? I think I can get rid of multiple return > only if i modify the code into a series of if - else . > or anything simple? > > regards > sudip From kohaerenzstifter at posteo.de Fri Jul 17 05:44:34 2015 From: kohaerenzstifter at posteo.de (Martin Knappe) Date: Fri, 17 Jul 2015 11:44:34 +0200 Subject: =?UTF-8?Q?goto=3F=3F=3F?= In-Reply-To: References: <20150717075555.GA29600@debian> <7290c20fdca267b5f7dae838466b2c3d@posteo.de> <7933ea7ccd079d6e1aef32c0f70400e2@posteo.de> Message-ID: Sorry, have to correct my solution. You need to add "cleanupState = 0" just before the "finish", like so: static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { int rc = 0; int cleanupState = 0; struct board_t *brd; if (dgap_numboards >= MAXBOARDS) { rc = -EPERM; goto finish; } rc = pci_enable_device(pdev); if (rc) { rc = -EIO; goto finish; } brd = dgap_found_board(pdev, ent->driver_data, dgap_numboards); if (IS_ERR(brd)) { rc = PTR_ERR(brd); goto finish; } rc = dgap_firmware_load(pdev, ent->driver_data, brd); cleanupState++; if (rc) { goto finish; } rc = dgap_alloc_flipbuf(brd); if (rc) { goto finish; } rc = dgap_tty_register(brd); cleanupState++; if (rc) { goto finish; } rc = dgap_request_irq(brd); cleanupState++; if (rc) { goto finish; } /* * Do tty device initialization. */ rc = dgap_tty_init(brd); cleanupState++; if (rc) { goto finish; } rc = dgap_tty_register_ports(brd); cleanupState++; if (rc) { goto finish; } brd->state = BOARD_READY; brd->dpastatus = BD_RUNNING; dgap_board[dgap_numboards++] = brd; //missed this one in my last post... cleanupState = 0; finish: if (cleanupState > 4) { dgap_tty_free(brd); } if (cleanupState > 3) { dgap_free_irq(brd); dgap_tty_unregister(brd); } if (cleanupState > 2) { dgap_tty_unregister(brd); } if (cleanupState > 1) { dgap_free_flipbuf(brd); } if (cleanupState > 0) { dgap_cleanup_nodes(); dgap_unmap(brd); kfree(brd); } return rc; } Am 17.07.2015 11:31 schrieb Sudip Mukherjee: > On Fri, Jul 17, 2015 at 2:52 PM, Martin Knappe > wrote: >> I'm just messing ... >> I guess I felt a bit challenged by your "try to write that without >> using >> goto" > Hey, it was not a challenge. main thing is the readability. > But going by your general rules how will you modify this > same function of dgap? I think I can get rid of multiple return > only if i modify the code into a series of if - else . > or anything simple? > > regards > sudip From Valdis.Kletnieks at vt.edu Fri Jul 17 17:06:53 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Fri, 17 Jul 2015 17:06:53 -0400 Subject: goto??? In-Reply-To: Your message of "Fri, 17 Jul 2015 11:44:34 +0200." References: <20150717075555.GA29600@debian> <7290c20fdca267b5f7dae838466b2c3d@posteo.de> <7933ea7ccd079d6e1aef32c0f70400e2@posteo.de> Message-ID: <24785.1437167213@turing-police.cc.vt.edu> On Fri, 17 Jul 2015 10:48:53 +0200, Martin Knappe said: > Very easy: On Fri, 17 Jul 2015 11:40:00 +0200, Martin Knappe said: > Like so: On Fri, 17 Jul 2015 11:44:34 +0200, Martin Knappe said: > Sorry, have to correct my solution. You need to add "cleanupState = 0" > just before the "finish", like so: I think the fact we've seen 3 version inside an hour shows that it's not as "Very easy" as originally asserted. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150717/78af7034/attachment.bin From kohaerenzstifter at posteo.de Fri Jul 17 17:58:00 2015 From: kohaerenzstifter at posteo.de (Martin Knappe) Date: Fri, 17 Jul 2015 23:58:00 +0200 Subject: =?UTF-8?Q?goto=3F=3F=3F?= In-Reply-To: <24785.1437167213@turing-police.cc.vt.edu> References: <20150717075555.GA29600@debian> <7290c20fdca267b5f7dae838466b2c3d@posteo.de> <7933ea7ccd079d6e1aef32c0f70400e2@posteo.de> <24785.1437167213@turing-police.cc.vt.edu> Message-ID: My first solution was the answer to the question how to write that function without the use of goto. I did that in less than 10 minutes and it's absolutely flawless, so yes it's VERY EASY. I posted the second solution only to show how I personally would prefer to write that function, in a way that actually DOES use gotos, too. My third solution was just a minor correction to this second solution (just one statement added), and had nothing to do with the first solution and the original question, of how to avoid gotos at all. Try to Read, Concentrate and Think ... If you don't understand what we're talking about, please be quiet. Yes it's VERY EASY to rewrite that function without using gotos (see my first post). It is and remains correct. Am 17.07.2015 23:06 schrieb Valdis.Kletnieks at vt.edu: > On Fri, 17 Jul 2015 10:48:53 +0200, Martin Knappe said: >> Very easy: > > On Fri, 17 Jul 2015 11:40:00 +0200, Martin Knappe said: >> Like so: > > On Fri, 17 Jul 2015 11:44:34 +0200, Martin Knappe said: >> Sorry, have to correct my solution. You need to add "cleanupState = 0" >> just before the "finish", like so: > > I think the fact we've seen 3 version inside an hour shows that it's > not as "Very easy" as originally asserted. From alexhoppus111 at gmail.com Sat Jul 18 01:53:10 2015 From: alexhoppus111 at gmail.com (Alexander) Date: Sat, 18 Jul 2015 08:53:10 +0300 Subject: Delegating printk work to UART interrupt Message-ID: <20150718085310.a16cf8673504dc93b9dcbe18@gmail.com> Hi! When i checked how kernel printing works, i mentioned that it takes messages from log_buffer in console_unlock and gives it to call_console_drivers -> ... -> some uart bsp function. Basically, as i see this BSP realization tries to flush all message chars in busyloop ... so it waits until FIFO_NOT_FULL bit will be dropped by UART and it will be able to push the next byte. Basically, as i see userspace printing do something different. It puts N_FIFO_BYTES and exits, next, when FIFO will be freed - interrupt will be generated, and other characters will be put into UART FIFO. Can we do something similar for kernel printing? i.e. do not busyloop sending char after char, but put N_FIFO chars and flush other in interrupt. When panic will occur we can do busyloop printing again. Is it reliable? Suppose we have several cores. Thank you. -- Alexander From ricardo.ribalda at gmail.com Sat Jul 18 10:11:30 2015 From: ricardo.ribalda at gmail.com (Ricardo Ribalda Delgado) Date: Sat, 18 Jul 2015 16:11:30 +0200 Subject: When to resend a patchset? Message-ID: Hello Usually I was taking the approach of pinging a patch after 21 days of inactivity. This has worked ok in the past, but the last time I have done it I was told that the merge window was open and that nothing could be done at that time. Is there a written guideline to know when to resend/ping a patch? How can I figure out the current development status of the kernel? Anything better than the lwn? I dont want to wast useful maintainer time :) Thanks! -- Ricardo Ribalda From markus93 at inbox.ru Sun Jul 19 02:53:37 2015 From: markus93 at inbox.ru (=?UTF-8?B?TWV5ZXIgTGFuc2t5?=) Date: Sun, 19 Jul 2015 09:53:37 +0300 Subject: =?UTF-8?B?RnV6emluZyBzY2hlZHVsZXIgQ0ZT?= Message-ID: <1437288817.980771703@f334.i.mail.ru> Hello everyone! I decided to take fuzzing?task Scheduler CFS? http://lxr.free-electrons.com/source/kernel/sched/fair.c Question:?I just recently learning fuzzing?and it is at all possible fuzzy scheduler? If so then why will advise you start? Excuse me for my english. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150719/e03da275/attachment.html From navych at 126.com Sun Jul 19 05:40:21 2015 From: navych at 126.com (Navy) Date: Sun, 19 Jul 2015 17:40:21 +0800 Subject: What can I do if I sent a wrong patch? Message-ID: <20150719094020.GA1992@debian> Hello, A mistake was found after I sent the patch to mentors. What Can I do to make up the fault? From rpjday at crashcourse.ca Sun Jul 19 05:46:20 2015 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Sun, 19 Jul 2015 05:46:20 -0400 (EDT) Subject: What can I do if I sent a wrong patch? In-Reply-To: <20150719094020.GA1992@debian> References: <20150719094020.GA1992@debian> Message-ID: On Sun, 19 Jul 2015, Navy wrote: > Hello, > A mistake was found after I sent the patch to mentors. What Can I do > to make up the fault? first, if they're truly mentors, they should check the patch themselves and catch the error. otherwise, they're not really doing their job as "mentors." second, you need to self-examine what you failed to do properly to have sent in a bad patch. i doubt you've done any real harm; the linux kernel has lots of checking up the hierarchy so that a truly damaging patch is rarely going to get into the source tree. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== From greg at kroah.com Sun Jul 19 14:46:50 2015 From: greg at kroah.com (Greg KH) Date: Sun, 19 Jul 2015 11:46:50 -0700 Subject: When to resend a patchset? In-Reply-To: References: Message-ID: <20150719184650.GB9565@kroah.com> On Sat, Jul 18, 2015 at 04:11:30PM +0200, Ricardo Ribalda Delgado wrote: > Hello > > Usually I was taking the approach of pinging a patch after 21 days of > inactivity. > > This has worked ok in the past, but the last time I have done it I > was told that the merge window was open and that nothing could be done > at that time. > > Is there a written guideline to know when to resend/ping a patch? > How can I figure out the current development status of the kernel? Look at the release that is happening this week, that will tell you the status. Take a look at Documentation/development_process/ for more details than you ever wanted to know :) From rpjday at crashcourse.ca Sun Jul 19 14:51:50 2015 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Sun, 19 Jul 2015 14:51:50 -0400 (EDT) Subject: When to resend a patchset? In-Reply-To: <20150719184650.GB9565@kroah.com> References: <20150719184650.GB9565@kroah.com> Message-ID: On Sun, 19 Jul 2015, Greg KH wrote: > On Sat, Jul 18, 2015 at 04:11:30PM +0200, Ricardo Ribalda Delgado wrote: > > Hello > > > > Usually I was taking the approach of pinging a patch after 21 days of > > inactivity. > > > > This has worked ok in the past, but the last time I have done it I > > was told that the merge window was open and that nothing could be done > > at that time. > > > > Is there a written guideline to know when to resend/ping a patch? > > How can I figure out the current development status of the kernel? > > Look at the release that is happening this week, that will tell you > the status. Take a look at Documentation/development_process/ for > more details than you ever wanted to know :) it's just eerie how any discussion involving greg KH typically ends with the phrase, "more details than you ever wanted to know." :-) rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== From riel at surriel.com Sun Jul 19 17:03:58 2015 From: riel at surriel.com (Rik van Riel) Date: Sun, 19 Jul 2015 17:03:58 -0400 Subject: What can I do if I sent a wrong patch? In-Reply-To: References: <20150719094020.GA1992@debian> Message-ID: <55AC10BE.5000304@surriel.com> On 07/19/2015 05:46 AM, Robert P. J. Day wrote: > On Sun, 19 Jul 2015, Navy wrote: > >> Hello, > >> A mistake was found after I sent the patch to mentors. What Can I do >> to make up the fault? > > first, if they're truly mentors, they should check the patch > themselves and catch the error. otherwise, they're not really doing > their job as "mentors." > > second, you need to self-examine what you failed to do properly to > have sent in a bad patch. third, send out a follow-up email informing people that you found a mistake with your patch. People appreciate developers who take responsibility for their code, and work to fix it up after the fact. -- All rights reversed. From xiaonan830818 at gmail.com Sun Jul 19 23:43:07 2015 From: xiaonan830818 at gmail.com (Nan Xiao) Date: Mon, 20 Jul 2015 11:43:07 +0800 Subject: How to understand "processor" in "SMP" and "UP"? Message-ID: Hi all, Per my understanding, the "processor" in "SMP" and "UP" should be a "logic CPU", not a "physical CPU". If the "physical CPU" contains 2 "cores", and every "core" contains 2 "hardware threads", then the "processor" should stands for "hardware thread". Is my understanding right? Thanks very much in advance! Best Regards Nan Xiao -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150720/ae5c549e/attachment.html From getarunks at gmail.com Mon Jul 20 00:04:16 2015 From: getarunks at gmail.com (Arun KS) Date: Mon, 20 Jul 2015 09:34:16 +0530 Subject: Delegating printk work to UART interrupt In-Reply-To: <20150718085310.a16cf8673504dc93b9dcbe18@gmail.com> References: <20150718085310.a16cf8673504dc93b9dcbe18@gmail.com> Message-ID: Hello Alexander, On Sat, Jul 18, 2015 at 11:23 AM, Alexander wrote: > > Hi! > When i checked how kernel printing works, i mentioned that it takes > messages > from log_buffer in console_unlock and gives it to call_console_drivers -> > ... > -> some uart bsp function. Basically, as i see this BSP realization tries > to flush all message chars in busyloop ... so it waits until FIFO_NOT_FULL > bit will > be dropped by UART and it will be able to push the next byte. > Basically, as i see userspace printing do something different. It puts > N_FIFO_BYTES > and exits, next, when FIFO will be freed - interrupt will be generated, and > other characters will be put into UART FIFO. > Can we do something similar for kernel printing? i.e. do not busyloop > sending char > after char, but put N_FIFO chars and flush other in interrupt. When panic > will occur > we can do busyloop printing again. Is it reliable? Suppose we have several > cores. > Thank you. > What about trying this patch, https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/printk/printk.c?id=5874af2003b1aaaa053128d655710140e3187226 Its not changing console printing through UART to interrupt mode. But minimizes the time interrupts being disabled on printk(). Thanks, Arun > > -- > Alexander > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150720/198b65bf/attachment.html From ahmedsoliman0x666 at gmail.com Mon Jul 20 06:03:07 2015 From: ahmedsoliman0x666 at gmail.com (Ahmed Soliman) Date: Mon, 20 Jul 2015 12:03:07 +0200 Subject: what is the use of #ifndefs Message-ID: currently I started reading through the linux kernel and I started reading liunx/include/linux/list.h> I understood some of the functions but still I dont know what does these lines of code do #ifndef _LINUX_LIST_H #define _LINUX_LIST_H which exist at the very beginning of the file I also noticed that there is many similar ifndefs in almost any .h file in the kernel note that I understand wnat does ifndef do bu I dont understand what goal is it supposed to achieve at the beginning of the headerfile From kirotawa at gmail.com Mon Jul 20 11:55:24 2015 From: kirotawa at gmail.com (leo kirotawa) Date: Mon, 20 Jul 2015 12:55:24 -0300 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: it means you don't want to redefine a .h file On Mon, Jul 20, 2015 at 7:03 AM, Ahmed Soliman wrote: > currently I started reading through the linux kernel and I started > reading liunx/include/linux/list.h> I understood some of the functions > but still I dont know what does these lines of code do > #ifndef _LINUX_LIST_H > #define _LINUX_LIST_H > which exist at the very beginning of the file > I also noticed that there is many similar ifndefs in almost any .h > file in the kernel > note that I understand wnat does ifndef do bu I dont understand what > goal is it supposed to achieve at the beginning of the headerfile > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- ---------------------------------------------- Le?nidas S. Barbosa (Kirotawa) blog: corecode.wordpress.com From fruktopus at gmail.com Mon Jul 20 12:03:39 2015 From: fruktopus at gmail.com (=?UTF-8?B?U3RlcGhhbiBNw7xsbGVy?=) Date: Mon, 20 Jul 2015 18:03:39 +0200 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: <55AD1BDB.6030805@gmail.com> The keyword is 'include guard' ~frukto Am 20.07.2015 um 17:55 schrieb leo kirotawa: > it means you don't want to redefine a .h file > > On Mon, Jul 20, 2015 at 7:03 AM, Ahmed Soliman > wrote: >> currently I started reading through the linux kernel and I started >> reading liunx/include/linux/list.h> I understood some of the functions >> but still I dont know what does these lines of code do >> #ifndef _LINUX_LIST_H >> #define _LINUX_LIST_H >> which exist at the very beginning of the file >> I also noticed that there is many similar ifndefs in almost any .h >> file in the kernel >> note that I understand wnat does ifndef do bu I dont understand what >> goal is it supposed to achieve at the beginning of the headerfile >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies at kernelnewbies.org >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > From greg.freemyer at gmail.com Mon Jul 20 12:11:00 2015 From: greg.freemyer at gmail.com (Greg Freemyer) Date: Mon, 20 Jul 2015 12:11:00 -0400 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: Ahmed, That's basic C syntax for 30 years both in and out of the kernel. If you include the same header file multiple times you can get errors about defining the same structures, constants, globals multiple times. So the first time it is included you want the header file to actually be included. For all subsequent times you want it ignored by the compiler. And that is exactly what #ifndef _LINUX_LIST_H #define _LINUX_LIST_H causes to happen. Greg -- Greg Freemyer www.IntelligentAvatar.net On Mon, Jul 20, 2015 at 6:03 AM, Ahmed Soliman wrote: > currently I started reading through the linux kernel and I started > reading liunx/include/linux/list.h> I understood some of the functions > but still I dont know what does these lines of code do > #ifndef _LINUX_LIST_H > #define _LINUX_LIST_H > which exist at the very beginning of the file > I also noticed that there is many similar ifndefs in almost any .h > file in the kernel > note that I understand wnat does ifndef do bu I dont understand what > goal is it supposed to achieve at the beginning of the headerfile > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From anish198519851985 at gmail.com Mon Jul 20 13:00:41 2015 From: anish198519851985 at gmail.com (anish singh) Date: Mon, 20 Jul 2015 10:00:41 -0700 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: On Mon, Jul 20, 2015 at 3:03 AM, Ahmed Soliman wrote: > currently I started reading through the linux kernel and I started > reading liunx/include/linux/list.h> I understood some of the functions > but still I dont know what does these lines of code do > #ifndef _LINUX_LIST_H > #define _LINUX_LIST_H > which exist at the very beginning of the file > I also noticed that there is many similar ifndefs in almost any .h > file in the kernel > note that I understand wnat does ifndef do bu I dont understand what > goal is it supposed to achieve at the beginning of the headerfile > It makes sure that the file doesn't get included twice.Suppose you have a.c and a.h file and you have #include "thisfile"(where you have that #ifndef thing) in both a.c and a.h file then it will be included only once. Because once .c or .h includes it then that particular #define is already defined so next time it will not execute when someone tries to include it again. Hope that helps. > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150720/e8258c98/attachment.html From riel at surriel.com Mon Jul 20 17:04:15 2015 From: riel at surriel.com (Rik van Riel) Date: Mon, 20 Jul 2015 17:04:15 -0400 Subject: How to understand "processor" in "SMP" and "UP"? In-Reply-To: References: Message-ID: <55AD624F.808@surriel.com> On 07/19/2015 11:43 PM, Nan Xiao wrote: > Hi all, > > Per my understanding, the "processor" in "SMP" and "UP" should be a > "logic CPU", not a "physical CPU". > If the "physical CPU" contains 2 "cores", and every "core" contains 2 > "hardware threads", then the "processor" > should stands for "hardware thread". > > Is my understanding right? Thanks very much in advance! Yes, you are absolutely right, when speaking from a software point of view. Each logical processor shows up as a CPU in Linux. Of course, if you were to talk to somebody installing physical CPUs in systems, you would get a different answer :) -- All rights reversed. From xiaonan830818 at gmail.com Mon Jul 20 21:56:38 2015 From: xiaonan830818 at gmail.com (Nan Xiao) Date: Tue, 21 Jul 2015 09:56:38 +0800 Subject: How to understand "processor" in "SMP" and "UP"? In-Reply-To: <55AD624F.808@surriel.com> References: <55AD624F.808@surriel.com> Message-ID: Hi Rik, Thanks very much for your comments! Best Regards Nan Xiao On Tue, Jul 21, 2015 at 5:04 AM, Rik van Riel wrote: > On 07/19/2015 11:43 PM, Nan Xiao wrote: > > Hi all, > > > > Per my understanding, the "processor" in "SMP" and "UP" should be a > > "logic CPU", not a "physical CPU". > > If the "physical CPU" contains 2 "cores", and every "core" contains 2 > > "hardware threads", then the "processor" > > should stands for "hardware thread". > > > > Is my understanding right? Thanks very much in advance! > > Yes, you are absolutely right, when speaking from a > software point of view. > > Each logical processor shows up as a CPU in Linux. > > Of course, if you were to talk to somebody installing > physical CPUs in systems, you would get a different > answer :) > > -- > All rights reversed. > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/64a0a7c3/attachment.html From navych at 126.com Mon Jul 20 22:24:45 2015 From: navych at 126.com (Navy) Date: Tue, 21 Jul 2015 10:24:45 +0800 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: <20150721022445.GA2368@debian> On Mon, Jul 20, 2015 at 12:03:07PM +0200, Ahmed Soliman wrote: > currently I started reading through the linux kernel and I started > reading liunx/include/linux/list.h> I understood some of the functions > but still I dont know what does these lines of code do > #ifndef _LINUX_LIST_H > #define _LINUX_LIST_H > which exist at the very beginning of the file > I also noticed that there is many similar ifndefs in almost any .h > file in the kernel > note that I understand wnat does ifndef do bu I dont understand what > goal is it supposed to achieve at the beginning of the headerfile > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies The whole structure seems to #ifndef ... #define ... . . . #endif From raulpblooper at gmail.com Tue Jul 21 01:05:48 2015 From: raulpblooper at gmail.com (Raul Piper) Date: Tue, 21 Jul 2015 10:35:48 +0530 Subject: what is the use of #ifndefs In-Reply-To: <20150721022445.GA2368@debian> References: <20150721022445.GA2368@debian> Message-ID: This is to avoid multiple declarations.In header file you declare the variables and function names and these have to be declared just once otherwise you will get multiple declaration error. #ifndef avoids this error .By placing it at the top all the declaration is visited just once =>How?Since suppose _LINUX_LIST_H is not defined and when you enter the file #ifndef (if not defined) will be true , hence it will go to next line and define it using #define _LINUX_LIST_H .Now Since #defines(Macros) have global scopes across all the files, if suppose in some other files you have included this file (which defines above macros) , it will check first #ifndef _LINUX_LIST_H , but since it has already been defiend it will not enter the next line and you will be saved from multiple declaration error. On Tue, Jul 21, 2015 at 7:54 AM, Navy wrote: > On Mon, Jul 20, 2015 at 12:03:07PM +0200, Ahmed Soliman wrote: > > currently I started reading through the linux kernel and I started > > reading liunx/include/linux/list.h> I understood some of the functions > > but still I dont know what does these lines of code do > > #ifndef _LINUX_LIST_H > > #define _LINUX_LIST_H > > which exist at the very beginning of the file > > I also noticed that there is many similar ifndefs in almost any .h > > file in the kernel > > note that I understand wnat does ifndef do bu I dont understand what > > goal is it supposed to achieve at the beginning of the headerfile > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > The whole structure seems to > #ifndef ... > #define ... > . > . > . > #endif > > > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/78f31450/attachment-0001.html From amit.pandey0612 at gmail.com Tue Jul 21 01:34:15 2015 From: amit.pandey0612 at gmail.com (Amit Pandey) Date: Tue, 21 Jul 2015 11:04:15 +0530 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: Hi Ahmed, See the comments inline #ifndef _LINUX_LIST_H // If not defined _LINUX_LIST_H macro #define _LINUX_LIST_H // then define this macro #include "linuxlist.h" // and include linuxlist.h header file #endif // end of #ifndef Now say in another file if u r not sure whether you have already included the "linuxlist.h" then you will again repeat above lines of code, assuming you have included it then certainly _LINUX_LIST_H macro has already been defined, so compiler will not include this file again. See comments below #ifndef _LINUX_LIST_H // Since macro _LINUX_LIST_H has already defined #define _LINUX_LIST_H // compiler will ignore this line #include "linuxlist.h" // compiler will ignore this line, too. Hence no multiple inclusion of same header file #endif Please let me know whether I was clear with the explanation. Thanks, Amit On Mon, Jul 20, 2015 at 3:33 PM, Ahmed Soliman wrote: > currently I started reading through the linux kernel and I started > reading liunx/include/linux/list.h> I understood some of the functions > but still I dont know what does these lines of code do > #ifndef _LINUX_LIST_H > #define _LINUX_LIST_H > which exist at the very beginning of the file > I also noticed that there is many similar ifndefs in almost any .h > file in the kernel > note that I understand wnat does ifndef do bu I dont understand what > goal is it supposed to achieve at the beginning of the headerfile > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/7b870722/attachment.html From navych at 126.com Tue Jul 21 03:01:05 2015 From: navych at 126.com (Navy) Date: Tue, 21 Jul 2015 15:01:05 +0800 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: <20150721063737.GA4726@debian> On Tue, Jul 21, 2015 at 11:04:15AM +0530, Amit Pandey wrote: > Hi Ahmed, > > See the comments inline > #ifndef _LINUX_LIST_H // If not defined _LINUX_LIST_H macro > #define _LINUX_LIST_H // then define this macro > #include "linuxlist.h" // and include linuxlist.h header file > #endif // end of #ifndef > > Now say in another file if u r not sure whether you have already included > the "linuxlist.h" then you will again repeat above lines of code, assuming > you have included it then certainly _LINUX_LIST_H macro has already been > defined, so compiler will not include this file again. See comments below > > #ifndef _LINUX_LIST_H // Since macro _LINUX_LIST_H has already defined > #define _LINUX_LIST_H // compiler will ignore this line > #include "linuxlist.h" // compiler will ignore this line, too. > Hence no multiple inclusion of same header file > #endif > > Please let me know whether I was clear with the explanation. > > Thanks, > Amit > > On Mon, Jul 20, 2015 at 3:33 PM, Ahmed Soliman > wrote: > > > currently I started reading through the linux kernel and I started > > reading liunx/include/linux/list.h> I understood some of the functions > > but still I dont know what does these lines of code do > > #ifndef _LINUX_LIST_H > > #define _LINUX_LIST_H > > which exist at the very beginning of the file > > I also noticed that there is many similar ifndefs in almost any .h > > file in the kernel > > note that I understand wnat does ifndef do bu I dont understand what > > goal is it supposed to achieve at the beginning of the headerfile > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies Your explanation seems to be wrong. The code below should in "linuxlist.h" ,other than in other files which include "linuxlist.h". #ifndef _LINUX_LIST_H #define _LINUX_LIST_H ... #endif From bernd at petrovitsch.priv.at Tue Jul 21 04:33:37 2015 From: bernd at petrovitsch.priv.at (Bernd Petrovitsch) Date: Tue, 21 Jul 2015 10:33:37 +0200 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: <1437467622.32331.25.camel@thorin> Hi all! On Die, 2015-07-21 at 11:04 +0530, Amit Pandey wrote: [... crap deleted ...] > Please let me know whether I was clear with the explanation. It was clear and it is total and absolute crap: - first, check with the .h (and .c) files in the kernel (and all others which get it right), that it is *not* as described above. - second, the above approach may work (if done right) but has a some severe drawbacks and disadvantages: * you have to duplicate (lots of times!) the 3 lines ("#ifndef ...", "#define ...", "#endif" to all files (.c and .h) where on actually #includes the .h file. * imagine a .c file with 10 #include - you get 30 additional lines. And 10 is probably not the a large number for this. * you rely that in all places people use the very same #define macro for the same .h file - which is way to error-prone to use the pattern. For non-crap solution: just look into one .h file in the kernel (or read other answers in the thread) - no duplication etc. ..... BTW that is nothing that the Linux kernel created but everyone uses that in the C/C++ work since ages ..... Kind regards, Bernd -- "I dislike type abstraction if it has no real reason. And saving on typing is not a good reason - if your typing speed is the main issue when you're coding, you're doing something seriously wrong." - Linus Torvalds From ap3188 at columbia.edu Mon Jul 20 23:00:15 2015 From: ap3188 at columbia.edu (Ankit Pradhan) Date: Mon, 20 Jul 2015 23:00:15 -0400 Subject: Allocate write combined memory for BAR of a PCIe device and transfer data in bursts Message-ID: <2270417947104927618@unknownmsgid> Hello everyone I want to be able to send 1-2KB of data from host, using BARs of a PCIe device, with very low latency. I am working on an FPGA project in which I have to send packet data from Host to FPGA over PCIe 3.0 interface. This is a latency critical application and therefore I want to use BARs to send data in bursts and not use DMA because it has a lot of overhead. I started out with the device driver provided to me by my FPGA board vendor. That driver allocates 'uncached' memory for the BAR via mmap and provides its virtual pointer to the user application for use. When I initiate a transfer by dereferencing that pointer in my application and observe the write signals that arrive at my FPGA using a logic analyzer. I see all write requests arriving after constant time period and the burst count signal is always 1. I have concluded that these transfers are not in bursts. I modified the driver by using the ioremap_wc() on the physical address of BAR and then passed the virtual pointer it returned to set_memory_wc() (apparently I have to use both). I was able to get 'write combined' memory for the physical BAR address. When I do writes using this pointer and observe from logic analyzer I can see burst transfers. That is, I see 4 bursts of 5-6 write requests sent within a short time period. The problem is that the pointer to this memory is a kernel virtual pointer. I want to be able to do the above from user space. How can I do this? Thanks Ankit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150720/ebbb8c2e/attachment.html From tanure at linux.com Tue Jul 21 14:49:22 2015 From: tanure at linux.com (Lucas Tanure) Date: Tue, 21 Jul 2015 15:49:22 -0300 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API Message-ID: Hi, This company released a obfuscated kernel module in GPL 2. http://www.incentivespro.com/downloads.html So, they didn't release the code at all. This is ok ? This against the law ? If you download the source for linux you will se this code: /* * * Copyright (C) 2007-2015 SimplyCore, LLC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * */ #include "usbd.h" #ifdef _USBD_DEBUG_MEMORY_ atomic_t llIlllll=ATOMIC_INIT((0x575+1935-0xd04));atomic_t lIIlIIIll=ATOMIC_INIT ((0xa1d+3263-0x16dc));atomic_t IllIlIlI=ATOMIC_INIT((0x128f+4169-0x22d8)); atomic_t IlIllllI=ATOMIC_INIT((0xf24+561-0x1155)); #ifdef ATOMIC64_INIT atomic64_t llIlIlll=ATOMIC64_INIT((0xeb9+1200-0x1369)); #endif atomic_t IllllIlI=ATOMIC_INIT((0x95+5058-0x1457));atomic_t lIIllllI=ATOMIC_INIT( (0x54+4166-0x109a));atomic_t llIllIlI=ATOMIC_INIT((0x90+8277-0x20e5)); #endif struct lllIl*IIIIlll=NULL; #ifdef _USBD_ENABLE_STUB_ spinlock_t IIIIlII;struct list_head IIIIlIlI; #endif static int lIIIlIII=(0x1b5b+1617-0x21ac);module_param(lIIIlIII,int, ... many lines .... #endif IIIll("\x75\x73\x62\x64\x5f\x65\x78\x69\x74" "\n");}module_init(IlIIllIIl); module_exit(usbd_exit);MODULE_LICENSE("\x47\x50\x4c"); -- Lucas Tanure +55 (19) 988176559 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/ed83f051/attachment.html From greg at kroah.com Tue Jul 21 15:05:59 2015 From: greg at kroah.com (Greg KH) Date: Tue, 21 Jul 2015 12:05:59 -0700 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API In-Reply-To: References: Message-ID: <20150721190559.GA21710@kroah.com> On Tue, Jul 21, 2015 at 03:49:22PM -0300, Lucas Tanure wrote: > Hi,? > > This company released a obfuscated kernel module in GPL 2.? > http://www.incentivespro.com/downloads.html > > So, they didn't release the code at all. This is ok ?? > This against the law ?? Why are you asking developers legal questions? Would you ask us medical questions and expect valid answers? Please consult a lawyer if you have questions about licensing and the like. thanks, greg k-h From dave.jing.tian at gmail.com Tue Jul 21 15:14:19 2015 From: dave.jing.tian at gmail.com (Dave Tian) Date: Tue, 21 Jul 2015 15:14:19 -0400 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API In-Reply-To: <20150721190559.GA21710@kroah.com> References: <20150721190559.GA21710@kroah.com> Message-ID: Off the topic maybe, this usb redirector could be built above usbip, which is in the mainline. -daveti > On Jul 21, 2015, at 3:05 PM, Greg KH wrote: > > On Tue, Jul 21, 2015 at 03:49:22PM -0300, Lucas Tanure wrote: >> Hi, >> >> This company released a obfuscated kernel module in GPL 2. >> http://www.incentivespro.com/downloads.html >> >> So, they didn't release the code at all. This is ok ? >> This against the law ? > > Why are you asking developers legal questions? Would you ask us medical > questions and expect valid answers? Please consult a lawyer if you have > questions about licensing and the like. > > thanks, > > greg k-h > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From aruna.hewapathirane at gmail.com Tue Jul 21 15:44:58 2015 From: aruna.hewapathirane at gmail.com (Aruna Hewapathirane) Date: Tue, 21 Jul 2015 15:44:58 -0400 Subject: what is the use of #ifndefs In-Reply-To: References: Message-ID: >> I dont understand what goal is it supposed to achieve >> at the beginning of the headerfile The 'goal' is to prevent 'redefinition' errors, like Stephan M?ller said it is a 'include guard'. A explanation of why and how to use include guards can be found here: https://en.wikipedia.org/wiki/Include_guard When I try : find . -name "*.c" -o -name "*.h" | xargs grep -i "include " | wc -l It gives me 1319 instances where list.h is being included, imagine your function being redefined that many times. Not only will gcc bitch and complain about redefinition errors but go screaming into the night like Valdis says.. [grin] If you still have difficulty understanding why, the best way would be to write some simple code yourself then compile, you will start to see why we require the #ifndef. Thanks - Aruna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/dffcd221/attachment.html From Valdis.Kletnieks at vt.edu Tue Jul 21 16:00:25 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Tue, 21 Jul 2015 16:00:25 -0400 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API In-Reply-To: Your message of "Tue, 21 Jul 2015 15:49:22 -0300." References: Message-ID: <10097.1437508825@turing-police.cc.vt.edu> On Tue, 21 Jul 2015 15:49:22 -0300, Lucas Tanure said: > Hi, > > This company released a obfuscated kernel module in GPL 2. > http://www.incentivespro.com/downloads.html > > So, they didn't release the code at all. This is ok ? > This against the law ? We're code hackers here. If the gpl-violations.org crew was still operating, they'd be a better resource. You might find a link somewhere on gnu.org to find somebody that could offer advice... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/e04dcac9/attachment.bin From Jeff.Haran at citrix.com Tue Jul 21 16:13:48 2015 From: Jeff.Haran at citrix.com (Jeff Haran) Date: Tue, 21 Jul 2015 20:13:48 +0000 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API In-Reply-To: References: Message-ID: <4E5779AD88B2F040B8A7E83ECF544D1A6076D9@SJCPEX01CL03.citrite.net> From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies-bounces at kernelnewbies.org] On Behalf Of Lucas Tanure Sent: Tuesday, July 21, 2015 11:49 AM To: Kernelnewbies at kernelnewbies.org Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API Hi, This company released a obfuscated kernel module in GPL 2. http://www.incentivespro.com/downloads.html So, they didn't release the code at all. This is ok ? This against the law ? If you download the source for linux you will se this code: /* * * Copyright (C) 2007-2015 SimplyCore, LLC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * */ #include "usbd.h" #ifdef _USBD_DEBUG_MEMORY_ atomic_t llIlllll=ATOMIC_INIT((0x575+1935-0xd04));atomic_t lIIlIIIll=ATOMIC_INIT ((0xa1d+3263-0x16dc));atomic_t IllIlIlI=ATOMIC_INIT((0x128f+4169-0x22d8)); atomic_t IlIllllI=ATOMIC_INIT((0xf24+561-0x1155)); #ifdef ATOMIC64_INIT atomic64_t llIlIlll=ATOMIC64_INIT((0xeb9+1200-0x1369)); #endif atomic_t IllllIlI=ATOMIC_INIT((0x95+5058-0x1457));atomic_t lIIllllI=ATOMIC_INIT( (0x54+4166-0x109a));atomic_t llIllIlI=ATOMIC_INIT((0x90+8277-0x20e5)); #endif struct lllIl*IIIIlll=NULL; #ifdef _USBD_ENABLE_STUB_ spinlock_t IIIIlII;struct list_head IIIIlIlI; #endif static int lIIIlIII=(0x1b5b+1617-0x21ac);module_param(lIIIlIII,int, ... many lines .... #endif IIIll("\x75\x73\x62\x64\x5f\x65\x78\x69\x74" "\n");}module_init(IlIIllIIl); module_exit(usbd_exit);MODULE_LICENSE("\x47\x50\x4c"); That is just too funny. I haven?t seen that trick done for 40 years, then it was sequences of capital ?O?s and ?0?s in COBOL code. But these guys take it to a new extreme, they are too afraid of their lawyers to even code a literal ?GPL? in the MODULE_LICENSE statement. And then they?ve got silly stuff like this 0x575+1935-0xd04 to hide a 0. That wouldn?t stump a bright 3rd grader. Nice to know this company is paying its developers to concentrate on the important things; one could I suppose make some reasonable conclusions about the resultant product quality. But it seems to me that if it builds, then they?ve released the code. I?ve seen Linux kernel maintainers strip all the comments from patches that have been submitted to them. Hard for me to see much difference here legally. Disclaimer: I?m not a lawyer, so don?t take my word for it. Just my humble, legally uneducated opinion. Jeff Haran -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/1ff52e9c/attachment-0001.html From Valdis.Kletnieks at vt.edu Tue Jul 21 16:27:28 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Tue, 21 Jul 2015 16:27:28 -0400 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API In-Reply-To: Your message of "Tue, 21 Jul 2015 20:13:48 -0000." <4E5779AD88B2F040B8A7E83ECF544D1A6076D9@SJCPEX01CL03.citrite.net> References: <4E5779AD88B2F040B8A7E83ECF544D1A6076D9@SJCPEX01CL03.citrite.net> Message-ID: <12408.1437510448@turing-police.cc.vt.edu> On Tue, 21 Jul 2015 20:13:48 -0000, Jeff Haran said: > But it seems to me that if it builds, then they???ve released the code. No - the GPLv2 says: "The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable." (yadda yadda) So unless the engineers *prefer* the obfuscated form, they really haven't distributed the source code. (IANAL, I'm a code hacker, and all that. All legal advice is worth what you paid for it...) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/e5fff5c1/attachment.bin From clemens.gruber at pqgruber.com Tue Jul 21 17:51:10 2015 From: clemens.gruber at pqgruber.com (Clemens Gruber) Date: Tue, 21 Jul 2015 23:51:10 +0200 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API In-Reply-To: References: Message-ID: <20150721215110.GA867@pqgruber.com> On Tue, Jul 21, 2015 at 03:49:22PM -0300, Lucas Tanure wrote: > Hi, > > This company released a obfuscated kernel module in GPL 2. > http://www.incentivespro.com/downloads.html > > So, they didn't release the code at all. This is ok ? > This against the law ? > > If you download the source for linux you will se this code: > > /* > * > * Copyright (C) 2007-2015 SimplyCore, LLC > * > * This program is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License version 2 as > * published by the Free Software Foundation. > * > * > */ > > #include "usbd.h" > #ifdef _USBD_DEBUG_MEMORY_ > atomic_t llIlllll=ATOMIC_INIT((0x575+1935-0xd04));atomic_t > lIIlIIIll=ATOMIC_INIT > ((0xa1d+3263-0x16dc));atomic_t IllIlIlI=ATOMIC_INIT((0x128f+4169-0x22d8)); > atomic_t IlIllllI=ATOMIC_INIT((0xf24+561-0x1155)); > #ifdef ATOMIC64_INIT > atomic64_t llIlIlll=ATOMIC64_INIT((0xeb9+1200-0x1369)); > #endif > atomic_t IllllIlI=ATOMIC_INIT((0x95+5058-0x1457));atomic_t > lIIllllI=ATOMIC_INIT( > (0x54+4166-0x109a));atomic_t llIllIlI=ATOMIC_INIT((0x90+8277-0x20e5)); > #endif > struct lllIl*IIIIlll=NULL; > #ifdef _USBD_ENABLE_STUB_ > spinlock_t IIIIlII;struct list_head IIIIlIlI; > #endif > static int lIIIlIII=(0x1b5b+1617-0x21ac);module_param(lIIIlIII,int, > ... > many lines > .... > #endif > IIIll("\x75\x73\x62\x64\x5f\x65\x78\x69\x74" "\n");}module_init(IlIIllIIl); > module_exit(usbd_exit);MODULE_LICENSE("\x47\x50\x4c"); > > > -- > Lucas Tanure > +55 (19) 988176559 Hi, I'd contact Mr. Harald Welte, the guy behind gpl-violations.org. Mail: laforge at gnumonks.org Twitter: https://twitter.com/laf0rge Alternatively, you could also try Mr. Christoph Hellwig or Mr. Till Jaeger, the guys who are taking up VMware on their GPL violations at the moment. Regards, Clemens From tanure at linux.com Tue Jul 21 18:35:21 2015 From: tanure at linux.com (Lucas Tanure) Date: Tue, 21 Jul 2015 19:35:21 -0300 Subject: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API In-Reply-To: <20150721215110.GA867@pqgruber.com> References: <20150721215110.GA867@pqgruber.com> Message-ID: Hi Guys, Many thanks. It was just for the sake of curiosity. I know that I should ask lawyers about that, but it's good to hear some view points from other developers. The best action is to simply not use their solution, and spread the word. Like Jeff Haran, That is just too funny. Thanks!! -- Lucas Tanure +55 (19) 988176559 On Tue, Jul 21, 2015 at 6:51 PM, Clemens Gruber wrote: > On Tue, Jul 21, 2015 at 03:49:22PM -0300, Lucas Tanure wrote: > > Hi, > > > > This company released a obfuscated kernel module in GPL 2. > > http://www.incentivespro.com/downloads.html > > > > So, they didn't release the code at all. This is ok ? > > This against the law ? > > > > If you download the source for linux you will se this code: > > > > /* > > * > > * Copyright (C) 2007-2015 SimplyCore, LLC > > * > > * This program is free software; you can redistribute it and/or modify > > * it under the terms of the GNU General Public License version 2 as > > * published by the Free Software Foundation. > > * > > * > > */ > > > > #include "usbd.h" > > #ifdef _USBD_DEBUG_MEMORY_ > > atomic_t llIlllll=ATOMIC_INIT((0x575+1935-0xd04));atomic_t > > lIIlIIIll=ATOMIC_INIT > > ((0xa1d+3263-0x16dc));atomic_t > IllIlIlI=ATOMIC_INIT((0x128f+4169-0x22d8)); > > atomic_t IlIllllI=ATOMIC_INIT((0xf24+561-0x1155)); > > #ifdef ATOMIC64_INIT > > atomic64_t llIlIlll=ATOMIC64_INIT((0xeb9+1200-0x1369)); > > #endif > > atomic_t IllllIlI=ATOMIC_INIT((0x95+5058-0x1457));atomic_t > > lIIllllI=ATOMIC_INIT( > > (0x54+4166-0x109a));atomic_t llIllIlI=ATOMIC_INIT((0x90+8277-0x20e5)); > > #endif > > struct lllIl*IIIIlll=NULL; > > #ifdef _USBD_ENABLE_STUB_ > > spinlock_t IIIIlII;struct list_head IIIIlIlI; > > #endif > > static int lIIIlIII=(0x1b5b+1617-0x21ac);module_param(lIIIlIII,int, > > ... > > many lines > > .... > > #endif > > IIIll("\x75\x73\x62\x64\x5f\x65\x78\x69\x74" > "\n");}module_init(IlIIllIIl); > > module_exit(usbd_exit);MODULE_LICENSE("\x47\x50\x4c"); > > > > > > -- > > Lucas Tanure > > +55 (19) 988176559 > > Hi, > > I'd contact Mr. Harald Welte, the guy behind gpl-violations.org. > Mail: laforge at gnumonks.org > Twitter: https://twitter.com/laf0rge > > Alternatively, you could also try Mr. Christoph Hellwig or Mr. Till Jaeger, > the guys who are taking up VMware on their GPL violations at the moment. > > Regards, > Clemens > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150721/9dcfd419/attachment.html From mulyadi.santosa at gmail.com Wed Jul 22 01:15:08 2015 From: mulyadi.santosa at gmail.com (Mulyadi Santosa) Date: Wed, 22 Jul 2015 12:15:08 +0700 Subject: Fuzzing scheduler CFS In-Reply-To: <1437288817.980771703@f334.i.mail.ru> References: <1437288817.980771703@f334.i.mail.ru> Message-ID: Hi On Sun, Jul 19, 2015 at 1:53 PM, Meyer Lansky wrote: > Hello everyone! > > I decided to take fuzzing task Scheduler CFS > http://lxr.free-electrons.com/source/kernel/sched/fair.c > > Question: I just recently learning fuzzing and it is at all possible fuzzy > scheduler? > > If so then why will advise you start? > Could you clarify: do you mean, you want to apply fuzzy logic into CFS? If yes, then you need to think one thing first: is your planned logic will make the scheduling decision slower or faster? if slower, then probably it is not suitable to be implemented because basic rule of scheduling is that you need to make it as fast as possible. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150722/7c80a463/attachment.html From alexhoppus111 at gmail.com Wed Jul 22 01:38:14 2015 From: alexhoppus111 at gmail.com (Alexander) Date: Wed, 22 Jul 2015 08:38:14 +0300 Subject: Delegating printk work to UART interrupt In-Reply-To: References: <20150718085310.a16cf8673504dc93b9dcbe18@gmail.com> Message-ID: <20150722083814.5ae7dfdacf46af3c9057bf22@gmail.com> Hi Arun KS, Actually, i already saw this one and something similar were tested. I just trying to figure out the reasons why generic kernel layer (console_unlock) implemented in such way: i.e. why it accounts on immediate busyloop printing? Is it reliable to defer such printing to UART interrupts? Thank you. On Mon, 20 Jul 2015 09:34:16 +0530 Arun KS wrote: > Hello Alexander, > > On Sat, Jul 18, 2015 at 11:23 AM, Alexander wrote: > > > > > Hi! > > When i checked how kernel printing works, i mentioned that it takes > > messages > > from log_buffer in console_unlock and gives it to call_console_drivers -> > > ... > > -> some uart bsp function. Basically, as i see this BSP realization tries > > to flush all message chars in busyloop ... so it waits until FIFO_NOT_FULL > > bit will > > be dropped by UART and it will be able to push the next byte. > > Basically, as i see userspace printing do something different. It puts > > N_FIFO_BYTES > > and exits, next, when FIFO will be freed - interrupt will be generated, and > > other characters will be put into UART FIFO. > > Can we do something similar for kernel printing? i.e. do not busyloop > > sending char > > after char, but put N_FIFO chars and flush other in interrupt. When panic > > will occur > > we can do busyloop printing again. Is it reliable? Suppose we have several > > cores. > > Thank you. > > > What about trying this patch, > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/printk/printk.c?id=5874af2003b1aaaa053128d655710140e3187226 > > Its not changing console printing through UART to interrupt mode. But > minimizes the time interrupts being disabled on printk(). > > Thanks, > Arun > > > > > > > -- > > Alexander > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > -- Alexander From getarunks at gmail.com Wed Jul 22 02:14:14 2015 From: getarunks at gmail.com (Arun KS) Date: Wed, 22 Jul 2015 11:44:14 +0530 Subject: Delegating printk work to UART interrupt In-Reply-To: <20150722083814.5ae7dfdacf46af3c9057bf22@gmail.com> References: <20150718085310.a16cf8673504dc93b9dcbe18@gmail.com> <20150722083814.5ae7dfdacf46af3c9057bf22@gmail.com> Message-ID: Hello Alexander, On Wed, Jul 22, 2015 at 11:08 AM, Alexander wrote: > Hi Arun KS, > Actually, i already saw this one and something similar were tested. I just > trying > to figure out the reasons why generic kernel layer (console_unlock) > implemented > in such way: i.e. why it accounts on immediate busyloop printing? Is it > reliable to > defer such printing to UART interrupts? > Lets try to find out why it is done the way it is. My guess is "it makes printk simple and robust". Because if interrupts are blocked, console should not fail giving the critical information. To change this behavior, we have to change the complete logic in the prink code to adjust with that. Because as of now printk code expects serial drivers returns only after finishing the job. Thanks, Arun > > Thank you. > > On Mon, 20 Jul 2015 09:34:16 +0530 > Arun KS wrote: > > > Hello Alexander, > > > > On Sat, Jul 18, 2015 at 11:23 AM, Alexander > wrote: > > > > > > > > Hi! > > > When i checked how kernel printing works, i mentioned that it takes > > > messages > > > from log_buffer in console_unlock and gives it to call_console_drivers > -> > > > ... > > > -> some uart bsp function. Basically, as i see this BSP realization > tries > > > to flush all message chars in busyloop ... so it waits until > FIFO_NOT_FULL > > > bit will > > > be dropped by UART and it will be able to push the next byte. > > > Basically, as i see userspace printing do something different. It puts > > > N_FIFO_BYTES > > > and exits, next, when FIFO will be freed - interrupt will be > generated, and > > > other characters will be put into UART FIFO. > > > Can we do something similar for kernel printing? i.e. do not busyloop > > > sending char > > > after char, but put N_FIFO chars and flush other in interrupt. When > panic > > > will occur > > > we can do busyloop printing again. Is it reliable? Suppose we have > several > > > cores. > > > Thank you. > > > > > What about trying this patch, > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/printk/printk.c?id=5874af2003b1aaaa053128d655710140e3187226 > > > > Its not changing console printing through UART to interrupt mode. But > > minimizes the time interrupts being disabled on printk(). > > > > Thanks, > > Arun > > > > > > > > > > > > -- > > > Alexander > > > > > > _______________________________________________ > > > Kernelnewbies mailing list > > > Kernelnewbies at kernelnewbies.org > > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > > > -- > Alexander > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150722/f051e8ce/attachment-0001.html From markus93 at inbox.ru Wed Jul 22 03:30:47 2015 From: markus93 at inbox.ru (=?UTF-8?B?TWV5ZXIgTGFuc2t5?=) Date: Wed, 22 Jul 2015 10:30:47 +0300 Subject: =?UTF-8?B?RnV6emluZyBzY2hlZHVsZXIgQ0ZT?= Message-ID: <1437550247.217268464@f358.i.mail.ru> I am very interested in finding bugs in such code. In such large projects which method you recommend to seek effective error? I do not necessarily insist on the method of fuzzing, it is one of the options. the answer to your question:?The scheduler ?should work very quickly, and this demonstrates the quality and level of the algorithm. I would like to improve the code, but has not found a practical method of finding errors. Thank you very much for your reply!? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150722/126dea2c/attachment.html From Valdis.Kletnieks at vt.edu Wed Jul 22 06:55:06 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Wed, 22 Jul 2015 06:55:06 -0400 Subject: Fuzzing scheduler CFS In-Reply-To: Your message of "Wed, 22 Jul 2015 10:30:47 +0300." <1437550247.217268464@f358.i.mail.ru> References: <1437550247.217268464@f358.i.mail.ru> Message-ID: <104910.1437562506@turing-police.cc.vt.edu> On Wed, 22 Jul 2015 10:30:47 +0300, Meyer Lansky said: > I would like to improve the code, but has not found a practical method of finding errors. Bugs in the scheduler almost always manifest in one of two ways: 1) Truly spectacular crashes or hangs where you *know* you've found a bug. 2) Find a workload that it performs poorly (for instance - how does it deal on a 4-core system with 8 processes that use enough memory that together, they push the system into thrashing mode, plus 40 or 50 processes that only want millisecond timeslices - but at a high realtime priority? Can you find other mixes that give it indigestion? You're going to have to learn a lot about process scheduling to find bugs in that code. And when I say a lot, I mean "probably as much as you'd cover in a full-semester college course".... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150722/f1fa9344/attachment.bin From ahmedsoliman0x666 at gmail.com Wed Jul 22 10:41:24 2015 From: ahmedsoliman0x666 at gmail.com (Ahmed Soliman) Date: Wed, 22 Jul 2015 16:41:24 +0200 Subject: how to delete kernels cleanly Message-ID: I have many kernels on my machine and I want to delete some of them what can I do some of these kernels are shipped with the OS ubuntu 14.04 and others I built by make oldconfig make all make modules sudo make modules_install sudo make install now how can I these kernels From kirotawa at gmail.com Wed Jul 22 10:46:27 2015 From: kirotawa at gmail.com (leo kirotawa) Date: Wed, 22 Jul 2015 11:46:27 -0300 Subject: how to delete kernels cleanly In-Reply-To: References: Message-ID: I often delete files related to these kernels in /boot/, then grub2-mkconfig -o /boot/grub/grub.cf , but I'm quite sure lib/modules will still remain On Wed, Jul 22, 2015 at 11:41 AM, Ahmed Soliman wrote: > I have many kernels on my machine and I want to delete some of them > what can I do > some of these kernels are shipped with the OS ubuntu 14.04 and others I built by > make oldconfig > make all > make modules > sudo make modules_install > sudo make install > > now how can I these kernels > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- ---------------------------------------------- Le?nidas S. Barbosa (Kirotawa) blog: corecode.wordpress.com From yzli.ksu at gmail.com Wed Jul 22 10:47:42 2015 From: yzli.ksu at gmail.com (Yunzhao li) Date: Wed, 22 Jul 2015 09:47:42 -0500 Subject: Is it possible to reserve a huge page beginning at a fixed physical address Message-ID: Hello, All The hugetlb feature helps to reserve a large amount of memory. I am wondering is there any method that could reserve huge pages beginning at a fixed physical memory? Or, for reserved physical memory via "memmap" boot parameter, is it possible to use hugetlb feature? Thanks! Yunzhao -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150722/ba02088a/attachment.html From mudongliangabcd at gmail.com Wed Jul 22 11:03:05 2015 From: mudongliangabcd at gmail.com (=?UTF-8?B?5oWV5Yas5Lqu?=) Date: Wed, 22 Jul 2015 23:03:05 +0800 Subject: how to delete kernels cleanly In-Reply-To: References: Message-ID: The kernel shipped by ubuntu can be purged by apt-get. It's easy. The kernel you build can be cleaned in this way : 1. clean the corresponding kernel file in /usr/src/ 2. clean the corresponding file in /lib/modules/ 3. update your grub by grub-mkconfig -o /boot/grub/grub.cfg 2015-07-22 22:46 GMT+08:00 leo kirotawa : > I often delete files related to these kernels in /boot/, then > grub2-mkconfig -o /boot/grub/grub.cf , but I'm quite sure lib/modules > will still remain > > On Wed, Jul 22, 2015 at 11:41 AM, Ahmed Soliman > wrote: > > I have many kernels on my machine and I want to delete some of them > > what can I do > > some of these kernels are shipped with the OS ubuntu 14.04 and others I > built by > > make oldconfig > > make all > > make modules > > sudo make modules_install > > sudo make install > > > > now how can I these kernels > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > -- > > ---------------------------------------------- > Le?nidas S. Barbosa (Kirotawa) > blog: corecode.wordpress.com > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150722/933a0d98/attachment.html From ahmedsoliman0x666 at gmail.com Wed Jul 22 11:25:20 2015 From: ahmedsoliman0x666 at gmail.com (Ahmed Soliman) Date: Wed, 22 Jul 2015 17:25:20 +0200 Subject: how to delete kernels cleanly In-Reply-To: References: Message-ID: thanks all of you first I just want to point that nothing is available in /usr/src/ for that specific kernel and I found that the best way to remove a kernel built by me is to remove /boot/vmlinuz*KERNEL-VERSION* /boot/initrd.img*KERNEL-VERSION* /boot/System-map*KERNEL-VERSION* /boot/config-*KERNEL-VERSION* /lib/modules/*KERNEL-VERSION* and after that update-grub2 thanks in advance for your time giving me a clue ^_^ From henry at pericynthion.org Wed Jul 22 17:53:09 2015 From: henry at pericynthion.org (Henry Hallam) Date: Wed, 22 Jul 2015 14:53:09 -0700 Subject: how to delete kernels cleanly In-Reply-To: References: Message-ID: Doesn't help you at the moment, but in the future if you build the kernels (and headers etc) as .deb packages (e.g. via 'make-kpkg') and install them with 'dpkg -i', you can later uninstall them with a single invocation of 'dpkg -r'. Henry From markus93 at inbox.ru Thu Jul 23 01:59:09 2015 From: markus93 at inbox.ru (=?UTF-8?B?TWV5ZXIgTGFuc2t5?=) Date: Thu, 23 Jul 2015 08:59:09 +0300 Subject: =?UTF-8?B?RnV6emluZyBzY2hlZHVsZXIgQ0ZT?= Message-ID: <1437631149.301646608@f159.i.mail.ru> Thank you very much!? I will learn to look for bottlenecks in the program. You sent me to the right path!? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150723/d6b8fa47/attachment.html From amitkgupta09 at gmail.com Thu Jul 23 02:34:38 2015 From: amitkgupta09 at gmail.com (Amit Gupta) Date: Thu, 23 Jul 2015 12:04:38 +0530 Subject: CPU STALL ISSUE Message-ID: Hi All, I am facing one issue with Linux kernel 4.0.4. *CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.4+ #19* This issue i am facing with below mentioned two scenario First Scenario: At the time when I start using PCIe based Atheros wifi card along with my Ethernet controller. If I am using both standalone then I am not facing this issue. (I think this is not hardware related issue as with the same combination of h/w but on different linux kernel version (3.4), I am not facing this issue.) Second Scenario: This issue also repeated if I keep on executing below mentioned command: # hostapd -B /etc/hostapd.conf My main focus is on first scenario. I googled it this issue and found that few people also faced this issue previously on Linux kernel 3.1/3.2/3.3 . Some people are saying that disabling IPv6 support from kernel configuration will resolve this issue but I need IPv6 support in my kernel due to project specific task. By digging out into Linux kernel and observing dump stack log(at the time CPU STALL), I found culprit function 'ieee80211_wake_queues_by_reason'. I go through the series of functions calling by this function, and stuck at one point. I found there are two 'rcu_read_lock();' in sequence. * So my question is can we call rcu_read_lock() function is sequence(two times) and later call rcu_read_unlock() one by one;??* Please look into the pictorial representation of my question: ieee80211_wake_queues_by_reason -- |----> __ieee80211_wake_queue ---> if (skb_queue_empty(&local->pending[queue])) { rcu_read_lock(); ieee80211_propagate_queue_wake(local, queue); rcu_read_unlock(); } ieee80211_propagate_queue_wake(local, queue) | --> netif_wake_subqueue(sdata->dev, ac) | --> rcu_read_lock(); q = rcu_dereference(txq->qdisc); __netif_schedule(q); rcu_read_unlock(); My Approach: I increased RCU stall time from 21 jiffies to 60 jiffies. -- CONFIG_RCU_CPU_STALL_TIMEOUT=21 ++ CONFIG_RCU_CPU_STALL_TIMEOUT=60 But this does not solve my problem. Please suggest me any approach to solve this problem. Thanks, Amit Gupta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150723/1c52c326/attachment.html From amitkgupta09 at gmail.com Thu Jul 23 03:01:18 2015 From: amitkgupta09 at gmail.com (Amit Gupta) Date: Thu, 23 Jul 2015 12:31:18 +0530 Subject: HOSTAPD Error log Message-ID: Hi All, I am executing below mentioned command on linux kernel 4.0.4 and observing below mentioned error log. 'Failed to update rate sets in kernel module'. # hostapd -B /etc/hostapd.conf Configuration file: /etc/hostapd.conf [ 199.672712] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready Failed to update rate sets in kernel module [ 199.687566] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready Using interface wlan0 with hwaddr 00:0e:8e:38:29:e6 and ssid 'test_wifi_2' Eventhough I am getting this error log from user space application(hostapd) code, my wifi device is working fine. But I want to remove this error log and want to know the root cause this error log. Please let me know the approach to solve this issue. Thanks, Amit Gupta -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150723/62aae1b1/attachment.html From Valdis.Kletnieks at vt.edu Thu Jul 23 13:39:31 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Thu, 23 Jul 2015 13:39:31 -0400 Subject: HOSTAPD Error log In-Reply-To: Your message of "Thu, 23 Jul 2015 12:31:18 +0530." References: Message-ID: <12287.1437673171@turing-police.cc.vt.edu> On Thu, 23 Jul 2015 12:31:18 +0530, Amit Gupta said: > Configuration file: /etc/hostapd.conf > [ 199.672712] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready > Failed to update rate sets in kernel module > [ 199.687566] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > Using interface wlan0 with hwaddr 00:0e:8e:38:29:e6 and ssid 'test_wifi_2' > > > Eventhough I am getting this error log from user space application(hostapd) > code, my wifi device is working fine. But I want to remove this error log > and want to know the root cause this error log. My gut reaction is that hostapd is issuing ioctl() calls in the wrong order and/or failing to allow a long enough delay or wait for a specific event. I'd recommend running something like: # strace -f hostapd -B /etc/hostapd.conf > /tmp/strace.out 2>&1 and go look for what failing call was made just before the write call that output 'Failed to update'. Hopefully, tracing the flow of that call will reveal a kernel code path that output the 'link is not ready' message. Then you'll know what 'if (somecondition)' landed you in that situation. Knowing that, it will become a lot easier to figure out what happened. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150723/daaa6b90/attachment.bin From pranjas at gmail.com Fri Jul 24 01:36:10 2015 From: pranjas at gmail.com (Pranay Srivastava) Date: Fri, 24 Jul 2015 11:06:10 +0530 Subject: HOSTAPD Error log In-Reply-To: <12287.1437673171@turing-police.cc.vt.edu> References: <12287.1437673171@turing-police.cc.vt.edu> Message-ID: Hi Amit On Thu, Jul 23, 2015 at 11:09 PM, wrote: > On Thu, 23 Jul 2015 12:31:18 +0530, Amit Gupta said: > >> Configuration file: /etc/hostapd.conf >> [ 199.672712] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready >> Failed to update rate sets in kernel module >> [ 199.687566] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready >> Using interface wlan0 with hwaddr 00:0e:8e:38:29:e6 and ssid 'test_wifi_2' >> >> >> Eventhough I am getting this error log from user space application(hostapd) >> code, my wifi device is working fine. But I want to remove this error log >> and want to know the root cause this error log. > > My gut reaction is that hostapd is issuing ioctl() calls in the wrong order > and/or failing to allow a long enough delay or wait for a specific event. > > I'd recommend running something like: > > # strace -f hostapd -B /etc/hostapd.conf > /tmp/strace.out 2>&1 The driver gets notified of this change via netlink socks. I also face the same issue and so far I found this Hostapd calls --->i802_set_rate_sets which then creates a nlmsg which is handled in driver as --driver-- -->nl80211_set_bss --->rdev_change_bss now change_bss is defined as ieee80211_change_bss (net/mac80211/cfg.c) unless ofcourse your driver provides something else. There seems to be no error from here. So maybe it's the send_recv call in hostapd in function i802_set_rate_sets? I'll look into it more. > > and go look for what failing call was made just before the write call > that output 'Failed to update'. Hopefully, tracing the flow of that > call will reveal a kernel code path that output the 'link is not ready' > message. Then you'll know what 'if (somecondition)' landed you in that > situation. > > Knowing that, it will become a lot easier to figure out what happened. > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- ---P.K.S From navych at 126.com Fri Jul 24 01:49:42 2015 From: navych at 126.com (Navy) Date: Fri, 24 Jul 2015 13:49:42 +0800 Subject: Do you know the bug of EXPORT_SYMBOL() Message-ID: <20150724054941.GA17034@debian> Hi To my understanding, EXPORT_SYMBOL() is used to export a symbol in kernel/modules. The the address of the all sysbols is in /proc/kallsyms. Only symbols exported by EXPORT_SYMBOL() is listed its CRC information in Module.symvers. So I think the CRC is the key to export a symbol. I do an experiment: ---mdir | |---Mod1 | |---mod1.c | |---Makefile | |---Mod2 |---mod2.c |---Makefile mod1.c define function *void myfunc(void)* and exported by EXPORT_SYMBOL() and the CRC info is showed in Module.symvers. mod2.c reference *myfunc* and compiled successfully. BUT when mod2.ko is insmoded, "unknown symbol" is complained. mod2.ko CAN'T BE INSMOD. I solve this problem by the method in Documentation/kbuild/modules.txt and heard this is a bug from kernel 2.6. Why this bug is not be fixed? From pranjas at gmail.com Fri Jul 24 04:18:57 2015 From: pranjas at gmail.com (Pranay Srivastava) Date: Fri, 24 Jul 2015 13:48:57 +0530 Subject: Do you know the bug of EXPORT_SYMBOL() In-Reply-To: <20150724054941.GA17034@debian> References: <20150724054941.GA17034@debian> Message-ID: On Fri, Jul 24, 2015 at 11:19 AM, Navy wrote: > Hi > To my understanding, EXPORT_SYMBOL() is used to export a symbol in > kernel/modules. The the address of the all sysbols is in /proc/kallsyms. > Only symbols exported by EXPORT_SYMBOL() is listed its CRC information > in Module.symvers. So I think the CRC is the key to export a symbol. > I do an experiment: > > ---mdir > | > |---Mod1 > | |---mod1.c > | |---Makefile > | > |---Mod2 > |---mod2.c > |---Makefile > > mod1.c define function *void myfunc(void)* and exported by EXPORT_SYMBOL() > and the CRC info is showed in Module.symvers. mod2.c reference *myfunc* and > compiled successfully. BUT when mod2.ko is insmoded, "unknown symbol" is > complained. mod2.ko CAN'T BE INSMOD. Your Mod1 must be live before you load Mod2. When you load your module, the exported symbols would be present in a separate section in the elf file, you can see that using readelf, something like __ksymtab_. When the module is loaded these symbols are noted so that find_symbol can locate these. When you load a module dependent on those symbols, the load_module function would use the find_symbol to get that symbol. CRC would be checked in check_version after the symbol has been found, even then only if you have CONFIG_MODVERSIONS set in your config. > I solve this problem by the method in Documentation/kbuild/modules.txt and > heard this is a bug from kernel 2.6. > > Why this bug is not be fixed? > It's a long way from 2.6 now. can you send something about this "bug"? > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- ---P.K.S From navych at 126.com Fri Jul 24 08:40:52 2015 From: navych at 126.com (Navy) Date: Fri, 24 Jul 2015 20:40:52 +0800 Subject: Do you know the bug of EXPORT_SYMBOL() In-Reply-To: References: <20150724054941.GA17034@debian> Message-ID: <20150724124051.GA2685@debian> On Fri, Jul 24, 2015 at 01:48:57PM +0530, Pranay Srivastava wrote: > On Fri, Jul 24, 2015 at 11:19 AM, Navy wrote: > > Hi > > To my understanding, EXPORT_SYMBOL() is used to export a symbol in > > > Why this bug is not be fixed? > > > It's a long way from 2.6 now. can you send something about this "bug"? Hi Pranay, The detail is below: https://bugzilla.kernel.org/show_bug.cgi?id=12446#c11 Maybe other people think out-of-tree modules should not be supported. I don't know How do the in-tree modules reference other symbols and be insmod without this problem. If you can help me about this, I will deeply grateful. From tal.shorer at gmail.com Fri Jul 24 10:20:42 2015 From: tal.shorer at gmail.com (Tal Shorer) Date: Fri, 24 Jul 2015 17:20:42 +0300 Subject: Do you know the bug of EXPORT_SYMBOL() In-Reply-To: <20150724124051.GA2685@debian> References: <20150724054941.GA17034@debian> <20150724124051.GA2685@debian> Message-ID: With in-tree modules, the compilation process can determine dependencies and that's why modprobe works with them (insmod doesn't). How do you want the kernel to know where the symbol comes from? Why load your mod1 and not my mod3 that also defines myfunc()? Who's going to call init_module on your mod1? Where in the filesystem should it look for it? On Fri, Jul 24, 2015 at 3:40 PM, Navy wrote: > On Fri, Jul 24, 2015 at 01:48:57PM +0530, Pranay Srivastava wrote: >> On Fri, Jul 24, 2015 at 11:19 AM, Navy wrote: >> > Hi >> > To my understanding, EXPORT_SYMBOL() is used to export a symbol in >> >> > Why this bug is not be fixed? >> > >> It's a long way from 2.6 now. can you send something about this "bug"? > Hi Pranay, > The detail is below: > https://bugzilla.kernel.org/show_bug.cgi?id=12446#c11 > Maybe other people think out-of-tree modules should not be supported. > I don't know How do the in-tree modules reference other symbols and be insmod > without this problem. If you can help me about this, I will deeply grateful. > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From greg at kroah.com Fri Jul 24 13:10:18 2015 From: greg at kroah.com (Greg KH) Date: Fri, 24 Jul 2015 10:10:18 -0700 Subject: Do you know the bug of EXPORT_SYMBOL() In-Reply-To: <20150724054941.GA17034@debian> References: <20150724054941.GA17034@debian> Message-ID: <20150724171018.GA8358@kroah.com> On Fri, Jul 24, 2015 at 01:49:42PM +0800, Navy wrote: > Hi > To my understanding, EXPORT_SYMBOL() is used to export a symbol in > kernel/modules. The the address of the all sysbols is in /proc/kallsyms. > Only symbols exported by EXPORT_SYMBOL() is listed its CRC information > in Module.symvers. So I think the CRC is the key to export a symbol. > I do an experiment: > > ---mdir > | > |---Mod1 > | |---mod1.c > | |---Makefile > | > |---Mod2 > |---mod2.c > |---Makefile > > mod1.c define function *void myfunc(void)* and exported by EXPORT_SYMBOL() > and the CRC info is showed in Module.symvers. mod2.c reference *myfunc* and > compiled successfully. BUT when mod2.ko is insmoded, "unknown symbol" is > complained. mod2.ko CAN'T BE INSMOD. Use 'modprobe' after "properly" installing the kernel modules to the correct location, and then all will be fine. greg k-h From ishubist at gmail.com Fri Jul 24 13:41:09 2015 From: ishubist at gmail.com (Abhishek bist) Date: Fri, 24 Jul 2015 23:11:09 +0530 Subject: Do you know the bug of EXPORT_SYMBOL() In-Reply-To: <20150724054941.GA17034@debian> References: <20150724054941.GA17034@debian> Message-ID: Hi, This is the place where modprobe comes into play .If you have dependent module the on your module then it is recommended to use modprobe . After compiling your module run : 1. depmod -a 2. modprobe mod1 3. modprobe mod2 And as far as i know CONFIG_MODVERSION is basically for the module signature according to which you can't directly insert a .ko file compiled in another system. On 24 July 2015 at 11:19, Navy wrote: > Hi > To my understanding, EXPORT_SYMBOL() is used to export a symbol in > kernel/modules. The the address of the all sysbols is in /proc/kallsyms. > Only symbols exported by EXPORT_SYMBOL() is listed its CRC information > in Module.symvers. So I think the CRC is the key to export a symbol. > I do an experiment: > > ---mdir > | > |---Mod1 > | |---mod1.c > | |---Makefile > | > |---Mod2 > |---mod2.c > |---Makefile > > mod1.c define function *void myfunc(void)* and exported by EXPORT_SYMBOL() > and the CRC info is showed in Module.symvers. mod2.c reference *myfunc* and > compiled successfully. BUT when mod2.ko is insmoded, "unknown symbol" is > complained. mod2.ko CAN'T BE INSMOD. > I solve this problem by the method in Documentation/kbuild/modules.txt and > heard this is a bug from kernel 2.6. > > Why this bug is not be fixed? > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150724/6bd56661/attachment.html From ahmedsoliman0x666 at gmail.com Fri Jul 24 15:20:48 2015 From: ahmedsoliman0x666 at gmail.com (Ahmed Soliman) Date: Fri, 24 Jul 2015 21:20:48 +0200 Subject: I dont know where to start Message-ID: hi first of all I want to thank you with your real help but currently I started to get lost I can build my own kernel write patches but cannot contribute to the linux kernel because I don't know where to start learning I am really interested in the linux security module (although I know nothing about it ) but I always loved computer security and reverse engineering I started by searching for TODO as was referred by Konrad Zapa?owicz here and I found this one TODO: add support for apparmorfs_null and apparmorfs_mnt in linux/security/apparmor.c my first reaction was to look at the header files included and try to understand what was this C file supposed to do and before I even try to understand what is apparmorfs_null and apparmorfs_mnt but I found really large number of dependencies that would take ages to read and understand and each dependency have its own dependency !! at that moment I started to feel that I am doing something wrong and I am not following the right approach so what do you suggest ? From greg at kroah.com Fri Jul 24 15:48:22 2015 From: greg at kroah.com (Greg KH) Date: Fri, 24 Jul 2015 12:48:22 -0700 Subject: I dont know where to start In-Reply-To: References: Message-ID: <20150724194822.GB21913@kroah.com> On Fri, Jul 24, 2015 at 09:20:48PM +0200, Ahmed Soliman wrote: > hi > first of all I want to thank you with your real help but > currently I started to get lost > I can build my own kernel write patches but cannot contribute to the > linux kernel > because I don't know where to start learning > I am really interested in the linux security module (although I know > nothing about it ) but I always loved computer security and reverse > engineering > I started by searching for TODO as was referred by Konrad Zapa?owicz > here > and I found this one > TODO: add support for apparmorfs_null and apparmorfs_mnt > in linux/security/apparmor.c > my first reaction was to look at the header files included and try to > understand what was this C file supposed to do and before I even try > to understand what is apparmorfs_null and apparmorfs_mnt but I found > really large number of dependencies that would take ages to read and > understand and each dependency have its own dependency !! > at that moment I started to feel that I am doing something wrong and I > am not following the right approach so what do you suggest ? That is correct, it's a lot of dependencies and knowledge to try to add new security module features, you are on the right track, this is not an easy task. good luck! greg k-h From laurent.navet at gmail.com Fri Jul 24 15:51:00 2015 From: laurent.navet at gmail.com (Laurent Navet) Date: Fri, 24 Jul 2015 21:51:00 +0200 Subject: I dont know where to start In-Reply-To: References: Message-ID: To start learning how to contribute, Just one keyword : eudyptula Good luck, 2015-07-24 21:20 UTC+02:00, Ahmed Soliman : > hi > first of all I want to thank you with your real help but > currently I started to get lost > I can build my own kernel write patches but cannot contribute to the > linux kernel > because I don't know where to start learning > I am really interested in the linux security module (although I know > nothing about it ) but I always loved computer security and reverse > engineering > I started by searching for TODO as was referred by Konrad Zapa?owicz > here > > and I found this one > TODO: add support for apparmorfs_null and apparmorfs_mnt > in linux/security/apparmor.c > my first reaction was to look at the header files included and try to > understand what was this C file supposed to do and before I even try > to understand what is apparmorfs_null and apparmorfs_mnt but I found > really large number of dependencies that would take ages to read and > understand and each dependency have its own dependency !! > at that moment I started to feel that I am doing something wrong and I > am not following the right approach so what do you suggest ? > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- ? On ne r?sout pas un probl?me avec les modes de pens?e qui l?ont engendr?. ? ? You cannot solve current problems with current thinking. Current problems are the result of current thinking ? From jim.epost at gmail.com Fri Jul 24 17:42:11 2015 From: jim.epost at gmail.com (Jim Davis) Date: Fri, 24 Jul 2015 14:42:11 -0700 Subject: how to build Documentation/DocBook/ In-Reply-To: References: Message-ID: On Fri, Jul 17, 2015 at 6:18 AM, Luis de Bethencourt wrote: > > On 17 July 2015 at 13:40, Ahmed Soliman wrote: >> >> I have fresh kernel downloaded by git and I want to know how to build >> Documentation/DocBook/ as pdf I have tried >> make pdfdocs >output >> but I got those warnings >> Warning(.//include/linux/init.h): no structured comments found >> Warning(.//kernel/sys.c): no structured comments found >> Warning(.//drivers/dma-buf/seqno-fence.c): no structured comments found >> Warning(.//drivers/dma-buf/reservation.c): no structured comments found >> Warning(.//include/linux/reservation.h): no structured comments found >> Warning(.//include/linux/hsi/hsi.h:150): Excess >> struct/union/enum/typedef member 'e_handler' description in >> 'hsi_client' >> Warning(.//include/linux/hsi/hsi.h:150): Excess >> struct/union/enum/typedef member 'pclaimed' description in >> 'hsi_client' >> Warning(.//include/linux/hsi/hsi.h:150): Excess >> struct/union/enum/typedef member 'nb' description in 'hsi_client' >> make[1]: *** [Documentation/DocBook/kernel-hacking.pdf] Error 9 >> make: *** [pdfdocs] Error 2 >> >> and the file output look like this >> > > Which Kernel version are you using? It looks like your error has been fixed > by: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9e39dc1e563e8d390bae42ee80e1e665c18b7de2 > > Unfortunately. make pdfdocs fails when building DocBook/scsi.pdf in the > latest stable release (4.1.2) I've been trying to run make pdfdocs with the 4.2-rc3 tree, on Arch Linux, Fedora 22, and Ubuntu 15.04. A plain 'make pdfdocs' fails on all of them. For Arch and Fedora, I've gotten a little further by installing dblatex (which isn't a default package) and running the ungainly command make POSTARGS='--verbose --debug' POSTPOSTARGS='--verbose --debug' XMLTOFLAGS='-vv -m Documentation/DocBook/stylesheet.xsl --skip-validation --with-dblatex' pdfdocs but while that chugged through several books, it failed with pdflatex -interaction=batchmode filesystems.tex pdflatex failed filesystems.tex:9322: Paragraph ended before \@citex was complete. filesystems.tex:9325: Too many }'s. filesystems.tex:9325: leading text: } filesystems.tex:9328: Paragraph ended before \@citex was complete. filesystems.tex:9331: Too many }'s. filesystems.tex:9331: leading text: } and examining the generated TeX file, it does look like a paragraph problem: \label{see_also}\hyperlabel{see_also}% \cite{ Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen T$ } \cite{ Ext3 Journalling FileSystem, OLS 2000, Dr. Stephen Tweedie } After fiddling with Documentation/DocBook/filesystems.tmpl to squish some newlines, diff --git a/Documentation/DocBook/filesystems.tmpl b/Documentation/DocBook/filesystems.tmpl index bcdfdb9a92770..44a0afe5bfb72 100644 --- a/Documentation/DocBook/filesystems.tmpl +++ b/Documentation/DocBook/filesystems.tmpl @@ -385,18 +385,12 @@ an example. See also - - - Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie - - + + Journaling the Linux ext2fs Filesystem, LinuxExpo 98, Stephen Tweedie - - - Ext3 Journalling FileSystem, OLS 2000, Dr. Stephen Tweedie - - + + Ext3 Journalling FileSystem, OLS 2000, Dr. Stephen Tweedie filesystems.pdf built, but... pdflatex -interaction=batchmode drm.tex pdflatex failed drm.tex:18707: Illegal unit of measure (pt inserted). drm.tex:18707: leading text: \setlength{\tabcolsep}{0} drm.tex:18710: Package array Error: Empty preamble: `l' used. drm.tex:18710: leading text: \begin{tabular}{} so again there's some sort of bogus TeX being generated, and this time I didn't see an obvious fix. Jim From gnognoleba at gmail.com Sat Jul 25 00:07:15 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Sat, 25 Jul 2015 04:07:15 +0000 Subject: kernel/git/torvalds/linux.git - Linux kernel source tree Message-ID: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/ Hi ! This is a great link for a lot of information. Thank you for this job. All of us would like to learn again and again can you give us the link which explain this organisation ? The vocabulary used ? The legend ? Understand to look for the right info in the right place ! Luis the appetit comes in eating to you know ? Friendly Best regards GNOGBO -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150725/d71c5860/attachment-0001.html From ahmedsoliman0x666 at gmail.com Sat Jul 25 15:50:30 2015 From: ahmedsoliman0x666 at gmail.com (Ahmed Soliman) Date: Sat, 25 Jul 2015 21:50:30 +0200 Subject: Please do not generate patches purely based on checkpatch. Message-ID: I have sent a patch for cleaning about 40 error and 50 warning generated checkpatch to the maintainer and all what I got in responce is "Nack. Please do not generate patches purely based on checkpatch." so what did I do wrong ?! should I follow checkpatch or not ?? From greg.freemyer at gmail.com Sat Jul 25 16:49:32 2015 From: greg.freemyer at gmail.com (greg.freemyer at gmail.com) Date: Sat, 25 Jul 2015 16:49:32 -0400 Subject: Please do not generate patches purely based on checkpatch. In-Reply-To: References: Message-ID: On July 25, 2015 3:50:30 PM EDT, Ahmed Soliman wrote: >I have sent a patch for cleaning about 40 error and 50 warning >generated checkpatch to the maintainer and all what I got in responce >is "Nack. Please do not generate patches purely based on checkpatch." >so what did I do wrong ?! should I follow checkpatch or not ?? > If you want to practice the submission process the staging tree maintainer accepts checkpatch only fixes as patches. Most maintainers feel the cost of accepting the and breaking other people's pending patches is too expensive. Alternatively, if there are no pending patches then they will likely feel the code is stable so why risk a change for no real reason. On the other hand if you submit a patch that addresses a real bug, then simultaneously doing a checkpatch related patch to the same area is a very good idea. Greg -- Sent from my Android device with K-9 Mail. Please excuse my brevity. From greg at kroah.com Sat Jul 25 18:12:20 2015 From: greg at kroah.com (Greg KH) Date: Sat, 25 Jul 2015 15:12:20 -0700 Subject: Please do not generate patches purely based on checkpatch. In-Reply-To: References: Message-ID: <20150725221220.GA23301@kroah.com> On Sat, Jul 25, 2015 at 04:49:32PM -0400, greg.freemyer at gmail.com wrote: > On the other hand if you submit a patch that addresses a real bug, > then simultaneously doing a checkpatch related patch to the same area > is a very good idea. No, that would be two different things. Do the bug fix first, and then the cleanup on a different patch. And even then, most maintainers will not take a cleanup patch. Stick with subsystems that do take these types of fixes if you want/like to do them (i.e. drivers/staging/*) thanks, greg k-h From mr.yogesh at gmail.com Sun Jul 26 03:35:37 2015 From: mr.yogesh at gmail.com (Yogesh Chaudhari) Date: Sun, 26 Jul 2015 13:05:37 +0530 Subject: Please do not generate patches purely based on checkpatch. In-Reply-To: <20150725221220.GA23301@kroah.com> References: <20150725221220.GA23301@kroah.com> Message-ID: On 26 July 2015 at 03:42, Greg KH wrote: > No, that would be two different things. Do the bug fix first, and then > the cleanup on a different patch. And even then, most maintainers will > not take a cleanup patch. Stick with subsystems that do take these > types of fixes if you want/like to do them (i.e. drivers/staging/*) I have come to know that Greg is one of the most liberal maintainers in this regard and accepts checkpatch related patches, but other than that, it seems to depend on maintainer's choice (which is fine IMHO). However, is there a place which documents which maintainers(and/or sub-systems) accept checkpatch(or other cleanup related) patches and who will reject them outright? Wouldn't it be good to have this documented, especially given that using the checkpatch is advised in Documentation/SubmitChecklist? Thanks Yogesh From ayankumarh at gmail.com Sun Jul 26 07:32:03 2015 From: ayankumarh at gmail.com (AYAN KUMAR HALDER) Date: Sun, 26 Jul 2015 17:02:03 +0530 Subject: Data inconsistency observed while performing to-device DMA with spi-nor (m25p80) Message-ID: Hi, I am doing a DMA transfer (to device) using pl330 driver from memory(DDR) to device(m25p80, spi- nor). I am sending data in chunks of 256 bytes ( m25p80 - writesize) using scatter-gather mechanism. I see that when I try to write 8K of data, one or the other 256 bytes(or lesser) are not written or are partially written with 0s. This problem is observed only when I perform a to-device DMA transfer. When I perform a from-device DMA transfer, I am able to read correct data. Regards, Ayan Kumar Halder From greg at kroah.com Sun Jul 26 13:45:08 2015 From: greg at kroah.com (Greg KH) Date: Sun, 26 Jul 2015 10:45:08 -0700 Subject: Please do not generate patches purely based on checkpatch. In-Reply-To: References: <20150725221220.GA23301@kroah.com> Message-ID: <20150726174508.GA15843@kroah.com> On Sun, Jul 26, 2015 at 01:05:37PM +0530, Yogesh Chaudhari wrote: > On 26 July 2015 at 03:42, Greg KH wrote: > > > No, that would be two different things. Do the bug fix first, and then > > the cleanup on a different patch. And even then, most maintainers will > > not take a cleanup patch. Stick with subsystems that do take these > > types of fixes if you want/like to do them (i.e. drivers/staging/*) > > I have come to know that Greg is one of the most liberal maintainers > in this regard and accepts checkpatch related patches, but other than > that, it seems to depend on maintainer's choice (which is fine IMHO). > However, is there a place which documents which maintainers(and/or > sub-systems) accept checkpatch(or other cleanup related) patches and > who will reject them outright? Wouldn't it be good to have this > documented, especially given that using the checkpatch is advised in > Documentation/SubmitChecklist? checkpatch is required for when you submit new patches, cleaning up existing code using checkpatch is not a good idea unless you are sending patches in for drivers/staging/* So never use the --file option, unless you know for sure that the maintainer accepts such patches. And if you don't know the answer to that, assume that they do not :) thanks, greg k-h From gregkh at linuxfoundation.org Sun Jul 26 13:51:58 2015 From: gregkh at linuxfoundation.org (Greg KH) Date: Sun, 26 Jul 2015 10:51:58 -0700 Subject: [PATCH 2/2] drivers: staging : media : davinci_vpfe : dma365_resizer.c drivers: staging : media : davinci_vpfe : dma365_resizer.h In-Reply-To: <1437888808-5622-1-git-send-email-bhaaradwaaj@gmail.com> References: <1437888808-5622-1-git-send-email-bhaaradwaaj@gmail.com> Message-ID: <20150726175158.GA16245@kroah.com> On Sun, Jul 26, 2015 at 11:03:28AM +0530, Bharadwaaj wrote: > From: "bhaaradwaaj at gmail.com" This has to match the string you use in the signed-off-by: line. > > Fixed some spelling mistake. > > Signed-off-by: Bharadwaaj Ramakrishnan Please add a ' ' before the '<' character. From gregkh at linuxfoundation.org Sun Jul 26 13:52:26 2015 From: gregkh at linuxfoundation.org (Greg KH) Date: Sun, 26 Jul 2015 10:52:26 -0700 Subject: [PATCH] drivers: staging: lustre: lnet: klnds: o2iblnd: o2iblnd.c In-Reply-To: <1437888557-5087-1-git-send-email-bhaaradwaaj@gmail.com> References: <1437888557-5087-1-git-send-email-bhaaradwaaj@gmail.com> Message-ID: <20150726175226.GB16245@kroah.com> On Sun, Jul 26, 2015 at 10:59:17AM +0530, Bharadwaaj wrote: > From: "bhaaradwaaj at gmail.com" Again, this has to match. Your subject alsh needs to say what you are doing, not just what file you are modifying. From Valdis.Kletnieks at vt.edu Sun Jul 26 15:32:11 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Sun, 26 Jul 2015 15:32:11 -0400 Subject: Please do not generate patches purely based on checkpatch. In-Reply-To: Your message of "Sun, 26 Jul 2015 13:05:37 +0530." References: <20150725221220.GA23301@kroah.com> Message-ID: <175786.1437939131@turing-police.cc.vt.edu> On Sun, 26 Jul 2015 13:05:37 +0530, Yogesh Chaudhari said: > However, is there a place which documents which maintainers(and/or > sub-systems) accept checkpatch(or other cleanup related) patches and > who will reject them outright? Wouldn't it be good to have this > documented, especially given that using the checkpatch is advised in > Documentation/SubmitChecklist? Try something like 'git log drivers/net/wireless/whateverdev' (or whatever part of the tree you're looking at, and see if there have been previous checkpatch fixes in that part of the tree. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150726/4bd9f07b/attachment.bin From mr.yogesh at gmail.com Sun Jul 26 16:08:35 2015 From: mr.yogesh at gmail.com (Yogesh Chaudhari) Date: Sun, 26 Jul 2015 20:08:35 +0000 Subject: Please do not generate patches purely based on checkpatch. In-Reply-To: <175786.1437939131@turing-police.cc.vt.edu> References: <20150725221220.GA23301@kroah.com> <175786.1437939131@turing-police.cc.vt.edu> Message-ID: Thanks Valdis. Seems like a d'oh moment now. Never thought of scanning through the git history for checkpatch . Good tip. Thanks and regards Yogesh On Mon, Jul 27, 2015 at 1:02 AM wrote: > On Sun, 26 Jul 2015 13:05:37 +0530, Yogesh Chaudhari said: > > > However, is there a place which documents which maintainers(and/or > > sub-systems) accept checkpatch(or other cleanup related) patches and > > who will reject them outright? Wouldn't it be good to have this > > documented, especially given that using the checkpatch is advised in > > Documentation/SubmitChecklist? > > Try something like 'git log drivers/net/wireless/whateverdev' (or > whatever part of the tree you're looking at, and see if there have been > previous checkpatch fixes in that part of the tree. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150726/6df2c72a/attachment.html From chetannanda at gmail.com Sun Jul 26 23:58:55 2015 From: chetannanda at gmail.com (Chetan Nanda) Date: Mon, 27 Jul 2015 09:28:55 +0530 Subject: Data inconsistency observed while performing to-device DMA with spi-nor (m25p80) In-Reply-To: References: Message-ID: On Sun, Jul 26, 2015 at 5:02 PM, AYAN KUMAR HALDER wrote: > Hi, > > I am doing a DMA transfer (to device) using pl330 driver from > memory(DDR) to device(m25p80, spi- nor). I am sending data in chunks > of 256 bytes ( m25p80 - writesize) using scatter-gather mechanism. > > I see that when I try to write 8K of data, one or the other 256 > bytes(or lesser) are not written or are partially written with 0s. > > This problem is observed only when I perform a to-device DMA transfer. > When I perform a from-device DMA transfer, I am able to read correct > data. > > There could be multiple issues like - In buffers allocations, is the buffer used for to-device DMA is physically contiguous? - Caching issue, buffer should be un-cacheable. - Any other programming error. - Chetan Nanda Regards, > Ayan Kumar Halder > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150727/e6f56c0b/attachment.html From navych at 126.com Mon Jul 27 02:38:49 2015 From: navych at 126.com (Navy Cheng) Date: Mon, 27 Jul 2015 14:38:49 +0800 Subject: How can I send multiple unrelated patches? Message-ID: <20150727063849.GA11993@debian> Hi, I know multiple related patches should be sent like this: Subject: [Patch 1/10] ... Subject: [Patch 2/10] ... . . . Subject: [Patch 10/10] ... How about the unrelated patches? How can I show the order of the unrelated patches? From kristof at sigsegv.be Mon Jul 27 04:21:55 2015 From: kristof at sigsegv.be (Kristof Provost) Date: Mon, 27 Jul 2015 10:21:55 +0200 Subject: How can I send multiple unrelated patches? In-Reply-To: <20150727063849.GA11993@debian> References: <20150727063849.GA11993@debian> Message-ID: <20150727082155.GD2484@vega.codepro.be> On 2015-07-27 14:38:49 (+0800), Navy Cheng wrote: > How about the unrelated patches? How can I show the order of the unrelated > patches? > If the patches are unrelated I wouldn't expect the order to matter, so just '[PATCH] Fix foo in bar' and '[PATCH] Prettify baz' should be fine. If the order does matter (i.e. patch B requires patch A to be applied before it can be applied) they're not really unrelated. Regards, Kristof From wkevils at gmail.com Tue Jul 28 10:46:31 2015 From: wkevils at gmail.com (Kevin Wilson) Date: Tue, 28 Jul 2015 17:46:31 +0300 Subject: bitops for handling 32 bits Message-ID: Hi all, Is there a kernel API for handling 32 bits ? I see a macro like BIT(nr) http://lxr.free-electrons.com/source/include/linux/bitops.h#L6 #define BIT(nr) (1UL << (nr)) and also #define BIT_ULL(nr) (1ULL << (nr)) However, these macros are using 64 bit semantics, so if I will use them with 32 bits values the results will be wrong. Any ideas ? Regards, Kevin From mnm.kernel at gmail.com Tue Jul 28 11:10:11 2015 From: mnm.kernel at gmail.com (Manavendra Nath Manav) Date: Tue, 28 Jul 2015 15:10:11 +0000 Subject: bitops for handling 32 bits In-Reply-To: References: Message-ID: On Tue 28 Jul, 2015 20:24 Kevin Wilson wrote: > Hi all, > Is there a kernel API for handling 32 bits ? > I see a macro like BIT(nr) > http://lxr.free-electrons.com/source/include/linux/bitops.h#L6 > > #define BIT(nr) (1UL << (nr)) > > and also > #define BIT_ULL(nr) (1ULL << (nr)) > > However, these macros are using 64 bit semantics, so if I will use > them with 32 bits values > the results will be wrong. > > Any ideas ? > > Regards, > Kevin > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > The macros don't do type checking so it will work for both 32-bit and 64-bit. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150728/21a5b5ed/attachment.html From ahmedsoliman0x666 at gmail.com Tue Jul 28 12:03:16 2015 From: ahmedsoliman0x666 at gmail.com (Ahmed Soliman) Date: Tue, 28 Jul 2015 18:03:16 +0200 Subject: how can I find where is the macro or function deifined Message-ID: Hi; when I used libc I never memorized where each function is located beyond the basics (for example I never knew if strlen is in string.h or ctype.h or strlib.h ) I just check out the functions man pages by man strlen is their such functionality for the kernel where I dont need to memorize the dependencies for example if MODULE_LICENSE is in kernel.h or module.h with out using the internel to google them . From mnm.kernel at gmail.com Tue Jul 28 12:37:08 2015 From: mnm.kernel at gmail.com (Manavendra Nath Manav) Date: Tue, 28 Jul 2015 16:37:08 +0000 Subject: how can I find where is the macro or function deifined In-Reply-To: References: Message-ID: On Tue 28 Jul, 2015 21:41 Ahmed Soliman wrote: Hi; when I used libc I never memorized where each function is located beyond the basics (for example I never knew if strlen is in string.h or ctype.h or strlib.h ) I just check out the functions man pages by man strlen is their such functionality for the kernel where I dont need to memorize the dependencies for example if MODULE_LICENSE is in kernel.h or module.h with out using the internel to google them . ______________________________________________ You can use cscope and/or ctags to jump directly to the symbol definition. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150728/16f84c78/attachment.html From navych at 126.com Tue Jul 28 13:41:34 2015 From: navych at 126.com (Navy Cheng) Date: Wed, 29 Jul 2015 01:41:34 +0800 Subject: how can I find where is the macro or function deifined In-Reply-To: References: Message-ID: <20150728174134.GB2384@debian> On Tue, Jul 28, 2015 at 06:03:16PM +0200, Ahmed Soliman wrote: > Hi; > when I used libc I never memorized where each function is located > beyond the basics (for example I never knew if strlen is in string.h > or ctype.h or strlib.h ) > I just check out the functions man pages by man strlen > is their such functionality for the kernel where I dont need to > memorize the dependencies for example if MODULE_LICENSE is in kernel.h > or module.h with out using the internel to google them . > *make tags* in the root directory of the kernel tree. Then a file named TAGS is created. TAGS is treated as one part of the tree when *git status*. You can load it with Vim or emacs. Google it for details. From amitkgupta09 at gmail.com Tue Jul 28 14:15:40 2015 From: amitkgupta09 at gmail.com (Amit Gupta) Date: Tue, 28 Jul 2015 23:45:40 +0530 Subject: HOSTAPD Error log In-Reply-To: References: <12287.1437673171@turing-police.cc.vt.edu> Message-ID: Hi All, Thanks for your quick response. Valdis, I tried with strace stuff, but I faced CPU halt issue. Actually along with those error logs..sometime I m facing CPU HALT issue after executing #hostapd -B /etc/hostapd.conf. Pranay, I tried your way to debug kernel for finding the root cause of error log 'Failed to update rate sets in kernel module'. But prior to that I started to debugging for IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready those two logs. Till now I found that before execution of __dev_open(net/core/dev,c) function for 'wlan0' network interface, 'netif_carrier_off'(net/sched/sch_generic.c) function get called for 'wlan0', void netif_carrier_off (struct net_device *dev ) { if (!test_and_set_bit (__LINK_STATE_NOCARRIER, &dev ->state )) { if (dev ->reg_state == NETREG_UNINITIALIZED) return; atomic_inc (&dev ->carrier_changes); linkwatch_fire_event (dev ); } } which result into condition checking passed in 'addrconf_qdisc_ok '* function.* In 'net/ipv6/addrconf.c' file if (event == NETDEV_UP ) { if (!addrconf_qdisc_ok (dev )) { */* device is not ready yet. */* pr_info (*"ADDRCONF(NETDEV_UP): %s: link is not ready\n"*, dev ->name ); break; } in same file: static inline bool addrconf_qdisc_ok (const struct net_device *dev ) { return !qdisc_tx_is_noop (dev ); } In include/net/sch_generic.h file static inline bool qdisc_tx_is_noop (const struct net_device *dev ) { unsigned int i ; for (i = 0; i < dev ->num_tx_queues; i ++) { struct netdev_queue *txq = netdev_get_tx_queue (dev , i ); if (rcu_access_pointer (txq->qdisc) != &noop_qdisc ) return false ; } return true ; } I am still looking to find the cause execution of net_carrier_off function before execution of __dev_open function for 'wlan0' network interface. This behavior I am not observing with my other wired and pseudo network interfaces. 'Failed to update rate sets in kernel module' This error log may come because of previous issue as wlan0 device is not active till this point. One more thing I tried, I cross compiled 'hostapd' version 2.4 for my target board and executed that on target board.I did not get above mentioned error log and till now no CPU halt issue. Previously i was working with hostapd 0.7.3. So is it like, hostapd old version is not compatible with new linux kernel version as hostapd 0.7.3 version is running with no issue at linux 3.4. Any advice and suggestions will be appreciable/helpful. Thanks, Amit Gupta On Fri, Jul 24, 2015 at 11:06 AM, Pranay Srivastava wrote: > Hi Amit > > On Thu, Jul 23, 2015 at 11:09 PM, wrote: > > On Thu, 23 Jul 2015 12:31:18 +0530, Amit Gupta said: > > > >> Configuration file: /etc/hostapd.conf > >> [ 199.672712] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready > >> Failed to update rate sets in kernel module > >> [ 199.687566] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > >> Using interface wlan0 with hwaddr 00:0e:8e:38:29:e6 and ssid > 'test_wifi_2' > >> > >> > >> Eventhough I am getting this error log from user space > application(hostapd) > >> code, my wifi device is working fine. But I want to remove this error > log > >> and want to know the root cause this error log. > > > > My gut reaction is that hostapd is issuing ioctl() calls in the wrong > order > > and/or failing to allow a long enough delay or wait for a specific event. > > > > I'd recommend running something like: > > > > # strace -f hostapd -B /etc/hostapd.conf > /tmp/strace.out 2>&1 > > The driver gets notified of this change via netlink socks. I also face > the same issue and so far I found this > > Hostapd calls > --->i802_set_rate_sets > > which then creates a nlmsg which is handled in driver as > > --driver-- > -->nl80211_set_bss > --->rdev_change_bss > > now change_bss is defined as > > ieee80211_change_bss (net/mac80211/cfg.c) unless ofcourse your driver > provides something else. > > There seems to be no error from here. > > So maybe it's the send_recv call in hostapd in function > i802_set_rate_sets? I'll look into it more. > > > > > and go look for what failing call was made just before the write call > > that output 'Failed to update'. Hopefully, tracing the flow of that > > call will reveal a kernel code path that output the 'link is not ready' > > message. Then you'll know what 'if (somecondition)' landed you in that > > situation. > > > > Knowing that, it will become a lot easier to figure out what happened. > > > > _______________________________________________ > > Kernelnewbies mailing list > > Kernelnewbies at kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > > > -- > ---P.K.S > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150728/44af6dde/attachment-0001.html From anish198519851985 at gmail.com Tue Jul 28 14:40:49 2015 From: anish198519851985 at gmail.com (Anish Kumar) Date: Wed, 29 Jul 2015 02:40:49 +0800 Subject: bitops for handling 32 bits In-Reply-To: References: Message-ID: <62BD94E8-6A2B-4708-A29F-7073E36850BC@gmail.com> > On Jul 28, 2015, at 10:46 PM, Kevin Wilson wrote: > > Hi all, > Is there a kernel API for handling 32 bits ? > I see a macro like BIT(nr) > http://lxr.free-electrons.com/source/include/linux/bitops.h#L6 > > #define BIT(nr) (1UL << (nr)) > > and also > #define BIT_ULL(nr) (1ULL << (nr)) > > However, these macros are using 64 bit semantics, so if I will use > them with 32 bits values > the results will be wrong. Did you try using it? The code is generic. > > Any ideas ? > > Regards, > Kevin > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From gnognoleba at gmail.com Tue Jul 28 19:54:36 2015 From: gnognoleba at gmail.com (Gnoleba GNOGBO) Date: Tue, 28 Jul 2015 23:54:36 +0000 Subject: how can I find where is the macro or function deifined In-Reply-To: <20150728174134.GB2384@debian> References: <20150728174134.GB2384@debian> Message-ID: Can you give a procedure step by step please to answer please ? B. Regards Gnogbo Le 28 juil. 2015 17:41, "Navy Cheng" a ?crit : > On Tue, Jul 28, 2015 at 06:03:16PM +0200, Ahmed Soliman wrote: > > Hi; > > when I used libc I never memorized where each function is located > > beyond the basics (for example I never knew if strlen is in string.h > > or ctype.h or strlib.h ) > > I just check out the functions man pages by man strlen > > is their such functionality for the kernel where I dont need to > > memorize the dependencies for example if MODULE_LICENSE is in kernel.h > > or module.h with out using the internel to google them . > > > *make tags* in the root directory of the kernel tree. Then a file named > TAGS > is created. TAGS is treated as one part of the tree when *git status*. You > can load it with Vim or emacs. Google it for details. > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150728/9157b308/attachment.html From Valdis.Kletnieks at vt.edu Tue Jul 28 20:25:04 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Tue, 28 Jul 2015 20:25:04 -0400 Subject: how can I find where is the macro or function deifined In-Reply-To: Your message of "Tue, 28 Jul 2015 23:54:36 -0000." References: <20150728174134.GB2384@debian> Message-ID: <49097.1438129504@turing-police.cc.vt.edu> On Tue, 28 Jul 2015 23:54:36 -0000, Gnoleba GNOGBO said: > Can you give a procedure step by step please to answer please ? http://www.lmgtfy.com/?q=ctags+vim+tutorial http://www.lmgtfy.com/?q=ctags+emacs+tutorial -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150728/6da2deb3/attachment.bin From iurobpn at gmail.com Tue Jul 28 21:14:24 2015 From: iurobpn at gmail.com (Iuro Nascimento) Date: Tue, 28 Jul 2015 22:14:24 -0300 Subject: how can I find where is the macro or function deifined In-Reply-To: References: Message-ID: <20150729011424.GA7292@gagarin-desktop.lan> Hi, git grep is very usefull to find stuff in the kernel tree. You can find macros using: git grep -n '#define list_entry(' to find file and line number of the macro list_entry. Regards, Iuro Nascimento On Tue, Jul 28, 2015 at 06:03:16PM +0200, Ahmed Soliman wrote: > Hi; > when I used libc I never memorized where each function is located > beyond the basics (for example I never knew if strlen is in string.h > or ctype.h or strlib.h ) > I just check out the functions man pages by man strlen > is their such functionality for the kernel where I dont need to > memorize the dependencies for example if MODULE_LICENSE is in kernel.h > or module.h with out using the internel to google them . > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From navych at 126.com Tue Jul 28 22:54:46 2015 From: navych at 126.com (Navy Cheng) Date: Wed, 29 Jul 2015 10:54:46 +0800 Subject: how can I find where is the macro or function deifined In-Reply-To: <49097.1438129504@turing-police.cc.vt.edu> References: <20150728174134.GB2384@debian> <49097.1438129504@turing-police.cc.vt.edu> Message-ID: <20150729025446.GA7013@debian> On Tue, Jul 28, 2015 at 08:25:04PM -0400, Valdis.Kletnieks at vt.edu wrote: > On Tue, 28 Jul 2015 23:54:36 -0000, Gnoleba GNOGBO said: > > Can you give a procedure step by step please to answer please ? > > http://www.lmgtfy.com/?q=ctags+vim+tutorial > http://www.lmgtfy.com/?q=ctags+emacs+tutorial Hi, Valdis Thanks for your answer but I can't open these links. For example, you have a kernel tree, ~/linux-4.1, in your pc. steps: + cd ~/linux-4.1 + make tags => Now,TAGS is created + Both emacs and vim can use TAGS. I don't konw if other editers can do such things + for emacs: + *M-x visit-tags-table* and load TAGS + M-. =>find tag + C-u M-. =>go to the next matched tag + M-* => return to last tag + for vim: + Just open vim in ~/linux-4.1 + open the source files and put the cursor on the tags you are interested + ctrl + ] => goto the tag + ctrl + t => return to your last tag tips: Hi,gnognoleba I think these answers is easy to find on the internet, and learning from the internet is a important skill. Finding on net is faster for you. It's better to google it first. If there is not answers you want, come to here and every one is pleasure to help you. Hi From amitkgupta09 at gmail.com Wed Jul 29 09:34:51 2015 From: amitkgupta09 at gmail.com (Amit Gupta) Date: Wed, 29 Jul 2015 19:04:51 +0530 Subject: HOSTAPD Error log In-Reply-To: References: <12287.1437673171@turing-police.cc.vt.edu> Message-ID: HI All, I facing CPU HALT issue on linux kernel 4.0.4 after running below mentioned command: #hostapd -B /etc/hostapd.conf dump_stack: [ 335.262172] [<80013400>] (__irq_svc) from [<8043f524>] (_raw_spin_unlock_irqrestore+0x20/0x54) [ 335.270975] [<8043f524>] (_raw_spin_unlock_irqrestore) from [<7f116820>] (ieee80211_wake_queues_by_reason+0x88/0x90 [mac80211]) [ 335.282669] [<7f116820>] (ieee80211_wake_queues_by_reason [mac80211]) from [<7f16e5ac>] (ath_complete_reset+0xdc/0x138 [ath9k]) [ 335.294187] [<7f16e5ac>] (ath_complete_reset [ath9k]) from [<7f16e9ac>] (ath_reset_internal+0x180/0x254 [ath9k]) [ 335.304389] [<7f16e9ac>] (ath_reset_internal [ath9k]) from [<7f16eaa0>] (ath_reset_work+0x20/0x40 [ath9k]) [ 335.314062] [<7f16eaa0>] (ath_reset_work [ath9k]) from [<80036b18>] (process_one_work+0x124/0x334) [ 335.323023] [<80036b18>] (process_one_work) from [<80037d60>] (worker_thread+0x140/0x524) [ 335.331207] [<80037d60>] (worker_thread) from [<8003c040>] (kthread+0xf4/0x108) [ 335.338524] [<8003c040>] (kthread) from [<8000ed40>] (ret_from_fork+0x14/0x34) [ 335.345750] INFO: rcu_preempt detected stalls on CPUs/tasks: This I m facing this issue with both hostadp version (0.7.3 and 2.4). Thanks, Amit Gupta On Tue, Jul 28, 2015 at 11:45 PM, Amit Gupta wrote: > Hi All, > Thanks for your quick response. > > Valdis, > I tried with strace stuff, but I faced CPU halt issue. Actually along with > those error logs..sometime I m facing CPU HALT issue after executing > #hostapd -B /etc/hostapd.conf. > > > > Pranay, > I tried your way to debug kernel for finding the root cause of error log 'Failed > to update rate sets in kernel module'. > But prior to that I started to debugging for > > IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready > IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready > > those two logs. > > Till now I found that before execution of __dev_open(net/core/dev,c) function > for 'wlan0' network interface, 'netif_carrier_off'(net/sched/sch_generic.c) > function get called for 'wlan0', > > void netif_carrier_off (struct net_device *dev ) > { > if (!test_and_set_bit (__LINK_STATE_NOCARRIER, &dev ->state )) { > if (dev ->reg_state == NETREG_UNINITIALIZED) > return; > atomic_inc (&dev ->carrier_changes); > linkwatch_fire_event (dev ); > } > } > > which result into condition checking passed in 'addrconf_qdisc_ok > '* > function.* > > In 'net/ipv6/addrconf.c' file > > if (event == NETDEV_UP ) { > if (!addrconf_qdisc_ok (dev )) { > */* device is not ready yet. */* pr_info (*"ADDRCONF(NETDEV_UP): %s: link is not ready\n"*, > dev ->name ); > break; > } > > in same file: > > static inline bool addrconf_qdisc_ok (const struct net_device *dev ) { > > return !qdisc_tx_is_noop (dev ); > > } > > In include/net/sch_generic.h file > > static inline bool qdisc_tx_is_noop (const struct net_device *dev ) > > { > > unsigned int i ; > > > for (i = 0; i < dev ->num_tx_queues; i ++) { > struct netdev_queue *txq = netdev_get_tx_queue (dev , i ); > if (rcu_access_pointer (txq->qdisc) != &noop_qdisc ) > return false ; > } > return true ; > } > > > I am still looking to find the cause execution of net_carrier_off function > before execution of __dev_open function for 'wlan0' network interface. This > behavior I am not observing with my other wired and pseudo network > interfaces. > > 'Failed to update rate sets in kernel module' > This error log may come because of previous issue as wlan0 device is not > active till this point. > > > One more thing I tried, I cross compiled 'hostapd' version 2.4 for my > target board and executed that on target board.I did not get above > mentioned error log and till now no CPU halt issue. > > Previously i was working with hostapd 0.7.3. > > > So is it like, hostapd old version is not compatible with new linux kernel > version as hostapd 0.7.3 version is running with no issue at linux 3.4. > > Any advice and suggestions will be appreciable/helpful. > > Thanks, > Amit Gupta > > > On Fri, Jul 24, 2015 at 11:06 AM, Pranay Srivastava > wrote: > >> Hi Amit >> >> >> On Thu, Jul 23, 2015 at 11:09 PM, wrote: >> > On Thu, 23 Jul 2015 12:31:18 +0530, Amit Gupta said: >> > >> >> Configuration file: /etc/hostapd.conf >> >> [ 199.672712] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready >> >> Failed to update rate sets in kernel module >> >> [ 199.687566] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready >> >> Using interface wlan0 with hwaddr 00:0e:8e:38:29:e6 and ssid >> 'test_wifi_2' >> >> >> >> >> >> Eventhough I am getting this error log from user space >> application(hostapd) >> >> code, my wifi device is working fine. But I want to remove this error >> log >> >> and want to know the root cause this error log. >> > >> > My gut reaction is that hostapd is issuing ioctl() calls in the wrong >> order >> > and/or failing to allow a long enough delay or wait for a specific >> event. >> > >> > I'd recommend running something like: >> > >> > # strace -f hostapd -B /etc/hostapd.conf > /tmp/strace.out 2>&1 >> >> The driver gets notified of this change via netlink socks. I also face >> the same issue and so far I found this >> >> Hostapd calls >> --->i802_set_rate_sets >> >> which then creates a nlmsg which is handled in driver as >> >> --driver-- >> -->nl80211_set_bss >> --->rdev_change_bss >> >> now change_bss is defined as >> >> ieee80211_change_bss (net/mac80211/cfg.c) unless ofcourse your driver >> provides something else. >> >> There seems to be no error from here. >> >> So maybe it's the send_recv call in hostapd in function >> i802_set_rate_sets? I'll look into it more. >> >> > >> > and go look for what failing call was made just before the write call >> > that output 'Failed to update'. Hopefully, tracing the flow of that >> > call will reveal a kernel code path that output the 'link is not ready' >> > message. Then you'll know what 'if (somecondition)' landed you in that >> > situation. >> > >> > Knowing that, it will become a lot easier to figure out what happened. >> > >> > _______________________________________________ >> > Kernelnewbies mailing list >> > Kernelnewbies at kernelnewbies.org >> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >> > >> >> >> >> -- >> ---P.K.S >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150729/5ff0b6c5/attachment-0001.html From mkatiyar at gmail.com Wed Jul 29 14:50:38 2015 From: mkatiyar at gmail.com (Manish Katiyar) Date: Wed, 29 Jul 2015 11:50:38 -0700 Subject: Kernel development using linux containers (LXC ) ? Message-ID: Hi, I've been playing and reading about control groups and linux containers recently and was wondering if there are any existing recipes on how to setup a kernel environment in containers. Google hasn't been helpful so far (or maybe I'm not searching properly). I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be interesting to have it in containers. Given that they share they same OS image as host, I'm not sure if its possible without making the host OS crash. Any suggestions. Thanks - Manish From Jeff.Haran at citrix.com Wed Jul 29 16:07:59 2015 From: Jeff.Haran at citrix.com (Jeff Haran) Date: Wed, 29 Jul 2015 20:07:59 +0000 Subject: Kernel development using linux containers (LXC ) ? In-Reply-To: References: Message-ID: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> >-----Original Message----- >From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- >bounces at kernelnewbies.org] On Behalf Of Manish Katiyar >Sent: Wednesday, July 29, 2015 11:51 AM >To: kernelnewbies >Subject: Kernel development using linux containers (LXC ) ? > >Hi, > >I've been playing and reading about control groups and linux containers >recently and was wondering if there are any existing recipes on how to setup >a kernel environment in containers. Google hasn't been helpful so far (or >maybe I'm not searching properly). > >I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be >interesting to have it in containers. Given that they share they same OS image >as host, I'm not sure if its possible without making the host OS crash. > >Any suggestions. > >Thanks - >Manish I'm not sure what your goal is here, but it sounds to me like you might want to be googling for "linux namespaces". Jeff Haran From mkatiyar at gmail.com Wed Jul 29 16:23:18 2015 From: mkatiyar at gmail.com (Manish Katiyar) Date: Wed, 29 Jul 2015 13:23:18 -0700 Subject: Kernel development using linux containers (LXC ) ? In-Reply-To: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> References: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> Message-ID: On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran wrote: >>-----Original Message----- >>From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- >>bounces at kernelnewbies.org] On Behalf Of Manish Katiyar >>Sent: Wednesday, July 29, 2015 11:51 AM >>To: kernelnewbies >>Subject: Kernel development using linux containers (LXC ) ? >> >>Hi, >> >>I've been playing and reading about control groups and linux containers >>recently and was wondering if there are any existing recipes on how to setup >>a kernel environment in containers. Google hasn't been helpful so far (or >>maybe I'm not searching properly). >> >>I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be >>interesting to have it in containers. Given that they share they same OS image >>as host, I'm not sure if its possible without making the host OS crash. >> >>Any suggestions. >> >>Thanks - >>Manish > > I'm not sure what your goal is here, but it sounds to me like you might want to be googling for "linux namespaces". I'm sorry. I see that my previous mail had a key word "development" missing. What I was trying to find out was that is it possible to setup and use linux containers/cgroups to do kernel development. Things like writing and test kernel modules, debugging kernel, attaching gdb etc. etc. which normally require Qemu, busybox or other VM techniques since containers are much lightweight and if anyone has recipes for that setup to do development without crashing the host OS. Any hints appreciated. I looked for "linux namespaces" but it doesn't give me what I want. From greg at kroah.com Wed Jul 29 16:35:25 2015 From: greg at kroah.com (Greg KH) Date: Wed, 29 Jul 2015 13:35:25 -0700 Subject: Kernel development using linux containers (LXC ) ? In-Reply-To: References: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> Message-ID: <20150729203525.GA23880@kroah.com> On Wed, Jul 29, 2015 at 01:23:18PM -0700, Manish Katiyar wrote: > On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran wrote: > >>-----Original Message----- > >>From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- > >>bounces at kernelnewbies.org] On Behalf Of Manish Katiyar > >>Sent: Wednesday, July 29, 2015 11:51 AM > >>To: kernelnewbies > >>Subject: Kernel development using linux containers (LXC ) ? > >> > >>Hi, > >> > >>I've been playing and reading about control groups and linux containers > >>recently and was wondering if there are any existing recipes on how to setup > >>a kernel environment in containers. Google hasn't been helpful so far (or > >>maybe I'm not searching properly). > >> > >>I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be > >>interesting to have it in containers. Given that they share they same OS image > >>as host, I'm not sure if its possible without making the host OS crash. > >> > >>Any suggestions. > >> > >>Thanks - > >>Manish > > > > I'm not sure what your goal is here, but it sounds to me like you might want to be googling for "linux namespaces". > > I'm sorry. I see that my previous mail had a key word "development" > missing. What I was trying to find out was that is it possible to > setup and use linux containers/cgroups to do kernel development. > Things like writing and test kernel modules, debugging kernel, > attaching gdb etc. etc. which normally require Qemu, busybox or other > VM techniques since containers are much lightweight and if anyone has > recipes for that setup to do development without crashing the host OS. No, this will not work for that task, you are running the same kernel, only userspace is "partitioned" off in different ways. sorry, stick with kvm. greg k-h From greg.freemyer at gmail.com Wed Jul 29 16:49:45 2015 From: greg.freemyer at gmail.com (Greg Freemyer) Date: Wed, 29 Jul 2015 16:49:45 -0400 Subject: Kernel development using linux containers (LXC ) ? In-Reply-To: References: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> Message-ID: On Wed, Jul 29, 2015 at 4:23 PM, Manish Katiyar wrote: > On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran wrote: >>>-----Original Message----- >>>From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- >>>bounces at kernelnewbies.org] On Behalf Of Manish Katiyar >>>Sent: Wednesday, July 29, 2015 11:51 AM >>>To: kernelnewbies >>>Subject: Kernel development using linux containers (LXC ) ? >>> >>>Hi, >>> >>>I've been playing and reading about control groups and linux containers >>>recently and was wondering if there are any existing recipes on how to setup >>>a kernel environment in containers. Google hasn't been helpful so far (or >>>maybe I'm not searching properly). >>> >>>I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be >>>interesting to have it in containers. Given that they share they same OS image >>>as host, I'm not sure if its possible without making the host OS crash. >>> >>>Any suggestions. >>> >>>Thanks - >>>Manish >> >> I'm not sure what your goal is here, but it sounds to me like you might want to be googling for "linux namespaces". > > I'm sorry. I see that my previous mail had a key word "development" > missing. What I was trying to find out was that is it possible to > setup and use linux containers/cgroups to do kernel development. > Things like writing and test kernel modules, debugging kernel, > attaching gdb etc. etc. which normally require Qemu, busybox or other > VM techniques since containers are much lightweight and if anyone has > recipes for that setup to do development without crashing the host OS. > > Any hints appreciated. I looked for "linux namespaces" but it doesn't > give me what I want. > I have no first hand experience, but I don't think containers have the flexibility you need. Docker in particular shares the kernel with the host OS as far as I know, so it would not be of any value that I can see. I think a unikernel may be what you are looking for: http://www.linux.com/news/enterprise/cloud-computing/821243-unikernel-use-cases-containers My understanding is that with a unikernel you can move targeted portions of the Hypervisor kernel up into the unikernel. Thus if you wanted to work on a network driver, you could implement it in a unikernel. Then if it blew up you would fall back to the hypervisor level, kill the unikernel and try again. The Rump kernel (a unikernel) in particular might be a good option: == Rump Kernels ?? provide free, portable, componentized, kernel quality drivers such as file systems, POSIX system call handlers, PCI device drivers, a SCSI protocol stack, virtio and a TCP/IP stack. These drivers may be integrated into existing systems, or run as stand-alone unikernels on cloud hypervisors and embedded systems. == I have no first hand experience with the Rump Kernel, so I don't know if it would work as a way to do linux kernel development or not. It certainly seems like a great environment for generic kernel development. Hope that helps Greg From mkatiyar at gmail.com Wed Jul 29 17:03:54 2015 From: mkatiyar at gmail.com (Manish Katiyar) Date: Wed, 29 Jul 2015 14:03:54 -0700 Subject: Kernel development using linux containers (LXC ) ? In-Reply-To: References: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> Message-ID: On Wed, Jul 29, 2015 at 1:49 PM, Greg Freemyer wrote: > On Wed, Jul 29, 2015 at 4:23 PM, Manish Katiyar wrote: >> On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran wrote: >>>>-----Original Message----- >>>>From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- >>>>bounces at kernelnewbies.org] On Behalf Of Manish Katiyar >>>>Sent: Wednesday, July 29, 2015 11:51 AM >>>>To: kernelnewbies >>>>Subject: Kernel development using linux containers (LXC ) ? >>>> >>>>Hi, >>>> >>>>I've been playing and reading about control groups and linux containers >>>>recently and was wondering if there are any existing recipes on how to setup >>>>a kernel environment in containers. Google hasn't been helpful so far (or >>>>maybe I'm not searching properly). >>>> >>>>I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be >>>>interesting to have it in containers. Given that they share they same OS image >>>>as host, I'm not sure if its possible without making the host OS crash. >>>> >>>>Any suggestions. >>>> >>>>Thanks - >>>>Manish >>> >>> I'm not sure what your goal is here, but it sounds to me like you might want to be googling for "linux namespaces". >> >> I'm sorry. I see that my previous mail had a key word "development" >> missing. What I was trying to find out was that is it possible to >> setup and use linux containers/cgroups to do kernel development. >> Things like writing and test kernel modules, debugging kernel, >> attaching gdb etc. etc. which normally require Qemu, busybox or other >> VM techniques since containers are much lightweight and if anyone has >> recipes for that setup to do development without crashing the host OS. >> >> Any hints appreciated. I looked for "linux namespaces" but it doesn't >> give me what I want. >> > > I have no first hand experience, but I don't think containers have the > flexibility you need. Docker in particular shares the kernel with the > host OS as far as I know, so it would not be of any value that I can > see. > > I think a unikernel may be what you are looking for: > > http://www.linux.com/news/enterprise/cloud-computing/821243-unikernel-use-cases-containers > > My understanding is that with a unikernel you can move targeted > portions of the Hypervisor kernel up into the unikernel. Thus if you > wanted to work on a network driver, you could implement it in a > unikernel. Then if it blew up you would fall back to the hypervisor > level, kill the unikernel and try again. > > The Rump kernel (a unikernel) in particular might be a good option: > > == > Rump Kernels ?? provide free, portable, componentized, kernel quality > drivers such as file systems, POSIX system call handlers, PCI device > drivers, a SCSI protocol stack, virtio and a TCP/IP stack. These > drivers may be integrated into existing systems, or run as stand-alone > unikernels on cloud hypervisors and embedded systems. > == > > I have no first hand experience with the Rump Kernel, so I don't know > if it would work as a way to do linux kernel development or not. It > certainly seems like a great environment for generic kernel > development. Thanks a lot GregF/GregKH, That's what I suspected, that it might not be possible because of both sharing the same OS. I'll have a look at Rump Kernels and see how far it goes. Thanks for the pointers ! From gd1100 at gmail.com Thu Jul 30 08:47:00 2015 From: gd1100 at gmail.com (Grzegorz Dwornicki) Date: Thu, 30 Jul 2015 14:47:00 +0200 Subject: Kernel development using linux containers (LXC ) ? In-Reply-To: References: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> Message-ID: What about UML? I'm using KVM but asking for the sake of argument. 2015-07-29 23:03 GMT+02:00 Manish Katiyar : > On Wed, Jul 29, 2015 at 1:49 PM, Greg Freemyer wrote: >> On Wed, Jul 29, 2015 at 4:23 PM, Manish Katiyar wrote: >>> On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran wrote: >>>>>-----Original Message----- >>>>>From: kernelnewbies-bounces at kernelnewbies.org [mailto:kernelnewbies- >>>>>bounces at kernelnewbies.org] On Behalf Of Manish Katiyar >>>>>Sent: Wednesday, July 29, 2015 11:51 AM >>>>>To: kernelnewbies >>>>>Subject: Kernel development using linux containers (LXC ) ? >>>>> >>>>>Hi, >>>>> >>>>>I've been playing and reading about control groups and linux containers >>>>>recently and was wondering if there are any existing recipes on how to setup >>>>>a kernel environment in containers. Google hasn't been helpful so far (or >>>>>maybe I'm not searching properly). >>>>> >>>>>I've used VMs for dev in past (Qemu, uml etc.), but looks like it may be >>>>>interesting to have it in containers. Given that they share they same OS image >>>>>as host, I'm not sure if its possible without making the host OS crash. >>>>> >>>>>Any suggestions. >>>>> >>>>>Thanks - >>>>>Manish >>>> >>>> I'm not sure what your goal is here, but it sounds to me like you might want to be googling for "linux namespaces". >>> >>> I'm sorry. I see that my previous mail had a key word "development" >>> missing. What I was trying to find out was that is it possible to >>> setup and use linux containers/cgroups to do kernel development. >>> Things like writing and test kernel modules, debugging kernel, >>> attaching gdb etc. etc. which normally require Qemu, busybox or other >>> VM techniques since containers are much lightweight and if anyone has >>> recipes for that setup to do development without crashing the host OS. >>> >>> Any hints appreciated. I looked for "linux namespaces" but it doesn't >>> give me what I want. >>> >> >> I have no first hand experience, but I don't think containers have the >> flexibility you need. Docker in particular shares the kernel with the >> host OS as far as I know, so it would not be of any value that I can >> see. >> >> I think a unikernel may be what you are looking for: >> >> http://www.linux.com/news/enterprise/cloud-computing/821243-unikernel-use-cases-containers >> >> My understanding is that with a unikernel you can move targeted >> portions of the Hypervisor kernel up into the unikernel. Thus if you >> wanted to work on a network driver, you could implement it in a >> unikernel. Then if it blew up you would fall back to the hypervisor >> level, kill the unikernel and try again. >> >> The Rump kernel (a unikernel) in particular might be a good option: >> >> == >> Rump Kernels ?? provide free, portable, componentized, kernel quality >> drivers such as file systems, POSIX system call handlers, PCI device >> drivers, a SCSI protocol stack, virtio and a TCP/IP stack. These >> drivers may be integrated into existing systems, or run as stand-alone >> unikernels on cloud hypervisors and embedded systems. >> == >> >> I have no first hand experience with the Rump Kernel, so I don't know >> if it would work as a way to do linux kernel development or not. It >> certainly seems like a great environment for generic kernel >> development. > > Thanks a lot GregF/GregKH, > > That's what I suspected, that it might not be possible because of > both sharing the same OS. I'll have a look at Rump Kernels and see how > far it goes. Thanks for the pointers ! > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies From gd1100 at gmail.com Thu Jul 30 10:09:56 2015 From: gd1100 at gmail.com (Grzegorz Dwornicki) Date: Thu, 30 Jul 2015 16:09:56 +0200 Subject: Kernel development using linux containers (LXC ) ? In-Reply-To: <55BA2EBD.7000800@gmail.com> References: <4E5779AD88B2F040B8A7E83ECF544D1A61365D@SJCPEX01CL03.citrite.net> <55BA1D1C.2010500@gmail.com> <55BA2EBD.7000800@gmail.com> Message-ID: As I said I use kvm and this question was just for sake of argument. Since you ask I work with sockets ATM. 30 lip 2015 16:03 "nick" napisa?(a): > > > On 2015-07-30 09:57 AM, Grzegorz Dwornicki wrote: > > Yeah I've thought that hardware can be hard to program on UML > > 30 lip 2015 14:48 "nick" napisa?(a): > > > Just so I known what area are you working in as this may help > me find a better solution for you. > Nick > >> > >> > >> On 2015-07-30 08:47 AM, Grzegorz Dwornicki wrote: > >>> What about UML? I'm using KVM but asking for the sake of argument. > >>> > >> I already stated that it works fine if your not doing hardware > >> exact development like file systems or networking core. > >> Nick > >>> 2015-07-29 23:03 GMT+02:00 Manish Katiyar : > >>>> On Wed, Jul 29, 2015 at 1:49 PM, Greg Freemyer < > greg.freemyer at gmail.com> > >> wrote: > >>>>> On Wed, Jul 29, 2015 at 4:23 PM, Manish Katiyar > >> wrote: > >>>>>> On Wed, Jul 29, 2015 at 1:07 PM, Jeff Haran > >> wrote: > >>>>>>>> -----Original Message----- > >>>>>>>> From: kernelnewbies-bounces at kernelnewbies.org [mailto: > >> kernelnewbies- > >>>>>>>> bounces at kernelnewbies.org] On Behalf Of Manish Katiyar > >>>>>>>> Sent: Wednesday, July 29, 2015 11:51 AM > >>>>>>>> To: kernelnewbies > >>>>>>>> Subject: Kernel development using linux containers (LXC ) ? > >>>>>>>> > >>>>>>>> Hi, > >>>>>>>> > >>>>>>>> I've been playing and reading about control groups and linux > >> containers > >>>>>>>> recently and was wondering if there are any existing recipes on > how > >> to setup > >>>>>>>> a kernel environment in containers. Google hasn't been helpful so > >> far (or > >>>>>>>> maybe I'm not searching properly). > >>>>>>>> > >>>>>>>> I've used VMs for dev in past (Qemu, uml etc.), but looks like it > >> may be > >>>>>>>> interesting to have it in containers. Given that they share they > >> same OS image > >>>>>>>> as host, I'm not sure if its possible without making the host OS > >> crash. > >>>>>>>> > >>>>>>>> Any suggestions. > >>>>>>>> > >>>>>>>> Thanks - > >>>>>>>> Manish > >>>>>>> > >>>>>>> I'm not sure what your goal is here, but it sounds to me like you > >> might want to be googling for "linux namespaces". > >>>>>> > >>>>>> I'm sorry. I see that my previous mail had a key word "development" > >>>>>> missing. What I was trying to find out was that is it possible to > >>>>>> setup and use linux containers/cgroups to do kernel development. > >>>>>> Things like writing and test kernel modules, debugging kernel, > >>>>>> attaching gdb etc. etc. which normally require Qemu, busybox or > other > >>>>>> VM techniques since containers are much lightweight and if anyone > has > >>>>>> recipes for that setup to do development without crashing the host > OS. > >>>>>> > >>>>>> Any hints appreciated. I looked for "linux namespaces" but it > doesn't > >>>>>> give me what I want. > >>>>>> > >>>>> > >>>>> I have no first hand experience, but I don't think containers have > the > >>>>> flexibility you need. Docker in particular shares the kernel with > the > >>>>> host OS as far as I know, so it would not be of any value that I can > >>>>> see. > >>>>> > >>>>> I think a unikernel may be what you are looking for: > >>>>> > >>>>> > >> > http://www.linux.com/news/enterprise/cloud-computing/821243-unikernel-use-cases-containers > >>>>> > >>>>> My understanding is that with a unikernel you can move targeted > >>>>> portions of the Hypervisor kernel up into the unikernel. Thus if you > >>>>> wanted to work on a network driver, you could implement it in a > >>>>> unikernel. Then if it blew up you would fall back to the hypervisor > >>>>> level, kill the unikernel and try again. > >>>>> > >>>>> The Rump kernel (a unikernel) in particular might be a good option: > >>>>> > >>>>> == > >>>>> Rump Kernels ? provide free, portable, componentized, kernel quality > >>>>> drivers such as file systems, POSIX system call handlers, PCI device > >>>>> drivers, a SCSI protocol stack, virtio and a TCP/IP stack. These > >>>>> drivers may be integrated into existing systems, or run as > stand-alone > >>>>> unikernels on cloud hypervisors and embedded systems. > >>>>> == > >>>>> > >>>>> I have no first hand experience with the Rump Kernel, so I don't know > >>>>> if it would work as a way to do linux kernel development or not. It > >>>>> certainly seems like a great environment for generic kernel > >>>>> development. > >>>> > >>>> Thanks a lot GregF/GregKH, > >>>> > >>>> That's what I suspected, that it might not be possible because of > >>>> both sharing the same OS. I'll have a look at Rump Kernels and see how > >>>> far it goes. Thanks for the pointers ! > >>>> > >>>> _______________________________________________ > >>>> Kernelnewbies mailing list > >>>> Kernelnewbies at kernelnewbies.org > >>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > >>> > >>> _______________________________________________ > >>> Kernelnewbies mailing list > >>> Kernelnewbies at kernelnewbies.org > >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > >>> > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150730/829aa37b/attachment.html From halcyonic at gmail.com Thu Jul 30 19:03:51 2015 From: halcyonic at gmail.com (Nicholas Murphy) Date: Thu, 30 Jul 2015 16:03:51 -0700 Subject: shared memory via /dev/shm? Message-ID: <7FA0504F-3DEE-459E-8A80-4633EC3331E5@gmail.com> Apologies if this has been asked before: Yes, I?ve read all the disclaimers against accessing files in the kernel, but I want to set up a shared memory segment between a kernel module and one or more user processes, and /dev/shm seems like a good way to do that. Given that, what?s the preferred way to access files within the kernel (specifically within a kernel module)? At the moment, I?m using filp_open() on module load to open the file (which seems to work), then: filp_close() to close the file * kern_path() to get the entry for the /dev/shm file vfs_unlink() to delete the /dev/shm file dput() to free the dentry path_put() to free the path ?on module unload, and it hangs. Any suggestions what I?m doing wrong? Thanks, Nick From Valdis.Kletnieks at vt.edu Thu Jul 30 20:00:01 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Thu, 30 Jul 2015 20:00:01 -0400 Subject: shared memory via /dev/shm? In-Reply-To: Your message of "Thu, 30 Jul 2015 16:03:51 -0700." <7FA0504F-3DEE-459E-8A80-4633EC3331E5@gmail.com> References: <7FA0504F-3DEE-459E-8A80-4633EC3331E5@gmail.com> Message-ID: <47029.1438300801@turing-police.cc.vt.edu> On Thu, 30 Jul 2015 16:03:51 -0700, Nicholas Murphy said: > Yes, I???ve read all the disclaimers against accessing files in the kernel, but > I want to set up a shared memory segment between a kernel module and one or > more user processes, and /dev/shm seems like a good way to do that. Is there a specific reason you aren't letting the userspace program create an mmap() area and then write the identifying information to a /sys attribute file (or other means of notifying the kernel of what to use)? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150730/d7c5b026/attachment.bin From halcyonic at gmail.com Fri Jul 31 19:16:14 2015 From: halcyonic at gmail.com (Nicholas Murphy) Date: Fri, 31 Jul 2015 16:16:14 -0700 Subject: shared memory via /dev/shm? In-Reply-To: <47029.1438300801@turing-police.cc.vt.edu> References: <7FA0504F-3DEE-459E-8A80-4633EC3331E5@gmail.com> <47029.1438300801@turing-police.cc.vt.edu> Message-ID: Hmm?I suppose not. I?d would still be curious what the right way to do this is, though? I think I can get away with that trick, but I can also imagine scenarios where I?d want the kernel module itself to create the file. Thanks, Nick > On Jul 30, 2015, at 5:00 PM, Valdis.Kletnieks at vt.edu wrote: > > On Thu, 30 Jul 2015 16:03:51 -0700, Nicholas Murphy said: > >> Yes, I?ve read all the disclaimers against accessing files in the kernel, but >> I want to set up a shared memory segment between a kernel module and one or >> more user processes, and /dev/shm seems like a good way to do that. > > Is there a specific reason you aren't letting the userspace program create > an mmap() area and then write the identifying information to a /sys attribute > file (or other means of notifying the kernel of what to use)? From Valdis.Kletnieks at vt.edu Fri Jul 31 21:47:58 2015 From: Valdis.Kletnieks at vt.edu (Valdis.Kletnieks at vt.edu) Date: Fri, 31 Jul 2015 21:47:58 -0400 Subject: shared memory via /dev/shm? In-Reply-To: Your message of "Fri, 31 Jul 2015 16:16:14 -0700." References: <7FA0504F-3DEE-459E-8A80-4633EC3331E5@gmail.com> <47029.1438300801@turing-police.cc.vt.edu> Message-ID: <6473.1438393678@turing-police.cc.vt.edu> On Fri, 31 Jul 2015 16:16:14 -0700, Nicholas Murphy said: > Hmm???I suppose not. I???d would still be curious what the right way to do this > is, though? I think I can get away with that trick, but I can also imagine > scenarios where I???d want the kernel module itself to create the file. In general, the right answer is to do the file handling in userspace. Among other things, that makes it possible to avoid hard-coding a filename in kernel code (remember - we try to make the kernel be about mechanism, not policy). Among other things, it avoids the effort of opening a file that userspace never actually does anything with - if you wait for userspace to open it and notify the kernel, you can be pretty sure that it's about to be used. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 848 bytes Desc: not available Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150731/29503d01/attachment.bin From bhaaradwaaj at gmail.com Sun Jul 26 01:29:17 2015 From: bhaaradwaaj at gmail.com (Bharadwaaj) Date: Sun, 26 Jul 2015 10:59:17 +0530 Subject: [PATCH] drivers: staging: lustre: lnet: klnds: o2iblnd: o2iblnd.c Message-ID: <1437888557-5087-1-git-send-email-bhaaradwaaj@gmail.com> From: "bhaaradwaaj at gmail.com" Fixed spelling mistake. Signed-off-by: Bharadwaaj Ramakrishnan --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 4eb24a1..463940b 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -1424,7 +1424,7 @@ static int kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps, static void kiblnd_fail_fmr_poolset(kib_fmr_poolset_t *fps, struct list_head *zombies) { - if (fps->fps_net == NULL) /* intialized? */ + if (fps->fps_net == NULL) /* initialized? */ return; spin_lock(&fps->fps_lock); @@ -1628,7 +1628,7 @@ static void kiblnd_destroy_pool_list(struct list_head *head) static void kiblnd_fail_poolset(kib_poolset_t *ps, struct list_head *zombies) { - if (ps->ps_net == NULL) /* intialized? */ + if (ps->ps_net == NULL) /* initialized? */ return; spin_lock(&ps->ps_lock); -- 2.4.6 From bhaaradwaaj at gmail.com Sun Jul 26 01:33:28 2015 From: bhaaradwaaj at gmail.com (Bharadwaaj) Date: Sun, 26 Jul 2015 11:03:28 +0530 Subject: [PATCH 2/2] drivers: staging : media : davinci_vpfe : dma365_resizer.c drivers: staging : media : davinci_vpfe : dma365_resizer.h Message-ID: <1437888808-5622-1-git-send-email-bhaaradwaaj@gmail.com> From: "bhaaradwaaj at gmail.com" Fixed some spelling mistake. Signed-off-by: Bharadwaaj Ramakrishnan --- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 22 +++++++++++----------- drivers/staging/media/davinci_vpfe/dm365_resizer.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index acb293e..10f51f4 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -495,7 +495,7 @@ resizer_configure_in_continious_mode(struct vpfe_resizer_device *resizer) int line_len; int ret; - if (resizer->resizer_a.output != RESIZER_OUPUT_MEMORY) { + if (resizer->resizer_a.output != RESIZER_OUTPUT_MEMORY) { dev_err(dev, "enable resizer - Resizer-A\n"); return -EINVAL; } @@ -507,7 +507,7 @@ resizer_configure_in_continious_mode(struct vpfe_resizer_device *resizer) param->rsz_en[RSZ_B] = DISABLE; param->oper_mode = RESIZER_MODE_CONTINIOUS; - if (resizer->resizer_b.output == RESIZER_OUPUT_MEMORY) { + if (resizer->resizer_b.output == RESIZER_OUTPUT_MEMORY) { struct v4l2_mbus_framefmt *outformat2; param->rsz_en[RSZ_B] = ENABLE; @@ -1048,13 +1048,13 @@ static void resizer_ss_isr(struct vpfe_resizer_device *resizer) if (ipipeif_sink != IPIPEIF_INPUT_MEMORY) return; - if (resizer->resizer_a.output == RESIZER_OUPUT_MEMORY) { + if (resizer->resizer_a.output == RESIZER_OUTPUT_MEMORY) { val = vpss_dma_complete_interrupt(); if (val != 0 && val != 2) return; } - if (resizer->resizer_a.output == RESIZER_OUPUT_MEMORY) { + if (resizer->resizer_a.output == RESIZER_OUTPUT_MEMORY) { spin_lock(&video_out->dma_queue_lock); vpfe_video_process_buffer_complete(video_out); video_out->state = VPFE_VIDEO_BUFFER_NOT_QUEUED; @@ -1064,7 +1064,7 @@ static void resizer_ss_isr(struct vpfe_resizer_device *resizer) /* If resizer B is enabled */ if (pipe->output_num > 1 && resizer->resizer_b.output == - RESIZER_OUPUT_MEMORY) { + RESIZER_OUTPUT_MEMORY) { spin_lock(&video_out->dma_queue_lock); vpfe_video_process_buffer_complete(video_out2); video_out2->state = VPFE_VIDEO_BUFFER_NOT_QUEUED; @@ -1074,7 +1074,7 @@ static void resizer_ss_isr(struct vpfe_resizer_device *resizer) /* start HW if buffers are queued */ if (vpfe_video_is_pipe_ready(pipe) && - resizer->resizer_a.output == RESIZER_OUPUT_MEMORY) { + resizer->resizer_a.output == RESIZER_OUTPUT_MEMORY) { resizer_enable(resizer, 1); vpfe_ipipe_enable(vpfe_dev, 1); vpfe_ipipeif_enable(vpfe_dev); @@ -1242,8 +1242,8 @@ static int resizer_do_hw_setup(struct vpfe_resizer_device *resizer) struct resizer_params *param = &resizer->config; int ret = 0; - if (resizer->resizer_a.output == RESIZER_OUPUT_MEMORY || - resizer->resizer_b.output == RESIZER_OUPUT_MEMORY) { + if (resizer->resizer_a.output == RESIZER_OUTPUT_MEMORY || + resizer->resizer_b.output == RESIZER_OUTPUT_MEMORY) { if (ipipeif_sink == IPIPEIF_INPUT_MEMORY && ipipeif_source == IPIPEIF_OUTPUT_RESIZER) ret = resizer_configure_in_single_shot_mode(resizer); @@ -1268,7 +1268,7 @@ static int resizer_set_stream(struct v4l2_subdev *sd, int enable) if (&resizer->crop_resizer.subdev != sd) return 0; - if (resizer->resizer_a.output != RESIZER_OUPUT_MEMORY) + if (resizer->resizer_a.output != RESIZER_OUTPUT_MEMORY) return 0; switch (enable) { @@ -1722,7 +1722,7 @@ static int resizer_link_setup(struct media_entity *entity, } if (resizer->resizer_a.output != RESIZER_OUTPUT_NONE) return -EBUSY; - resizer->resizer_a.output = RESIZER_OUPUT_MEMORY; + resizer->resizer_a.output = RESIZER_OUTPUT_MEMORY; break; default: @@ -1747,7 +1747,7 @@ static int resizer_link_setup(struct media_entity *entity, } if (resizer->resizer_b.output != RESIZER_OUTPUT_NONE) return -EBUSY; - resizer->resizer_b.output = RESIZER_OUPUT_MEMORY; + resizer->resizer_b.output = RESIZER_OUTPUT_MEMORY; break; default: diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.h b/drivers/staging/media/davinci_vpfe/dm365_resizer.h index 93b0f44..00e64b0 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.h +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.h @@ -210,7 +210,7 @@ enum resizer_input_entity { enum resizer_output_entity { RESIZER_OUTPUT_NONE = 0, - RESIZER_OUPUT_MEMORY = 1, + RESIZER_OUTPUT_MEMORY = 1, }; struct dm365_resizer_device { -- 2.4.6 From cnegris01 at gmail.com Wed Jul 29 18:36:51 2015 From: cnegris01 at gmail.com (Christian N) Date: Wed, 29 Jul 2015 19:36:51 -0300 Subject: USB Driver - Device No Response standard compliant Message-ID: Hi All According to USB On The Go and Embedded Host Automated Compliacne Plan, item 6.7.22 A-UUT ?Device No Response? for connection timeout, the "Device not responding? error message should be displayed when a non-responsive device is attached. I know that the presentation of the message is the responsibility of the application (user space), but to do this is necesary an event from usb driver (I think it). Nowdays when a non responsive device is attached, "unable to enumerate USB device on port... " is logged a in dmesg, but not event is dispatched (by example in usb_uevent). Without an event application should poll the log (loading the system unnecessarily) searching new "not responsive devices". To comply with the standard usb driver should be modified? I'm probably confusing responsibilities of user and kernel space. I appreciate your opinion/answer. Thanks in advance Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150729/1fcb10c8/attachment-0001.html