mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 06:28:39 +00:00
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime - Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after) - Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
25 lines
1.4 KiB
C
25 lines
1.4 KiB
C
/* Standalone i386 syscall probe: software root clients only, no GPU objects. */
|
|
typedef unsigned int u32;
|
|
static int call3(int n,int a,int b,int c){int r;__asm__ volatile("int $0x80":"=a"(r):"a"(n),"b"(a),"c"(b),"d"(c):"memory");return r;}
|
|
static u32 wrapper[12] __attribute__((aligned(8)));
|
|
static u32 release[4];
|
|
#ifndef CONTROL_NODE
|
|
#define CONTROL_NODE "/dev/nvidiactl"
|
|
#endif
|
|
static char node[]=CONTROL_NODE;
|
|
static char ok[]="{\"i386_software_control_cases_passed\":5,\"node\":\"" CONTROL_NODE "\",\"scope\":\"ROOT_NVOS21_NVOS64_NULL_FREE_only\"}\n";
|
|
static int probe(void){
|
|
int fd=call3(5,(int)node,2,0);if(fd<0)return 1;
|
|
for(int format=0;format<2;format++){
|
|
for(int i=0;i<12;i++)wrapper[i]=0;wrapper[3]=0x41;
|
|
u32 req=format?0xc030462b:0xc020462b;int status_index=format?10:7;
|
|
if(call3(54,fd,(int)req,(int)wrapper)||wrapper[status_index]||!wrapper[2]){call3(6,fd,0,0);return 2;}
|
|
u32 root=wrapper[2];release[0]=root;release[1]=0xdeadbeef;release[2]=root;release[3]=~0u;
|
|
if(call3(54,fd,(int)0xc0104629,(int)release)||release[3]){call3(6,fd,0,0);return 3;}
|
|
}
|
|
for(int i=0;i<8;i++)wrapper[i]=~0u;wrapper[2]=0x20800000;wrapper[6]=4;
|
|
if(call3(54,fd,(int)0xc020462a,(int)wrapper)||wrapper[7]){call3(6,fd,0,0);return 4;}
|
|
call3(6,fd,0,0);call3(4,1,(int)ok,sizeof(ok)-1);return 0;
|
|
}
|
|
__attribute__((noreturn))void _start(void){int r=probe();call3(1,r,0,0);__builtin_unreachable();}
|