Re: Analyzing Linux Kernel

2010-06-19 Thread Bernd Petrovitsch
to measure these numbers (or something somewhat close to that) on the Linux kernel, VxWorks or any other kernel. Bernd -- Bernd Petrovitsch Email : be...@petrovitsch.priv.at LUGA : http://www.luga.at -- To unsubscribe from this list: send an email

Re: obtaining linux kernel command line from a module

2010-05-21 Thread Bernd Petrovitsch
parameters come at module loading time. Other than that the not-so-bright idea: Send a patch to export saved_command_line (including a good reason to export it to modules) to LKML and see what people say to it. Bernd -- Bernd Petrovitsch Email : be...@petrovitsch.priv.at

Re: obtaining linux kernel command line from a module

2010-05-21 Thread Bernd Petrovitsch
On Fre, 2010-05-21 at 12:48 +0200, Jason Nymble wrote: On 21 May 2010, at 12:37 PM, Bernd Petrovitsch wrote: [...] Other than that the not-so-bright idea: Send a patch to export saved_command_line (including a good reason to export it to modules) to LKML and see what people say to it. My

Re: hlist_for_each_entry

2010-04-21 Thread Bernd Petrovitsch
in the {}) of pre-fetching ( in (1) ) and casting the current pos into the typeof(*tpos) ( in (2) ). Am I right ? Yes. Bernd -- Bernd Petrovitsch Email : be...@petrovitsch.priv.at LUGA : http://www.luga.at -- To unsubscribe from this list: send

Re: a conceptual confusion -- loop device

2010-03-08 Thread Bernd Petrovitsch
+found Yes, because you didn't unlink/rm it. Otherwise the second mount would fail. [ Fullquote deleted ] Bernd -- Bernd Petrovitsch Email : be...@petrovitsch.priv.at LUGA : http://www.luga.at -- To unsubscribe from this list: send an email

Re: /sys file system not created

2010-02-18 Thread Bernd Petrovitsch
Hi! On Don, 2010-02-18 at 22:09 +0900, J.Hwan.Kim wrote: [...] But Kernel does not have /sys file system. My .config file tells CONFIG_SYSFS = y. How can I use /sys file in my system. You must mount it just as any other filesystem. Bernd -- Bernd Petrovitsch Email

Re: Small patches for Linux kernel

2010-01-26 Thread Bernd Petrovitsch
. You must send the patches there. .. and usually someone will review them and pick them up. Bernd -- Bernd Petrovitsch Email : be...@petrovitsch.priv.at LUGA : http://www.luga.at -- To unsubscribe from this list: send an email with unsubscribe

Re: xorg-server compilation

2010-01-19 Thread Bernd Petrovitsch
On Die, 2010-01-12 at 19:34 +0530, Niamathullah sharief wrote: Hello. I am trying to compile xorg-server for arm board. By that time i got a erro as [code]checking for GL... configure: error: Package requirements (glproto = 1.4.9 gl = 7.1.0) were not met: No package 'gl' found Consider

Re: Clear screen from the kernel

