linux-kernel-newbies mailing list

FromSubjectsort iconDate
Bartek Dolewski
Using acces_ok() in device driver
Hi all Again I have problems with some kernel programming stuff. I decided to make my first device driver more robust. So I wanted to add access_ok() both in function read() and write() from fops. But when I type: echo "Message" >> /dev/mydevice I get this error: bash: echo: write error: Bad address Here my source code. First, implementation of read() function: static ssize_t FirstModule_Write(struct file *flip, const char *buffer, size_t length, loff_t *off) { int i; if(...
Aug 18, 6:54 pm 2008
Johannes Weiner
Re: Using acces_ok() in device driver
Hi, You return -EFAULT unconditionally ^. No matter what access_ok() says. It's funny that you already have it indented according to the actual The memory region that spans from addr to addr+size. So in your case from buffer[0] to buffer[length - 1]. The call you have should be correct if I didn't miss something. Hannes -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at [ message continues ]
" title="http://kernelnewbies...">http://kernelnewbies...
Aug 18, 7:37 pm 2008
Stanichenko Marat
[PATCH][RFC] random: show /dev/random statistics per interfa...
From: Stanichenko Marat <mstanichenko@gmail.com> Add the interface that shows the amount of entropy generated via the interfaces and also the amount consumed. This patch adds two files in proc. The first of them shows the entropy generated per interface, the second one - the amount consumed from blocking (/dev/random) and nonblocking (/dev/urandom) pools. This patch is an attempt to realize "/dev/random statistics" project of kernel newbies community. [ message continues ]
" title="http://kernelnewbies.org/KernelP...">http://kernelnewbies.org/KernelP...
Aug 18, 1:25 pm 2008
Rene Herman
Re: [PATCH][RFC] random: show /dev/random statistics per int...
Just two quick comments/questions as encountered while reading. I'm not familiar with the random code or anything. First, your patch was posted Base64 encoded which doesn't make it easier to look at/comment on. Base64 encoding even text/plain attchments is a longstanding Thunderbird bug when your outgoing charset is set to UTF-8 (and the reason why my outgoing charset is ISO8859-15; you just won't remember to switch from UTF-8 to something else every time when posting Couldn't state-&...
Aug 18, 3:23 pm 2008
Gagan Grover
Debug: sleeping function called from invalid context at fs/f...
I am getting below problem. What is the reason behind this ? Debug: sleeping function called from invalid context at fs/file_table.c:124 in_atomic():1[expected: 0], irqs_disabled():0 Call Trace:<ffffffff80132c79>{__might_sleep+173} <ffffffff8017a1f9>{__fput+41} <ffffffff80178e44>{filp_close+103} <ffffffff80178ecd>{sys_close+130} <ffffffff8011026a>{system_call+126} bad: scheduling while atomic! Call Trace:<ffffffff803095d1>{schedule+75} <ffffff...
Aug 18, 10:53 am 2008
Rene Herman
Re: Debug: sleeping function called from invalid context at ...
Somebody probably forgot to release a lock. And the somebody is probably one of those tainting modules. I believe this is stuff from: http://stefan.endrullis.de/en/xilinx_ise_7.1.html Right? Looking at the linuxdrivers.tar.gz tarball I see binary archives meaning we can't help with that here -- we don't have the source to look for the problem. Any and all support will have to come from whomever supplied you with it. Rene. -- To unsubscribe from this list: send an email with "uns...
Aug 18, 11:14 am 2008
Sri Ram K Vemulpali
Question regarding process creation
Hi all, I had a question regarding process creation. Here is the question. when fork call is issued at user level do_fork call is called at the kernel level. This function does all the job to create new kernel stack and process descriptor and copies all the parent resources to new process. But my doubt is how can kernel distinguish between kernel thread for the user level process. I mean user level process stack is different from the kernel level thread stack. For user level program user le...
Aug 17, 9:44 pm 2008
Thomas Petazzoni
Re: Question regarding process creation
Le Sun, 17 Aug 2008 21:44:40 -0400, It's not clear what you mean by « user level process » and « kernel level process ». In the Linux kernel, a "struct task_struct" exists for every thread in the system. Most of these threads belong to a given address space: these are the normal userspace threads everybody is used to see. Some of these threads do not belong to a particular address space: these are the kernel threads. As you said, the normal userspace threads have a userspace stack, used w...
Aug 18, 9:09 am 2008
Roman Mashak
arm926ej-s -- toolchain recommendation
Hello, I'm looking for a pre-compiled toolchain for a ARM926EJ-S based platform. Every sites I found are describing procedure to build croostools rather then offer pre-built ones. Can you recommend binary ready-to-use, Debian-based desireble? Thanks. -- Roman Mashak -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 17, 8:28 pm 2008
Matthias Kaehlcke
Re: arm926ej-s -- toolchain recommendation
i can't help with a toolchain specific to ARM926EJ-S, for a Debian-based toolchains for several platforms you might want to have a look at the toolchains of the emdebian project: http://www.emdebian.org/toolchains/search.php -- Matthias Kaehlcke Embedded Linux Engineer Barcelona You can chain me, you can torture me, you can even destroy this body, but you will never imprison my mind (Mahatma Gandhi) ...
Aug 18, 5:11 am 2008
Rene Herman
Re: arm926ej-s -- toolchain recommendation
Both the 926EJ-S and the Debian bit are too specific for me to know but there's a prebuilt i386 -> arm crosscompiler in the repository at: http://www.kernel.org/pub/tools/crosstool/ Maybe it helps. Rene. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 18, 4:57 am 2008
Michael Spradling
Re: arm926ej-s -- toolchain recommendation
I only know of two toolchains. The first is crosstools and there is a page of prebuilt binary packages: http://www.freaknet.org/martin/crosstool/packages/ The other one would be codesourcery: http://www.codesourcery.com/gnu_toolchains/arm I just thought I would mention them, didn't check to see if they work with the ARM926. -- -- Michael Spradling -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http:...
Aug 17, 8:55 pm 2008
Thomas Petazzoni
Re: [embedded platform] kernel questions
Le Thu, 14 Aug 2008 01:28:32 -0700, The latest -rc version, or Linus git tree. During the development work, don't stay on a fixed version: keep your patches updated until you submit them for inclusion. For more details, ask on the linux-arm-kernel mailing list Don't know about uCos, so I can't tell. Anyway you also need to make sure that the license of your uCos drivers is GPLv2, another compatible license, or that you are the author of these drivers and that you can re-license them under GPLv...
Aug 18, 8:59 am 2008
Prasad Joshi
Re: How to register a sysctl table on linux-2.6.25?
Hi Jovi, /* this is the data variable where we receive the data written by sysctl interface */ static char event_handler[256]; static struct ctl_table_header *handler_header_table; static struct ctl_table my_event_table[] = { { .ctl_name = KERN_EVENT_HANDLER, /* this needs to be defined in linux/sysctl.h */ .procname = "event_handler", /* this is the name by which the file will be created in /proc/sys/kernel */ .da...
Aug 18, 1:37 am 2008
Peter Teoh
Re: Module sections Query
To know that u can see how load_module() identify each section by name: exportindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab"); gplindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab_gpl"); gplfutureindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab_gpl_future"); unusedindex = find_sec(hdr, sechdrs, secstrings, "__ksymtab_unused"); unusedgplindex = find_sec(hdr, sechdrs, secstrings, What u said is correct. U can see how load_module() load ea...
Aug 18, 3:39 am 2008
Asim
Re: Module sections Query
Thanks Peter! The memcpy has all the details I need. Regards, Asim -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@nl.linux.org Please read the FAQ at http://kernelnewbies.org/FAQ
Aug 18, 11:41 am 2008
previous daytodaynext day
August 17, 2008August 18, 2008August 19, 2008