The HyperNews Linux KHG Discussion Pages

Idea: Creating a new sytem call: solution

Forum: The Linux Kernel Hackers' Guide
Re: Question Problem creating a new system call
Date: Sun, 12 Oct 1997 06:32:03 GMT
From: C.H.Gopinath <[email protected]>

The problem is using printk, it won't print on the stdout,
it will be stored in the buffers. If you want the data
to be displayed on the stdout use

	sys_write(1,ptr,len);

where ptr is the string to be displayed and len is its length.

Using this you can check your sys call is created or not.

But regarding assigning a value to a global variable or local
variable i don't know. I am also struggling for the past
one week. I tried to assign and print a string in the system
call. It is compiling without any problem butwhen i try to
execute that, at the assignment it is giving

General Protection:000
and then dumping all the register values with Segmentation
Fault.

Can cny body explain why it is happeing like this.

By the by is there any kernel debugging tool for 4.2 kernel,
if so can anybody please give pointers for that.

Thanx in advance,
			--
				C.H.Gopinath
				[email protected]


Messages

1. Feedback: Kernel Debuggers for Linux by sauru newest