[OpenAFS-devel] 2004-06-15 snap on FC2: no good still (sys_call_table,
Error -1 in basic initialization)
Rainer Schöpf
rainer.schoepf@proteosys.com
Tue, 15 Jun 2004 21:34:01 +0200 (CEST)
On Tue, 15 Jun 2004, Matthew Miller wrote:
> On Tue, Jun 15, 2004 at 09:15:00PM +0200, Rainer Schöpf wrote:
> > Is this kernel perhaps configured with CONFIG_REGPARM=y? If so, I have a
> > patch to try. (I saw a similar problem on Suse Linux 9.1.)
>
> Yes, it is.
OK, here is the patch. The problem is that with CONFIG_REGPARM=y, all
functions defined as asmlinkage must also be declared so.
Therefore, the function afs_syscall (called from within afs_ioctl) in
afs/LINUX/osi_module.c must be properly declared. Note that afs_syscall is
defined as returning long in afs_call.c, but declared as returning int in
osi_module.c, so I changed the latter to long.
BTW, if you have CONFIG_SECURITY_SELINUX=y as well, you will probably see
a kernel Oops.
*** src/afs/LINUX/osi_module.c~ Wed Jun 2 04:55:57 2004
--- src/afs/LINUX/osi_module.c Thu Jun 10 17:31:52 2004
***************
*** 163,168 ****
--- 163,171 ----
remove_proc_entry(PROC_FSDIRNAME, proc_root_fs);
}
+ extern asmlinkage long
+ afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
+
static int
afs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
***************
*** 239,245 ****
unsigned long kernel_gp = 0;
static struct fptr sys_setgroups;
#endif /* defined(AFS_IA64_LINUX20_ENV) */
! extern int afs_syscall();
extern long afs_xsetgroups();
#if defined(__NR_setgroups32)
extern int afs_xsetgroups32();
--- 242,248 ----
unsigned long kernel_gp = 0;
static struct fptr sys_setgroups;
#endif /* defined(AFS_IA64_LINUX20_ENV) */
! /*extern int afs_syscall();*/
extern long afs_xsetgroups();
#if defined(__NR_setgroups32)
extern int afs_xsetgroups32();
Rainer Schöpf