--On Thursday, December 08, 2005 13:44:34 -0500 Jeffrey Hutzelman <[EMAIL PROTECTED]> wrote:
Given a new symbol, there are a couple of approaches we can take to determine when to use it. One is to simply always use the new symbol on kernels 2.6.14 and newer. The other is to extend the control structure so we can give the probe code more than one section to look at.
Unfortunately, that doesn't work. I identified a new symbol (for i386 at least: vesa_modes) and did a test patch. The resulting module found the syscall table, and oopsed. It appears that the memory that the syscall table occupies now is actually marked readonly. See attached patch and log. ('Oops: 003' means that the operation was a write, not a read (0x2) and that it failed due to page protection, not because the page was missing (0x1))
Index: src/afs/LINUX/osi_probe.c
===================================================================
RCS file: /cvs/openafs/src/afs/LINUX/osi_probe.c,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 osi_probe.c
--- src/afs/LINUX/osi_probe.c 6 Apr 2005 04:58:19 -0000 1.1.2.6
+++ src/afs/LINUX/osi_probe.c 8 Dec 2005 17:05:17 -0000
@@ -73,6 +73,10 @@
#include <asm/ia32_unistd.h>
#endif
+#ifdef AFS_I386_LINUX26_ENV
+#include <linux/fb.h>
+#endif
+
/* number of syscalls */
/* NB: on MIPS we care about the 4xxx range */
#ifndef NR_syscalls
@@ -467,6 +471,9 @@
#elif defined(AFS_AMD64_LINUX20_ENV)
/* On this platform, it's in a different section! */
(unsigned long)&tasklist_lock,
+#elif defined(AFS_I386_LINUX26_ENV) && LINUX_VERSION_CODE >=
KERNEL_VERSION(2,6,14)
+ /* On this platform, it's in a different section! */
+ (unsigned long)&vesa_modes,
#else
(unsigned long)&init_mm,
#endif
@@ -499,6 +506,10 @@
(unsigned long)&init_mm,
0xffff,
16384,
+#elif defined(AFS_I386_LINUX26_ENV) && LINUX_VERSION_CODE >=
KERNEL_VERSION(2,6,14)
+ (unsigned long)&vesa_modes,
+ 0xffff,
+ 16384,
#else
(unsigned long)&init_mm,
0,
Dec 7 23:22:33 copperwall kernel: Found system call table at 0xc03225a0 (pattern scan) Dec 7 23:22:33 copperwall kernel: Unable to handle kernel paging request at virtual address c03227c4 Dec 7 23:22:33 copperwall kernel: printing eip: Dec 7 23:22:33 copperwall kernel: d150d591 Dec 7 23:22:33 copperwall kernel: *pde = ffffffff Dec 7 23:22:33 copperwall kernel: Oops: 0003 [#1] Dec 7 23:22:33 copperwall kernel: SMP Dec 7 23:22:33 copperwall kernel: Modules linked in: libafs(U) osi_probe(U) ipv6 parport_pc lp parport autofs4 rfcomm l2cap bluetooth sunrpc ipt_REJECT ipt_state ip_conntrack nfnetlink iptable_filter ip_tables video button battery ac uhci_hcd shpchp i2c_piix4 i2c_core snd_ens1371 gameport snd_rawmidi snd_ac97_codec snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd soundcore snd_page_alloc snd_ac97_bus pcnet32 mii floppy dm_snapshot dm_zero dm_mirror ext3 jbd dm_mod BusLogic sd_mod scsi_mod Dec 7 23:22:33 copperwall kernel: CPU: 0 Dec 7 23:22:33 copperwall kernel: EIP: 0060:[<d150d591>] Tainted: P VLI Dec 7 23:22:33 copperwall kernel: EFLAGS: 00010297 (2.6.14-1.1644_FC4smp) Dec 7 23:22:33 copperwall kernel: EIP is at osi_syscall_init+0x29/0x84 [libafs] Dec 7 23:22:33 copperwall kernel: eax: c03225a0 ebx: d1537f80 ecx: c037b190 edx: c01344d0 Dec 7 23:22:33 copperwall kernel: esi: 08626a60 edi: 00000002 ebp: cda25000 esp: cda25f98 Dec 7 23:22:33 copperwall kernel: ds: 007b es: 007b ss: 0068 Dec 7 23:22:33 copperwall kernel: Process modprobe (pid: 21959, threadinfo=cda25000 task=cf744570) Dec 7 23:22:33 copperwall kernel: Stack: badc0ded 00000002 d08cb015 d1537f80 c013b1a6 b5f46008 08626a60 b5f46008 Dec 7 23:22:33 copperwall kernel: 08626a60 c01039e1 b5f46008 0096d91f 08626a60 08626a60 00000002 bfa36f98 Dec 7 23:22:33 copperwall kernel: ffffffda 0000007b 0000007b 00000080 007ba402 00000073 00010246 bfa36f0c Dec 7 23:22:33 copperwall kernel: Call Trace: Dec 7 23:22:33 copperwall kernel: [<d08cb015>] init_module+0x15/0x43 [libafs] Dec 7 23:22:33 copperwall kernel: [<c013b1a6>] sys_init_module+0xd3/0x21b Dec 7 23:22:33 copperwall kernel: [<c01039e1>] syscall_call+0x7/0xb Dec 7 23:22:33 copperwall kernel: Code: 90 90 83 ec 04 31 c0 e8 4c f9 ff ff a3 10 4c 54 d1 31 d2 85 c0 74 56 8b 90 24 02 00 00 81 fa 71 36 51 d1 74 4e 89 15 0c 4c 54 d1 <c7> 80 24 02 00 00 71 36 51 d1 8b 15 10 4c 54 d1 8b 82 44 01 00
p7szblLJyY5pd.p7s
Description: S/MIME cryptographic signature
