[Bug 259218] Fatal trap 12: page fault while in kernel mode

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 19 Oct 2021 01:34:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259218

--- Comment #9 from Dennis Clarke <dclarke@blastwave.org> ---
Finally I can follow up here. 


The kernel ( and buildworld ) were done with another machine and
then I was able to move the hard disk back to the troublesome VIA
Eden Esther motherboard.

After letting the machine boot :

esther# 
esther# uname -apKU
FreeBSD esther 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n250102-d95c0a12a2d:
Mon Oct 18 05:58:15 GMT 2021    
root@esther:/usr/obj/usr/src/i386.i386/sys/GENERIC  i386 i386 1400038 1400038
esther# 

I left it to sit idle for a good long while and of course we caught
a panic and even a coredump.

esther# 
esther# ls -lap /var/crash/
total 109816
drwxr-x---   2 root  wheel        512 Oct 18 18:24 ./
drwxr-xr-x  24 root  wheel        512 Oct 18 19:20 ../
-rw-r--r--   1 root  wheel          2 Oct 18 18:24 bounds
-rw-r--r--   1 root  wheel         84 Oct 18 18:24 core.txt.0
-rw-------   1 root  wheel        516 Oct 18 18:24 info.0
lrwxr-xr-x   1 root  wheel          6 Oct 18 18:24 info.last -> info.0
-rw-r--r--   1 root  wheel          5 Oct  7 21:44 minfree
-rw-------   1 root  wheel  121741312 Oct 18 18:24 vmcore.0
lrwxr-xr-x   1 root  wheel          8 Oct 18 18:24 vmcore.last -> vmcore.0
esther# 

Regardless lets get what you asked for : 

esther# cd
esther# setenv TERM 'dumb'
esther# gdb -q /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full 
Reading symbols from /usr/obj/usr/src/i386.i386/sys/GENERIC/kernel.full...
(gdb) list *random_nehemiah_read+0x60
0x1404240 is in random_nehemiah_read (/usr/src/sys/dev/random/nehemiah.c:69).
64      {
65              uint32_t retval = 0;
66              uint32_t rate = 0;
67      
68      #ifdef __GNUCLIKE_ASM
69              __asm __volatile(
70                      "movl   $0,%%edx\n\t"
71                      "xstore"
72                              : "=a" (retval), "+d" (rate), "+D" (buf)
73                              :
(gdb) 


for the sake of looking at more lines : 

(gdb) list -
54              .rs_source = RANDOM_PURE_NEHEMIAH,
55              .rs_read = random_nehemiah_read
56      };
57      
58      static struct fpu_kern_ctx *fpu_ctx_save;
59      
60      /* This H/W source never stores more than 8 bytes in one go */
61      /* ARGSUSED */
62      static __inline size_t
63      VIA_RNG_store(void *buf)
(gdb) list
64      {
65              uint32_t retval = 0;
66              uint32_t rate = 0;
67      
68      #ifdef __GNUCLIKE_ASM
69              __asm __volatile(
70                      "movl   $0,%%edx\n\t"
71                      "xstore"
72                              : "=a" (retval), "+d" (rate), "+D" (buf)
73                              :
(gdb) list
74                              : "memory"
75              );
76      #endif
77              if (rate == 0)
78                      return (retval&0x1f);
79              return (0);
80      }
81      
82      static void
83      random_nehemiah_init(void)
(gdb) quit
esther# 

Hope this helps however I can xz compress that coredump and 
upload it however I worry that a coredump will contain security
data such as a root password.

-- 
You are receiving this mail because:
You are the assignee for the bug.