This is to discuss the problems I am facing with porting a driver from a 2.6.18 kernel to 3.8.3 kernel. Apart from the APIs and functions that have changed(which I have more or less replaced), the system call implementation has changed. http://lxr.linux.no/linux+v2.6.18/arch/i386/kernel/syscall_table.S#L41 http://lxr.linux.no/linux+v3.8.3/arch/x86/syscalls/syscall_64.tbl#L92 Now due to this, some unnecessary warnings and errors are coming. To explain this I am providing the compiler error which is not coming on 2.6.18 kernel but is coming on 3.8.3 kernel. the below line is generating https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/helpers.c#L49... mode &= ~current->fs->umask; the following error- ERROR:Derefencing pointer to incomplete type This has nothing to do with any APIs or change in the structure in the newer kernel. This just the importation of mkdir code from the linux kernel. Likely to be sys_mkdir, IIRC. Talking of which, I'd think that I must sync ALL the importations from the Linux kernel with mine. Regards, Saket Sinha
On Fri, 12 Jul 2013 11:50:42 +0530, Saket Sinha said:
This just the importation of mkdir code from the linux kernel. Likely to be sys_mkdir, IIRC. Talking of which, I'd think that I must sync ALL the importations from the Linux kernel with mine.
Umm. Yeah. Failure to update *all* the API calls you use is generally a good way to make your kernel code bomb out. Fortunately, we try very hard to ensure that when an API is changed, it's either transparent (usually via cpp #define wizardry) or the API is sufficiently different to change the function signature enough to cause a compile error rather than silently failing at runtime.
On Fri, Jul 12, 2013 at 11:50 AM, Saket Sinha <saket.sinha89@gmail.com>wrote:
This is to discuss the problems I am facing with porting a driver from a 2.6.18 kernel to 3.8.3 kernel. Apart from the APIs and functions that have changed(which I have more or less replaced), the system call implementation has changed.
http://lxr.linux.no/linux+v2.6.18/arch/i386/kernel/syscall_table.S#L41 http://lxr.linux.no/linux+v3.8.3/arch/x86/syscalls/syscall_64.tbl#L92
Now due to this, some unnecessary warnings and errors are coming.
To explain this I am providing the compiler error which is not coming on 2.6.18 kernel but is coming on 3.8.3 kernel.
the below line is generating
https://github.com/HeisSpiter/hepunion/blob/master/fs/hepunion/helpers.c#L49... mode &= ~current->fs->umask; the following error- ERROR:Derefencing pointer to incomplete type
AFAIK, this error seems like the 'fs' structures definition is not known to the code present in this file. This can happen because of the header which you included was as per 2.6.18 kernel and in 3.8.3 kernel that struct maybe moved to some where else. The error indicates the type of the pointer is not known and you are trying to deference it.
This has nothing to do with any APIs or change in the structure in the newer kernel. This just the importation of mkdir code from the linux kernel. Likely to be sys_mkdir, IIRC. Talking of which, I'd think that I must sync ALL the importations from the Linux kernel with mine.
Regards, Saket Sinha
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
- Rohan
participants (3)
-
Rohan Puri -
Saket Sinha -
Valdis.Kletnieks@vt.edu