Linux kernel, Linux general

About the last page of file reading in the user space

Submitted by Anonymous
on June 7, 2009 - 7:29pm

1. If some file's size is 5000 Bytes, then the first 4096 Bytes are read by the first page, the remaining 4 Bytes are read by the second page. What is fetched in the left 4092 Bytes in the second page space?

2. How can I check the offset of the data (eg. the remaining 4 Bytes's location)
I found there is a macro named "bio_offset", but it's parameter is bio, not page.

programming kernel.

Submitted by rufa
on June 5, 2009 - 3:38pm
Linux

hi, i want to dispaly the field nfmark of the struct net_device after marked it withe iptables:

iptbles -i mangle -A PREROUTING -p icmp -j MARK --set-mark 5

i whrit : printk("%u", skb->nfmark);

thank you.

3/1 memory split

Submitted by TragicWarrior
on June 4, 2009 - 9:43pm
Linux

On i386 archs, there was a 3/1 (or optionally 2/2) memory split for process images. Is there a memory split on x86-64? How much memory reserved/accessible to the kernel?

Tracking kernel memory usage

Submitted by TragicWarrior
on June 4, 2009 - 6:13pm
Linux

Is there an equivalent to "top" which shows how much memory the kernel is using of it's 1GB? I know that /proc/buddyinfo provides some insight into this, but I haven't found any tool that offers "human-readable" information.

How does Arm Processor Knows the page is present in the memory : pte_present

Submitted by Vijayendra suman
on June 4, 2009 - 7:56am
Linux

Hello All,

I want to know a information regarding ARM processor, I have enabled swap partition for while compiling the kernel.

I want to know how does the H/W knows the page is not present in the RAM so that it raises an exception which makes it to copy from the swap if the page is swapped out.

I know there is a bit pgd_t pte_present, But I am not sure

1) who updates this bit

sata_via causes emask timeout

Submitted by Anonymous
on June 1, 2009 - 11:09am
Linux

I have a system that uses sata_via and sr_mod for my cd-drive. This causes the following problem:
Apr 16 08:21:43 (none) kernel: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
Apr 16 08:21:43 (none) kernel: ata1.00: cmd a0/01:00:00:10:f8/00:00:00:00:00/a0 tag 0 dma 63504 out
Apr 16 08:21:43 (none) kernel: cdb 2a 00 00 00 19 a1 00 00 1b 00 00 00 00 00 00 00

detects the msg as spam

Submitted by Anonymous
on June 1, 2009 - 8:22am
Linux

Well, I am having problem in writing msg on this forum. As it detect my simple text msg as spam. And now its saying the msg from this IP address are automatically blocks and reported as spam.

what should be done?

Dhawal.

User application(ftp) causing OOM

Submitted by Anonymous
on May 30, 2009 - 3:22am
Linux

am using 2.6.12.6 kernel on my embedded system with 32Mb SDRAM and
no swap partition. My embedded system has support of FTP server and
USB mass-storage. Now I try to put a large file (>50MB) from windows
machine (connected via ethernet to Linux s/s running FTP server) onto
the flash drive which is attched via USB. Sometimes the file transfer
suceedes but most of the time the OOM comes.

sys_open sys_read ...... syscalls

Submitted by Anonymous
on May 29, 2009 - 9:17am
Linux

Hello everybody,

I am using system calls in my kernel modules. It was working fine when i was using kernel version 2.6.20. However, since I have update my kernel to 2.6.27. It complains about those (sys_open, sys_read) symbols.

using this article as reference ....

http://www.linuxjournal.com/article/8110

Any ideas ! !

Dhawal.

porting variable with double data type to linux kernel 2.6.9

Submitted by jpos_2008
on May 28, 2009 - 9:10am
Linux

Hi All,

I am currently doing porting work from CAVIUM based code to linux 2.6 kernel. As per my requirement I have to port the below piece of code to linux 2.6.9

----------------------------------------

void NHNPGetNTPTime(struct timeval strTv, unsigned long *ntpLsw, unsigned long *ntpMsw)

{

#ifdef CAVIUM
double dLsw;

kernel on behalf of sleeping process

Submitted by Anonymous
on May 27, 2009 - 7:37am
Linux

Hi,

I was doing some debugging of my Linux-based target.

The PC value showed that the function executing is do_futex. I derived the thread_info and
task_struct pointers of "current" using the value of kernel stack-pointer.

The state field of task_struct showed that the process is in state TASK_UNINTERRUPTIBLE.

kernell command line

Submitted by dmg
on May 25, 2009 - 8:51am
Linux

Hi,

I've put the linux to the embedded device. It use RedBoot bootloader to load the kernel and I can't change command line parameters that are provided to the kernel.

Now the params are: console=ttyS0,38400

What I need is: console=ttyS0,38400 root=/dev/mtdblock2 ro

How to extract a shellcode from LKM properly using objdump

Submitted by Anonymous
on May 23, 2009 - 9:30pm
Linux

Hello,

I'm trying to dump a byte code from binary kernel module using objdump:

# objdump -D modul.ko

//Only important parts

modul.ko: file format elf32-i386

Disassembly of section .text:

00000000 :
0: 83 ec 04 sub $0x4,%esp
3: 64 a1 00 00 00 00 mov %fs:0x0,%eax
9: 8b 80 08 01 00 00 mov 0x108(%eax),%eax

How to test

Submitted by veeraiyan
on May 23, 2009 - 8:44am
Linux

Hi

guys i implemented new scheduler in the kernel-2.6.29 how to test the performance of the scheduler .can any one me
plz

Unknown symbol security_file_lock

Submitted by Anonymous
on May 22, 2009 - 6:34pm
Linux

Hi, I was trying to make my own filesystem module and I get this error when I try to compile it under vanilla kernel 2.6.24.

Note: I compiled under 2.6.19 to 2.6.23 and I don't get this error

>> Compilation:
WARNING: "security_file_lock" [/home/debian/myfs/myfs.ko] undefined!

>> Loading module (insmod myfs.ko):
[ 3326.280882] myfs: Unknown symbol security_file_lock