2010-01-15 Thread Bernd Petrovitsch
Hi! On Fre, 2010-01-15 at 03:47 +1100, Microbit_Ubuntu wrote: [...] Having dug around more, I am now getting the impression that my problem is actually NOT getting console tty1 output to my serial ttyS0... Eg. after boot, I login on ttyS0, ok, I get prompt. If I then login from tty1 (the

Re: Clear screen from the kernel

2010-01-14 Thread Bernd Petrovitsch
On Mit, 2010-01-13 at 19:05 -0300, Diego Woitasen wrote: Hi, I want to clear the console before a printk() call. Is there a funcion in the kernel API to do it? No, because the console can be your ordinary Linux console or over the network or over a serial line. You could look up the control

Re: Clear screen from the kernel

2010-01-14 Thread Bernd Petrovitsch
Hi! On Fre, 2010-01-15 at 00:24 +1100, Microbit_Ubuntu wrote: [...] I can't seem to find any reference to getting *both* the ordinary AND the serial line to work. The first few paragraphs of http://www.mjmwired.net/kernel/Documentation/serial-console.txt describes this IMHO. I didn't try it

Re: Out of memory vs memory leak

2010-01-08 Thread Bernd Petrovitsch
On Don, 2010-01-07 at 20:34 +0530, Anand Raj Manickam wrote: I have a few doubts regarding Out of Memory . 1.Does memory leak in the kernel always lead to OOM ? If the leaking code is occasionally used, it's just a question of time. 2. I wrote a kernel test module testing the memory leak ,

Re: question about __v annotation

2010-01-06 Thread Bernd Petrovitsch
On Mon, 2010-01-04 at 11:46 -0500, Greg Freemyer wrote: On Sat, Jan 2, 2010 at 8:10 AM, Shawn cit...@gmail.com wrote: hello guys, I got a newbie confused when I was looking into the source code of s3c2440's RTC driver.I dont know what is __v excatly means.anyone can tell?thanks

Re: question about __v annotation

2010-01-05 Thread Bernd Petrovitsch
On Mon, 2010-01-04 at 15:47 -0800, Greg KH wrote: On Mon, Jan 04, 2010 at 03:32:07PM -0800, Bruce Blinn wrote: [...] On Sat, Jan 02, 2010 at 09:10:08PM +0800, Shawn wrote: hello guys, I got a newbie confused when I was looking into the source code of s3c2440's RTC driver.I dont

Re: What Char encoding type is used in EXT4?

2009-12-18 Thread Bernd Petrovitsch
On Fre, 2009-12-18 at 11:45 +0530, Indraneel Mukherjee wrote: What's the char encoding type used to store file names on EXT4 filesystem - UTF8, UTF16 or UTF32? All or none - depending on how you interpret it: The kernel uses the byte sequence you pass as the filename. If it's in UTF-8, UTF-16,

Re: cloud computing

2009-11-30 Thread Bernd Petrovitsch
On Wed, 2009-11-25 at 20:39 +0800, Pei Lin wrote: 2009/11/25 Bernd Petrovitsch be...@luga.at: On Wed, 2009-11-25 at 00:09 +0800, Pei Lin wrote: i am just concerned about the security of cloud computing or distributed computing. if a hacker attacks one nodes of the computing servers

Re: data structure initialization

2009-11-27 Thread Bernd Petrovitsch
On Fri, 2009-11-27 at 18:07 +0530, Anuz Pratap Singh Tomar wrote: On Fri, Nov 27, 2009 at 5:56 PM, Bernd Petrovitsch be...@firmix.at wrote: On Fri, 2009-11-27 at 17:50 +0530, Anuz Pratap Singh Tomar wrote: [...] I have came across, this kind of structure

Re: cloud computing

2009-11-24 Thread Bernd Petrovitsch
On Wed, 2009-11-25 at 00:09 +0800, Pei Lin wrote: i am just concerned about the security of cloud computing or distributed computing. if a hacker attacks one nodes of the computing servers, the all nodes which connect with it will get the wrong results. If you are upload your data somewhere,

RE: Whats is the operator ##

2009-10-28 Thread Bernd Petrovitsch
On Wed, 2009-10-28 at 14:02 +0530, Rajat Jain wrote: Concatenation. The C Programming Language. To be more precise: look for it in the preprocessor description [ Fullquote about ## delted ] Please don't fullquote. It's plain simply bad email style (because it make mails unreadable).

Re: how to pass the content of a file to kernel driver

2009-10-07 Thread Bernd Petrovitsch
On Wed, 2009-10-07 at 14:06 +0800, vichy wrote: Dear all: I try to pass the content of file,1G, to kernel driver for operation How? With which sys-calls? and then return the result back to application. My questions are: 1. The only way I can use is copy_from_user? If so, does it have the

Re: Ip address assignment

2009-09-08 Thread Bernd Petrovitsch
On Tue, 2009-09-08 at 01:10 -0700, Vivek Subbarao wrote: [...] The ip address assigned through ifconfig is not persistent. Why is the behaviour so? Instead of editing files to add persistent addresses why not make ifconfig add persistent addresses? Is there a drawback to this? - It's not the

Re: pr_debug and if (0) statement

2009-09-02 Thread Bernd Petrovitsch
On Wed, 2009-09-02 at 13:31 +0530, Anuz Pratap Singh Tomar wrote: that part of code wont be executed. Please don't top-post. Then why not simply use do { } while (0) or similar? [ On Wed, Sep 2, 2009 at 1:24 PM, luca ellero lro...@libero.it wrote: [...] can someone please explain

Re: pr_debug and if (0) statement

2009-09-02 Thread Bernd Petrovitsch
On Wed, 2009-09-02 at 15:17 +0530, Anuz Pratap Singh Tomar wrote: On Wed, Sep 2, 2009 at 2:30 PM, Bernd Petrovitsch be...@firmix.at wrote: On Wed, 2009-09-02 at 13:31 +0530, Anuz Pratap Singh Tomar wrote: that part of code wont be executed. [...] Then why

Re: memcpy

2009-08-27 Thread Bernd Petrovitsch
On Mit, 2009-08-26 at 17:18 -0500, Stoyan Gaydarov wrote: I wanted to know what memcpy returned as a result, and if it needs/should be checked. There are several places in the kernel where i It is IMHO agreed concensus that kernel-implementations of well-known (and especially C-library)

Re: TEST

2009-07-08 Thread Bernd Petrovitsch
Hi! On Wed, 2009-07-08 at 18:39 +0530, Mohamed Thalib H wrote: TEST Ever read the second paragraph of http://www.kernel.org/pub/linux/docs/lkml/#s3 ? Bernd -- Firmix Software GmbH http://www.firmix.at/ mobil: +43 664 4416156 fax: +43 1 7890849-55

Re: Is drivers' open() method get called while fork or dup fd?

2009-04-20 Thread Bernd Petrovitsch
On Fre, 2009-04-17 at 19:36 +0800, yihect wrote: [...] Yes, I think , it's normally thinked as a generic rule to do kernel programming like that way you mentioned. But if we take no account of these, do you know the answer of my question, is the open() method got called in fork() and

Re: Blind Mailing List

2009-04-20 Thread Bernd Petrovitsch
On Don, 2009-04-16 at 18:49 -0500, Vinny Badrinathan wrote: [...] Is there a particular reason why this isn't a blind list? I'm probably using the wrong term here so I'll describe it: the reader can see the senders screename but when the reader wants to reply or reply Please explain

Re: Question about C Programming.

2009-03-05 Thread Bernd Petrovitsch
On Thu, 2009-03-05 at 09:28 +, Srdjan Todorovic wrote: [...] 2009/3/5 Anuz Pratap Singh Tomar chambilketha...@gmail.com: is this question relevant to this community? you should try comp.lang.c. Actually, it might be (as long as KernelNewbies isn't restricted to the *Linux* kernel)...

Re: strlen-like function for pointers? ptrlen?

2009-02-24 Thread Bernd Petrovitsch
On Tue, 2009-02-24 at 20:24 +0800, Nelson Castillo wrote: Hi there. Is there a strlen-like function for pointers? I have this code: struct ts_filter_api **api_r = api; int count = 0; /* find out how many filters we need to create */ while (*api_r) { count++; api_r++; } and I

Re: uninstalling a kernel

2009-02-12 Thread Bernd Petrovitsch
On Thu, 2009-02-12 at 18:23 +0530, Raseel Bhagat wrote: On Thu, Feb 12, 2009 at 6:10 PM, Venkatesh Rao venkateshn...@gmail.com wrote: i have the following kernels on my machine [r...@localhost boot]# ls -lsa total 18481 2 drwxr-xr-x 4 root root

Re: uninstalling a kernel

2009-02-12 Thread Bernd Petrovitsch
On Thu, 2009-02-12 at 18:47 +0530, Venkatesh Rao wrote: [...] then did make clean make mrproper Just for the archives: `make clean` is a true subset of `make mrproper` Bernd -- Firmix Software GmbH http://www.firmix.at/ mobil: +43 664 4416156 fax:

Re: gettimeofday segfaults with malloc but not calloc

2009-01-13 Thread Bernd Petrovitsch
On Tue, 2009-01-13 at 10:51 +0100, Henrik Austad wrote: I'm using gettimeofday to get the most accurate time from the kernel When I use calloc to create and initalize memory for the struct timeval *tv, everything works fine: struct timeval *tv; tv = (struct timeval *)calloc(1,

Re: mmap()

2009-01-05 Thread Bernd Petrovitsch
On Mon, 2009-01-05 at 20:26 +0530, niamathullah sharief wrote: I was very much confused in mmap()...i done gooling...but cant understand clearly...so can anyonr tell me what are all the parameters indicates and how it works.. The manual page tells you all of that. Bernd --

Re: fork system call

2008-12-29 Thread Bernd Petrovitsch
Hi! On Mon, 2008-12-29 at 01:49 +0530, Shyam Burkule wrote: [...] In windows basic execution unit is thread, and Linux does not differentiate between thread and process( I mean Linux doesn't give It does as there exists various thread implementations. For tasks, read another mail in

Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Bernd Petrovitsch
On Mon, 2008-09-29 at 12:42 +0530, nidhi mittal wrote: Hi all its a very basic ques may be for many of you .but i have this confusion from long that is. when we say this application is 32 bit application or 64 bit what do we mean by that is it processor which is 32 bit or 64 bit

Re: 32 bit and 64 bit---- doubt

2008-09-29 Thread Bernd Petrovitsch
On Mon, 2008-09-29 at 17:38 +0530, Pranav Peshwe wrote: On Mon, Sep 29, 2008 at 2:38 PM, Bernd Petrovitsch [EMAIL PROTECTED] wrote: snip 2. Does it have some relation that in windows in C language int size According to the C standard, sizeof(int) is the native

Re: How to apply patches before building kernel

2008-09-24 Thread Bernd Petrovitsch
On Wed, 2008-09-24 at 19:29 +0530, amit mehta wrote: [...] I'm trying to build linux kernel for version 2.6.24 on a machine running suse. so i downloaded the kernel soruces and patches from : ftp://ftp.kernel.org/pub/linux/kernel/v2.6/ I've downloaded following two compressed files:

Re: Server with huge memory

2008-09-22 Thread Bernd Petrovitsch
On Mon, 2008-09-22 at 07:54 +0900, MinChan Kim wrote: * Rik van Riel ([EMAIL PROTECTED]) wrote: [] The second option is to rewrite part of the VM so less metadata is kept for page cache. Specifically, you will have to write code to reclaim buffer heads from page cache pages. Do

Re: Server with huge memory

2008-09-22 Thread Bernd Petrovitsch
On Mon, 2008-09-22 at 07:03 -0300, Edesio Costa e Silva wrote: On Mon, Sep 22, 2008 at 10:53:38AM +0200, Bernd Petrovitsch wrote: On Mon, 2008-09-22 at 07:54 +0900, MinChan Kim wrote: * Rik van Riel ([EMAIL PROTECTED]) wrote: [] The second option is to rewrite part of the VM so

Re: Server with huge memory

2008-09-18 Thread Bernd Petrovitsch
On Wed, 2008-09-17 at 17:52 -0300, Edesio Costa e Silva wrote: Hi Folks! I am running Linux 32 bits (2.6.26.5-bigsmp) on a virtual machine with 64 GB of RAM. When I try to create a large file, for example dd if=/dev/null of=/tmp/huge.file bs=1024k count=65536 the machine hangs when the file

Re: where is static variable stored ?

2008-09-17 Thread Bernd Petrovitsch
On Wed, 2008-09-17 at 18:26 +0530, Sunil wrote: [...] This may not exactly be a kernel question, but giving a try. Yes, it's a pure C question. static variables if defined inside a function, it is defined once and retain values across function calls, so its like global variable in this

Re: Multiple Data Streams

2008-08-20 Thread Bernd Petrovitsch
On Mon, 2008-08-11 at 11:31 +0200, Rene Herman wrote: On 11-08-08 10:02, Rohit Sharma wrote: What all possible use cases are there for multiple data stream? ( apart from spy wares and other destructive uses ) As in filesystem forks? The most convincing one I feel is video, or more

Re: Bitwise operations in Linux Kernel

2008-07-29 Thread Bernd Petrovitsch
On Mon, 2008-07-28 at 14:47 -0700, Balraj Dahiya wrote: [...] First, don't hijack threads with a completely unrelated issue. So don't press Reply but write a new mail and copy the email address (or delete all References and especially In-Reply-To headers). I started reading kernel source

Re: soft vs hard real-time?

2008-07-15 Thread Bernd Petrovitsch
On Tue, 2008-07-15 at 08:52 +0200, Roberto A. Foglietta wrote: 2008/7/14 Bernd Petrovitsch [EMAIL PROTECTED]: On Mon, 2008-07-14 at 20:47 +0200, Roberto A. Foglietta wrote: 2008/7/14 Robert P. J. Day [EMAIL PROTECTED]: is there a good online explanation of the difference WRT linux

Re: soft vs hard real-time?

2008-07-14 Thread Bernd Petrovitsch
On Mon, 2008-07-14 at 16:48 -0400, Robert P. J. Day wrote: On Mon, 14 Jul 2008, Bernd Petrovitsch wrote: As for the Linux kernel: - soft realtime: Posix-RT-Priorities is probably good enough. - hard real-time: you need (at least) RTAI or RTLinux. probably a stupid question, but where

Re: A interesting problem of C programming

2008-06-18 Thread Bernd Petrovitsch
On Mit, 2008-06-18 at 16:14 +0530, ershaad ahamed wrote: A quick google got me this http://www.ciselant.de/projects/gcc_printf/gcc_printf.html seems its a feature of gcc. In certain circumstances it optimizes the printf call to a puts call. While printf behaves nicely and prints

Re: ioctl argument

2008-06-18 Thread Bernd Petrovitsch
On Mit, 2008-06-18 at 14:29 +0200, Belisko Marek wrote: Hi, How to pass an array of char via ioctl (not via write method ) to kernel from user space? I define unigue IOCTL cmd #define LED_SET_STATE _IOW(LED_MAGIC,1, leds) and leds should be an array from userspace. In the ioctl()

Re: list of fuctions defined and exported by a library

2008-06-17 Thread Bernd Petrovitsch
On Die, 2008-06-17 at 17:28 +0530, Rahul Ramasubramanian wrote: i have decided to take a round about way... i am implementing a parser which reads the header files (/only th e external headers) and At the very least, you need to do it after the preprocessor stage as in theory one can construct

Re: Help needed in deciphering strace Output

2008-06-05 Thread Bernd Petrovitsch
On Don, 2008-06-05 at 17:29 +0530, Peerless Deepak wrote: Hello All, I am running a snmp application and it gets crashed even before it gets loaded in to the memory. Probably not as this is a prerequisite to actually run the application. I am pasting below the last few lines of strace

Re: [Bulk] Re: fork and exec

2008-05-25 Thread Bernd Petrovitsch
On Sat, 2008-05-24 at 15:39 -0400, Greg Freemyer wrote: [] I also think it is useful to realize that UNIX was basically designed for systems that have a MMU even though low-end systems in the late 70s / early 80s did not have them. The first ones (also before) didn't have a MMU and the

Re: [Bulk] Re: fork and exec

2008-05-25 Thread Bernd Petrovitsch
On Sun, 2008-05-25 at 11:26 -0400, Greg Freemyer wrote: On Sun, May 25, 2008 at 8:23 AM, Bernd Petrovitsch [EMAIL PROTECTED] wrote: On Sat, 2008-05-24 at 15:39 -0400, Greg Freemyer wrote: [] I also think it is useful to realize that UNIX was basically designed for systems that have

Re: [Bulk] Re: fork and exec

2008-05-25 Thread Bernd Petrovitsch
On Sun, 2008-05-25 at 12:46 -0400, Greg Freemyer wrote: On Sun, May 25, 2008 at 11:48 AM, Bernd Petrovitsch [EMAIL PROTECTED] wrote: On Sun, 2008-05-25 at 11:26 -0400, Greg Freemyer wrote: On Sun, May 25, 2008 at 8:23 AM, Bernd Petrovitsch [EMAIL PROTECTED] wrote: On Sat, 2008-05-24

Re: Why two stacks per process?

2008-04-24 Thread Bernd Petrovitsch
On Don, 2008-04-24 at 18:52 +0200, Michael Blizek wrote: On 17:49 Thu 24 Apr , Bernd Petrovitsch wrote: On Don, 2008-04-24 at 17:08 +0200, Michael Blizek wrote: It is not just cleaning the stack up. You have to make sure that no other thread in the userspace accesses it. This means

Re: unclean root file-system after shutting down from single-user-mode

2008-02-14 Thread Bernd Petrovitsch
On Don, 2008-02-14 at 14:35 +0100, Thomas De Schampheleire wrote: On Thu, Feb 14, 2008 at 2:22 PM, Pravin [EMAIL PROTECTED] wrote: [] But my only concern is that Will it affect the performance.. ?? I mean now I will be having one extra process with my application which will need some

Re: Question on Memory Leaks in Module

2008-01-23 Thread Bernd Petrovitsch
On Mit, 2008-01-23 at 18:31 +0530, Manish Katiyar wrote: [...] So If i do a kzalloc() in my module and then unload my module without freeing it, it will be a memory leak...Am i right ?? .. Or the Yes. kernel is intelligent enough to check and free those memory buffers during unload

Re: Any one have experience about TCP/UDP develepment in LINUX kernel space.

2007-11-09 Thread Bernd Petrovitsch
On Fri, 2007-11-09 at 10:17 +0800, Tang Rui wrote: [...] I want to develop a TCP/UDP daemon in LINUX kernel-space, I use this demon to receive data from specified ip port, and then injector the data to another driver or device. Most of cases, we can use user-space socket interface to

Re: problem with linux booting

2007-10-19 Thread Bernd Petrovitsch
On Fre, 2007-10-19 at 15:54 +0530, rahul yadav wrote: [...] I am a beginner in the linux kernel programming. In fact I have to start it. I have 2 problems: 1. As a beginner i downloaded a kernel(2.6.15.1) from the internet(www.kernel.org) and then compiled it got an image of size aroung

Re: How to use the entire harddisk?

2007-10-03 Thread Bernd Petrovitsch
On Mit, 2007-10-03 at 09:33 +0800, Peter Teoh wrote: My current harddisk is partitioned in the following manner. The number of cylinder max is supposed to be 60801, but the extended partition max out to 46688 only. fdisk does not allow me to create any more primary, and I cannot convert

Re: How to use the entire harddisk?

2007-10-03 Thread Bernd Petrovitsch
Grrmmbl: On Mit, 2007-10-03 at 09:52 +0200, Bernd Petrovitsch wrote: On Mit, 2007-10-03 at 09:33 +0800, Peter Teoh wrote: My current harddisk is partitioned in the following manner. The number of cylinder max is supposed to be 60801, but the extended partition max out to 46688 only

Re: allocation of four dimensional array memory

2007-09-30 Thread Bernd Petrovitsch
On Sun, 2007-09-30 at 18:12 +0200, Michael Blizek wrote: Hi! I'm assuming you're working in userspace, since the memory allocation Which leads to the obvious question: What's the relevance of the question to the Linux kernel? function in the kernel is kmalloc. On Sat, 2007-09-29 at 16:49

RE: Behaviour of select in multi-threaded env

2007-07-19 Thread Bernd Petrovitsch
On Thu, 2007-07-19 at 15:18 +0530, Gaurav Aggarwal wrote: From: Bernd Petrovitsch [mailto:[EMAIL PROTECTED] Sent: Thursday, July 19, 2007 2:12 PM To: Gaurav Aggarwal Cc: kernelnewbies@nl.linux.org Subject: Re: Behaviour of select in multi-threaded env On Wed, 2007-07-18 at 21:25 +0530