Re: strange behaviour in syscall
> > Hello, > I know that this is a newbies question, but I didn't get any > answer in the newbies list, so I am posting it here. > > In 2.2.14, I have implemented a set of system calls(This is just > academic). The numbers are from 191 - 196. (The virgin source tree has > up to 190 in entry.S). I have given a printk in the system call proper in > the last one(196),(and at many other places in the call chain from there). > (Is it fair to use those syacall numbers ?) > > But when I boot up that kernel that printk gets executed. While > booting, at least to my knowledge, that part of the code is not supposed > to get executed. Also while the kernel goes down, that printk speaks > again. To clarify a bit, lately I have replaced the 196 th. call by 191, and removed the earlier 191 st. call, now the message is not appearing. My guess is some interrupt is getting vectored in 196 th entry point, but I am totally in dark as to why such a thing might at all happen. Thanks sourav > > All other system calls are working fine. > > I am getting some oops and panic while that syscall executes, so I > am suspicious that I am doing something that I should never have done. > > Do anybody has any idea what might be going wrong? > > Sorry to you all for disturbing, > > -- > sourav > > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
strange behaviour in syscall
Hello, I know that this is a newbies question, but I didn't get any answer in the newbies list, so I am posting it here. In 2.2.14, I have implemented a set of system calls(This is just academic). The numbers are from 191 - 196. (The virgin source tree has up to 190 in entry.S). I have given a printk in the system call proper in the last one(196),(and at many other places in the call chain from there). (Is it fair to use those syacall numbers ?) But when I boot up that kernel that printk gets executed. While booting, at least to my knowledge, that part of the code is not supposed to get executed. Also while the kernel goes down, that printk speaks again. All other system calls are working fine. I am getting some oops and panic while that syscall executes, so I am suspicious that I am doing something that I should never have done. Do anybody has any idea what might be going wrong? Sorry to you all for disturbing, -- sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
atomic_set(skb_datarefp(skb),1)
Hi, I am extremely sorry to bother this group with this message. But I am really unable to understand the following. So it would be very kind of you if you clarify this. In 2.2.16, in the function alloc_skb(), atomic_set(skb_datarefp(skb),1) is there. Now skb_datarefp() returns skb->end casted in (atomic_t *) type. And atomic_set here setting it to 1. But before atomic_set() is called in alloc_skb(), skb->end is set to data+size. Now my question is what is the purpose of calling atomic_set()? regards sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
kernel panic on 2.2.16
Hi, I was running 2.2.14 and compiled 2.2.16. I turned all the hacking options on. While booting 2.2.16 it said the following: VFS: Cannot open root device 03:03 Karnel Panic: VFS : Unable to mount root fs on 03:03 I am unable to understand whats going wrong. Plz. help. thanks sourav SOURAV SENMSc(Engg.) CSA IISc BANGALORE URL : www2.csa.iisc.ernet.in/~sourav --- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
2.4.2-ac
Hi, I have patched 2.4.2 with patch-2.4.2-ac9. At make xconfig turned all kernel hacking options on. Then make dep and make bzImage went on ok. But when I put the image path in lilo.conf and ran /sbin/lilo it said kernel /abc/pqr//vmlinux is too big. Whats going wrong. My gcc is egcs-2.91.66. The running kernel is 2.2.14-5.0. thanks sourav SOURAV SENMSc(Engg.) CSA IISc BANGALORE URL : www2.csa.iisc.ernet.in/~sourav ROOM NO : N-78 TEL :(080)309-2454(HOSTEL) (080)309-2906 (COMP LAB) "the fault, dear Brutas, lies not in our stars, but in our memory systems" -Shakespeare - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: sk_buff in 2.4.0
In the patch by David S. Miller, copy_from_user() is still there (Line 14360 in zerocopy-2.4.0-1.diff). So which copy is reduced? Can anyone explain kindly. thanks sourav On Mon, 5 Mar 2001, Albert D. Cahalan wrote: > > My question is: Is the state of the art same in 2.4.0, ie. is > > protocol header and data still has to reside contiguously? Or header and > > data may be non-contiguous and the driver does scatter/gather. > > > > I am starting off in 2.4.0 , plz. help. > > See the zero-copy patches by David S. Miller on ftp.kernel.org in > his personal directory. If I remember right, the name of the > directory is: /pub/linux/kernel/people/davem > > These patches are now in Alan Cox's patch sets. (the "ac" kernels) n> You may find Alan Cox's stuff in his personal directory ("alan") at > the same FTP site. > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
sk_buff in 2.4.0
Hi, As far as I understand, in 2.2.x networking code the protocol header and data used to reside in a contiguous region in memory(pointed to by the head, data, tail, end of sk_buff struct), ie skb->data is the starting point and skb->tail is the ending point. | | | | skb->data --|-- | | | | | | | | | | | skb->tail --|---| | | And the device drivers used to transfer from skb->data to skb->tail(==skb->len). My question is: Is the state of the art same in 2.4.0, ie. is protocol header and data still has to reside contiguously? Or header and data may be non-contiguous and the driver does scatter/gather. I am starting off in 2.4.0 , plz. help. -- sourav -------- SOURAV SENMSc(Engg.) CSA IISc BANGALORE URL : www2.csa.iisc.ernet.in/~sourav ROOM NO : N-78 TEL :(080)309-2454(HOSTEL) (080)309-2906 (COMP LAB) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
kiobuff
Hello, Can someone please give me some initial info or pointer regarding kiobuff, what is it all about and its purpose etc.. regards sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Module
Hi, I am facing problems in loading a module under 2.2.16. The actual kernel is 2.2.14 and it loads in it without any trouble, but when I run my unmodified kernel 2.2.16(I only patched the kdb patch with it and configured with all kernel hacking options on) and try to do a insmod, it says that it could not find the kernel the module was compiled for. I put the CONFIG_MODVERSIONS on(ie, included modversions.h) also included the specific version.h file. (I declared the __NO_VERSION__ before including module.h so that it does not include version.h). But still it does not work. Any idea whats going wrong? -sourav SOURAV SENMSc(Engg.) CSA IISc BANGALORE URL : www2.csa.iisc.ernet.in/~sourav ROOM NO : N-78 TEL :(080)309-2454(HOSTEL) (080)309-2906 (COMP LAB) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Kdb for modules
Hi, For using kdb I have done the following: 1) upgrade modutils using modutils-2.3.11-1.i386.rpm 2) patched the source using kdb-v0.6-2.2.13 as I am using linux-2.2.16.(I don't know, this kdb for 2.2.13 works for linux-2.2.16, I haven't used it extensively, so don't know whether it works correctly or not?, but I couldn't find kdb for 2.2.16 in SGI site, any clues in this is very much welcomed :)) so this works ... , But if I want to debug the modules, set breakpoints at, see the address of, module functions, what shall I have to do? I haven't found any clue on this as yet, Plz. help.. sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Re: is eth header is not transmitted
Ya, I also noticed if it is skb_push() it may work, but where is skb_push() called?? ... the following is part of the fn. call trace for udp send : in ip_build_xmit() sock_alloc_send_skb() -- allocates the sk_buff skb_reserve() -- advances the data pointer to by sizeof(hard_hdr) amt. skb_put() -- puts the ip_hdr >> getfrag() --> udp_getfrag_nosum()(assuming chksum off) -- sets udp_hdr. memcpy_fromiovecend() -- puts the data after that. r->u.dst.output() -- > dev_queue_xmit() -- queues the pkt. still the data ptr is after hh_hdr, ie. as follows : +--+ | hh_hdr | ip_hdr | udp_hdr | payload | +--+ ^^ ^ || | sk->head sk->data sk->end On a hadr_start_xmit(), ie say for rtl8129_start_xmit(), the data sending takes place from skb->data and not from head. So is hh_hdr not transmitted?? Another question is why in sock_alloc_send_skb() , 15 is added to length field? Sorry to disturb u like this :) sourav On Thu, 4 Jan 2001, Andi Kleen wrote: > On Thu, Jan 04, 2001 at 09:08:06AM +0530, Sourav Sen wrote: > > > > Hi, > > How can it be skb_put(), it only increments the tail/len ptr ?? > > Oops typo, it's skb_push() for the header. > > > > -Andi > > > sourav > > > > On Wed, 3 Jan 2001, Andi Kleen wrote: > > > > > On Wed, Jan 03, 2001 at 10:59:48PM +0530, Sourav Sen wrote: > > > > > > > > Hi, > > > > In the function ip_build_xmit(), immediately after > > > > sk_alloc_send_skb(), skb_reserve(skb, hh_len) is called. Now > > > > skb_reserve(skb,len) only increment the data pointer and tail pointer by > > > > len amt. > > > > > > > > Now in a particular hard_start_xmit() say for rtl8139, the data > > > > transfer is taking place from skb->data : > > > > outl(virt_to_bus(skb->data), ioaddr + TxAddr0 + entry*4) > > > > > > > > So, I cannot understand, if transfer starts from data and not head, is > > > > ethrnet header not transmitted? what I am missing? > > > > > > An skb_put() > > > > > > > > > -Andi > > > > > > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
is eth header is not transmitted
Hi, In the function ip_build_xmit(), immediately after sk_alloc_send_skb(), skb_reserve(skb, hh_len) is called. Now skb_reserve(skb,len) only increment the data pointer and tail pointer by len amt. Now in a particular hard_start_xmit() say for rtl8139, the data transfer is taking place from skb->data : outl(virt_to_bus(skb->data), ioaddr + TxAddr0 + entry*4) So, I cannot understand, if transfer starts from data and not head, is ethrnet header not transmitted? what I am missing? /sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
sock_alloc_send_skb
Hi, why in sock_alloc_send_skb(sk, length+hh_len+15,0,flags&MSG_DONTWAIT, &err) 15 is added to the length of the the data of the socket. Here length=data_len+ip_hdr+udp_hdr all we need is hrd_hdr ie hh_len which is being added here, why that 15 is needed? Sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
iph
Hi, I want to know what the field, ihl in the struct iphdr is there for, I mean its function and the values it takes in different condition. Specifically, what is the condition when ihl>5. (See ip_input.c , line 497, depending on if ihl>5, some code is getting executed.) I am talking of 2.2.16 Sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Whats the problem
I am unable to compile the following code, can anyone say whats the problem : The main error msg is like the following: parse error before `EXPORT_SYMTAB_not_defined' warning: type defaults to `int' in declaration of `EXPORT_SYMTAB_not_defined' warning: data definition has no type or storage class == #include #include #include #include #include #include int init_module() { printk("Hello, World\n"); return 0 ; } int show_mystate(void) { unsigned long state ; state = current->state ; printk("%x\n",state); return 0 ; } EXPORT_SYMBOL(show_mystate); void cleanup_module() { printk("Goodbye\n"); } = The makefile CC=gcc MODCFLAGS=-Wall -DMODULE -D__KERNEL__ -DLINUX showinfo.o : showinfo.c $(CC) $(MODCFLAGS) -c showinfo.c Thanks Sourav -------- SOURAV SENMSc(Engg.) CSA IISc BANGALORE URL : www2.csa.iisc.ernet.in/~sourav ROOM NO : N-78 TEL :(080)309-2454(HOSTEL) (080)309-2906 (COMP LAB) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
module programing
Any good updated for module programing? Rubini seems to be too outdated :( ~sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
How to write patches
Hi, This question may seem naive, but can anyone tell me if there is any structured way of writing patches? I mean suppose I want to implement some kernel mechanism, and I define my data structures etc. and made most of the code as loadable module to start with, but still I am having to change some parts of the kernel code at the development time, and I want to make that change using patches, so that I do not have to browse thru the files to change the code as I debug. Is there any structured way of doing this? Happy New Year Sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
why both kernel lock as well as semaphore
In many parts of the kernel, I have seen both semaphore is taken (eg. down(¤t->mm->mmap_sem)) as well as kernel lock (lock_kernel()) is also taken, why both are required? Whats the purpose of each? ~sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
whats happening
In some parts of the kernel code I find expression like len = (len + ~PAGE_MASK) & PAGE_MASK ; Whats happening to len? ~sourav - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/
Wiring down Pages
Hi, I am a novice in this exciting kernel world, so my questions may be a bit naive, please bear with me.(I am student at IISc, Bangalore). Suppose I want to wire-down( as they call in BSD ) a page in memory, how I go about doing that? (I guess by setting the PG_locked bit of the flags field in the struct page, I can do it, am I right?) sourav SOURAV SENMSc(Engg.) CSA IISc BANGALORE URL : www2.csa.iisc.ernet.in/~sourav ROOM NO : N-78 TEL :(080)309-2454(HOSTEL) (080)309-2906 (COMP LAB) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Please read the FAQ at http://www.tux.org/lkml/