access_ok

2010-10-10 Thread Onkar Mahajan
What is the significance of access_ok macro ? I see that it's defined in linux-2.6.34/include/asm-generic/uaccess.h as : #define access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size))#define access_ok(type, addr, size) __access_ok((unsigned long)(addr),(size)) /* * The

Re: access_ok

2010-10-10 Thread Mulyadi Santosa
Hi Onkar... On Sun, Oct 10, 2010 at 14:47, Onkar Mahajan kern.de...@gmail.com wrote: What is the significance of access_ok macro ? I see that it's defined in linux-2.6.34/include/asm-generic/uaccess.h as : I vaguely recall, it is used in places like copy_from_user. The macro check whether the

Re: Reading TLB Entries

2010-10-10 Thread Dragos Tatulea
Hi, Is there any means to read TLB entries ? I don't think you can do it on x86. TLB (for x86) is done completely in hardware.. The only thing sw. can do is invalidate entries. Check out the x86 System Programming Guide part 1, chapter 4.10. This approach is different on MIPS, SPARC, PPC where

__chk_user_ptr : How does it work ?

2010-10-10 Thread Onkar Mahajan
#ifdef __CHECKER__ # define __user__attribute__((noderef, address_space(1))) # define __kernel__attribute__((address_space(0))) # define __safe__attribute__((safe)) # define __force__attribute__((force)) # define __nocast__attribute__((nocast)) # define __iomem

Re: access_ok

2010-10-10 Thread mohit verma
Hi Onkar, i hope this may help u (as Mulyadi also explained) * access_ok: - Checks if a user space pointer is valid 63 * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE. Note that 64 *%VERIFY_WRITE is a superset of %VERIFY_READ - if it is safe 65 *to write to a

Re: Laptop extras for unsupported laptop brand

2010-10-10 Thread Ali Polatel
On Sun, 10 Oct 2010 08:29:52 +0700, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Sat, Oct 9, 2010 at 14:46, Ali Polatel a...@exherbo.org wrote: Hi everyone, I want to write laptop extras for my laptop¹ so that changing brightness of the screen etc. are supported by Linux. I am

Re: Problem regarding splitting and merging of bio's

2010-10-10 Thread Greg Freemyer
On Fri, Oct 8, 2010 at 4:32 AM, gaurav mahajan gauravmahajan2...@gmail.com wrote: Hi, I'm new to kernel coding and I have this doubt. I'm trying to write a simple dm-target which will concatenate devices and perform io operations on it. That seems like the normal LVM2 functionality. You

Re: Laptop extras for unsupported laptop brand

2010-10-10 Thread Mulyadi Santosa
Hi Ali... On Sun, Oct 10, 2010 at 23:09, Ali Polatel a...@exherbo.org wrote: Well xbacklight doesn't work at all on this box: $ xbacklight No outputs have backlight property Great :( Well, perhaps the first thing you need to do is see the complete output of lshw and then discuss it with

Re: the speed of file read write on USB

2010-10-10 Thread loody
Dear all: I am so SORRY that I send the mail before I finish it, since I finger flip over the send button. SORRY~~~ i write a simple program as below to count the speed of writing a file over usb, gettimeofday before writing and gettimeofday when finish writing. but I found something make me

Re: Reading TLB Entries

2010-10-10 Thread Rik van Riel
On 10/10/2010 08:33 AM, Dragos Tatulea wrote: Is there any means to read TLB entries ? I don't think you can do it on x86. TLB (for x86) is done completely in hardware.. Even if you theoretically could, the act of calling a hypothetical TLB reading function would cause mappings of other code

Re: __chk_user_ptr : How does it work ?

2010-10-10 Thread Dave Hylands
On Sun, Oct 10, 2010 at 5:51 AM, Onkar Mahajan kern.de...@gmail.com wrote: #ifdef __CHECKER__ # define __user        __attribute__((noderef, address_space(1))) # define __kernel    __attribute__((address_space(0))) # define __safe        __attribute__((safe)) # define __force   

Re: Reading TLB Entries

