mirror of
https://github.com/QuixiAI/nvdriver.git
synced 2026-12-06 14:38:47 +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
99 lines
4.0 KiB
C
99 lines
4.0 KiB
C
/* Literal retained inferredC helpers; callbacks are recorders, no GPU IO. */
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
typedef uint8_t byte;typedef uint32_t uint,undefined4;typedef uint64_t undefined8;typedef int code();
|
|
static uint disabled,query_status,mode,diagnostics,query_diagnostics,table_diagnostics,query_calls;
|
|
static _Alignas(8) byte bus[0x668];static uint diagnostic_data;
|
|
static void _nv047869rm(uint log,...){(void)log;}
|
|
static void _nv046747rm(uint status,uint site){if(status!=query_status || site!=0x3e)abort();query_diagnostics++;}
|
|
static void _nv046745rm(uint site){if(site!=0x45)abort();diagnostics++;if(mode==1)*(uint*)(bus+0x664)=1;else if(mode==2)*(uint*)(bus+0x664)=32;}
|
|
static uint fuse_query(long gpu,long fuse,uint key,uint*out){(void)gpu;(void)fuse;if(key!=0xff000035)abort();query_calls++;if(!query_status)*out=disabled;return query_status;}
|
|
static uint64_t hash=14695981039346656037ULL;
|
|
static void mix(uint v){for(uint i=0;i<4;i++){hash^=(v>>(8*i))&255;hash*=1099511628211ULL;}}
|
|
/* Inferred Ghidra 12.2 pseudocode; not original source.
|
|
* input_sha256: 5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b
|
|
* entry: 065f7f10 name: _nv044886rm
|
|
* per_function_timeout_seconds: 60
|
|
*/
|
|
|
|
|
|
/* WARNING: Function: __x86_indirect_thunk_rax replaced with injection: x86_indirect_thunk_rax */
|
|
|
|
int _nv044886rm(long param_1,undefined8 param_2,uint *param_3)
|
|
|
|
{
|
|
long lVar1;
|
|
long lVar2;
|
|
int iVar3;
|
|
_Alignas(8) byte frame[16]={0}; long unaff_RBP=(long)(frame+8);
|
|
|
|
lVar1 = *(long *)(param_1 + 0x1e78);
|
|
*(undefined4 *)(unaff_RBP + -4) = 0;
|
|
lVar2 = *(long *)(param_1 + 0x1f78);
|
|
iVar3 = (**(code **)(lVar1 + 0x118))(param_1,lVar1,0xff000035,unaff_RBP + -4);
|
|
if (iVar3 != 0) {
|
|
_nv047869rm(0xe461ce3,0x3e1000,iVar3);
|
|
_nv046747rm(iVar3,0x3e);
|
|
return iVar3;
|
|
}
|
|
iVar3 = *(int *)(lVar2 + 0x664);
|
|
if (iVar3 == 0) {
|
|
_nv047869rm(0xe461ce3,0x450000);
|
|
_nv046745rm(0x45);
|
|
iVar3 = *(int *)(lVar2 + 0x664);
|
|
}
|
|
*param_3 = ~*(uint *)(unaff_RBP + -4) & (1 << ((byte)iVar3 & 0x1f)) - 1U;
|
|
return 0;
|
|
}
|
|
|
|
/* Inferred Ghidra 12.2 pseudocode; not original source.
|
|
* input_sha256: 5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b
|
|
* entry: 062f6ba0 name: _nv020418rm
|
|
* per_function_timeout_seconds: 60
|
|
*/
|
|
|
|
|
|
long _nv020418rm(long param_1,uint param_2)
|
|
|
|
{
|
|
long lVar1;
|
|
|
|
lVar1 = *(long *)(param_1 + 0x810 + (ulong)param_2 * 8);
|
|
if ((lVar1 == 0) && (lVar1 = *(long *)(param_1 + 0x810), lVar1 == 0)) {
|
|
table_diagnostics++; _nv047869rm(0xe22393e,&diagnostic_data,param_2);
|
|
return 0;
|
|
}
|
|
return lVar1;
|
|
}
|
|
|
|
/* Inferred Ghidra 12.2 pseudocode; not original source.
|
|
* input_sha256: 5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b
|
|
* entry: 065de2d0 name: _nv045098rm
|
|
* per_function_timeout_seconds: 60
|
|
*/
|
|
|
|
|
|
undefined4 _nv045098rm(long param_1)
|
|
|
|
{
|
|
return *(undefined4 *)(param_1 + 0x4384);
|
|
}
|
|
|
|
|
|
static _Alignas(8) byte gpu[0x1f80],fuse[0x120],clock[0x830],memory[0x4388];
|
|
int main(void){uint cases=0;*(long*)(gpu+0x1e78)=(long)fuse;*(long*)(gpu+0x1f78)=(long)bus;*(long*)(fuse+0x118)=(long)fuse_query;
|
|
for(uint c=0;c<260;c++)for(uint mask=0;mask<34;mask++)for(mode=0;mode<3;mode++)for(uint failure=0;failure<2;failure++){
|
|
uint count=c<256?c:c==256?256:c==257?512:c==258?0xffffffff:0x80000000;
|
|
*(uint*)(bus+0x664)=count;disabled=mask==0?0:mask==33?~0U:1U<<(mask-1);query_status=failure?0x51:0;
|
|
diagnostics=query_diagnostics=query_calls=0;uint out=0x12345678,status=_nv044886rm((long)gpu,0,&out);
|
|
mix(status);mix(out);mix(*(uint*)(bus+0x664));mix(diagnostics);mix(query_diagnostics);mix(query_calls);cases++;
|
|
}
|
|
for(uint layout=0;layout<16;layout++)for(uint index=0;index<4;index++){
|
|
for(uint i=0;i<4;i++)*(long*)(clock+0x810+i*8)=(layout&(1U<<i))?0x100+i:0;
|
|
table_diagnostics=0;long out=_nv020418rm((long)clock,index);mix((uint)out);mix(table_diagnostics);cases++;
|
|
}
|
|
for(uint i=0;i<512;i++){*(uint*)(memory+0x4384)=0xabc00000^(i*0x117);mix(_nv045098rm((long)memory));cases++;}
|
|
printf("%u %016lx\n",cases,(unsigned long)hash);return 0;}
|