From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,e5f5354319130265,start X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2001-09-26 01:21:30 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed.online.be!195.129.110.18.MISMATCH!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!newsfeed.siemens.de!news.fth.sbs.de!not-for-mail From: Michael.Back@astrum.de (Michael Back) Newsgroups: comp.os.linux.alpha Subject: Unable to handle kernel paging request at virtual address 0000000000000418 Date: Wed, 26 Sep 2001 08:21:17 GMT Organization: ASTRUM GmbH Message-ID: <3bb18e21.95244574@news.fth.sbs.de> Reply-To: Michael.Back@astrum.de NNTP-Posting-Host: ybsx080664.med.siemens.de X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.os.linux.alpha:3843 Hallo, I try to use access_ok in my ioctl like if ( _IOC_DIR( cmd ) & _IOC_READ ) err = !access_ok( VERIFY_WRITE, ( void* ) arg, _IOC_SIZE( cmd ) ); else if ( _IOC_DIR( cmd ) & _IOC_WRITE ) err = !access_ok( VERIFY_READ, ( void* ) arg, _IOC_SIZE( cmd ) ); if ( err ) return -EFAULT; But I get this errormessage: Oops: Unable to handle kernel paging request at virtual address 0000000000000418. My system is red hat ALPHA 6.2 on a UP2000 board Kernel 2.4.4 / 2.4.7 / 2.4.8 / 2.4.10 all the same, only the adress changes form 0000000000000400 to 0000000000000418 between Kernel 2.4.4 / 2.4.7 / 2.4.8 and 2.4.10 I have already inserted many printk in my code and the uaccess.h too. The error appear by the codefragment current->thread.fs ------------------------------> That's what I see in (): #define get_fs() (current->thread.fs) #define get_ds() (KERNEL_DS) #define set_fs(x) (current->thread.fs = (x)) #define segment_eq(a,b) ((a).seg == (b).seg) /* * Is a address valid? This does a straighforward calculation rather * than tests. * * Address valid if: * - "addr" doesn't have any high-bits set * - AND "size" doesn't have any high-bits set * - AND "addr+size" doesn't have any high-bits set * - OR we are in kernel mode. */ #define __access_ok(addr,size,segment) \ (((segment).seg & (addr | size | (addr+size))) == 0) #define access_ok(type,addr,size) \ __access_ok(((unsigned long)(addr)),(size),get_fs()) <------------------------------------------------------ With compiler option -E my code is The output is: ------------------------------------------> if ( ((( cmd ) >> (((0 + 8 ) + 8 ) + 13 ) ) & ((1 << 3 )-1) ) & 2U ) err = ! ((( (current->thread.fs) ).seg & ( ((unsigned long)( ( void* ) arg )) | ( ((( cmd ) >> ( (0 + 8 ) + 8 ) ) & ((1 << 13 )-1) ) ) | ( ((unsigned long)( ( void* ) arg )) + ( ((( cmd ) >> ((0 + 8 ) + 8 ) ) & ((1 << 13 )-1) ) ) ))) == 0) ; else if ( ((( cmd ) >> (((0 + 8 ) + 8 ) + 13 ) ) & ((1 << 3 )-1) ) & 4U ) err = ! ((( (current->thread.fs) ).seg & ( ((unsigned long)( ( void* ) arg )) | ( ((( cmd ) >> ( (0 + 8 ) + 8 ) ) & ((1 << 13 )-1) ) ) | ( ((unsigned long)( ( void* ) arg )) + ( ((( cmd ) >> ((0 + 8 )+ 8 ) ) & ((1 << 13 )-1) ) ) ))) == 0) ; <------------------------------------------ This codefragment "(current->thread.fs) ).seg" is the problem. Could anybody help ? Thanks Michael Back