2010-10-10 Thread Mulyadi Santosa
On Mon, Oct 11, 2010 at 04:33, Rik van Riel r...@surriel.com wrote:  On 10/10/2010 08:33 AM, Dragos Tatulea wrote: Even if you theoretically could, the act of calling a hypothetical TLB reading function would cause mappings of other code to be evicted from the TLB :) Rik, you always surprise

Re: multiboot compliancy of vmlinuz-2.6.34

2010-10-10 Thread Prabhu nath
Then, what is the interface specification to which both Linux and Grub comply to. How does Grub load the linux kernel to the memory and initiate execution of the Kernel code. Thanks, Prabhu On Wed, Oct 6, 2010 at 9:08 PM, Philip Downer p...@pjd.me.uk wrote: Prabhu nath wrote: I

Working with Ubuntu Linux

2010-10-10 Thread Rags Linux
Hi All, I have installed WinXp (32 Bit), Windows 7 (64 Bit) and Ubuntu (10.4) on my Pentium i5 machine. My monitor is Dell 2010M flat 20 inch wide screen. When I boot Ubuntu I dont see the classic messages I used to see something like below: Starting Crond [OK] Starting Keboard [FAILED] Has

Re: Reading TLB Entries

2010-10-10 Thread Prabhu nath
Yes please. Nice to have your say on this. Thanks, Prabhu On Mon, Oct 11, 2010 at 9:37 AM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: On Mon, Oct 11, 2010 at 04:33, Rik van Riel r...@surriel.com wrote: On 10/10/2010 08:33 AM, Dragos Tatulea wrote: Even if you theoretically could,

Re: Working with Ubuntu Linux

2010-10-10 Thread Mulyadi Santosa
Hi. On Mon, Oct 11, 2010 at 11:18, Rags Linux linux.r...@gmail.com wrote: Hi All, I have installed WinXp (32 Bit), Windows 7 (64 Bit) and Ubuntu (10.4) on my Pentium i5 machine. My monitor is Dell 2010M flat 20 inch wide screen. No offense, but try to think: by saying your monitor

Re: Reading TLB Entries

2010-10-10 Thread Mulyadi Santosa
Hi On Mon, Oct 11, 2010 at 11:30, Prabhu nath gprabhun...@gmail.com wrote: Yes please. Nice to have your say on this. Please don't top post :) First, do you know what TLB is? It caches latest address translation, correct? Thus, by doing the function call, it is likely that new virtual address

Re: Working with Ubuntu Linux

2010-10-10 Thread Rags Linux
Hi, Thanks... U mean to say I have to try other consoles? F3, F4, etc? Now, If I build my new Kernel and boot that Kernel, What all features I would get? What all features are part of the Kernel? Thanks and Regards, Raghunand. On Mon, Oct 11, 2010 at 10:02 AM, Mulyadi Santosa

Re: Working with Ubuntu Linux

2010-10-10 Thread John Mahoney
On Mon, Oct 11, 2010 at 12:18 AM, Rags Linux linux.r...@gmail.com wrote: Hi All, I have installed WinXp (32 Bit), Windows 7 (64 Bit) and Ubuntu (10.4) on my Pentium i5 machine. My monitor is Dell 2010M flat 20 inch wide screen. When I boot Ubuntu I dont see the classic messages I used to

Re: Working with Ubuntu Linux

2010-10-10 Thread Rags Linux
Thanks John. Yea sorry its Ctrl + Alt and not Ctrl + Shift. However, This ain't working for me. My monitor goes blank and goes to sleep mode as though the monitor is switched off. Thanks and Regards, Raghunand. On Mon, Oct 11, 2010 at 10:43 AM, John Mahoney jmaho...@waav.com wrote: On Mon,

Linux free memory

2010-10-10 Thread Zahari Doychev
Hi, how can I get the free memory in Linux? I am not quite sure but I am looking at the MemFree, Buffers and Cached fields in /proc/meminfo. They should give me the actual free memory. I am having embedded system without swap and I have conditions when Buffers go to zero. The system seems to