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
270 lines
9.1 KiB
C
270 lines
9.1 KiB
C
/* Literal inferred original020711/712 constructors and081/091 deactivation.
|
|
* Exact original relocation identities disambiguate duplicate020592 names.
|
|
* Synthetic caller-owned objects; read101000 recorder, no hardware execution. */
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
typedef uint64_t undefined8,ulong;typedef uint32_t undefined4,uint;typedef uint8_t undefined1,byte;
|
|
static undefined8 *_DAT_00000000;static int _DAT_00000050;
|
|
static void _nv020158rm(){abort();} static void _nv047869rm(uint x,...){(void)x;abort();} static void _nv046745rm(uint x){(void)x;abort();}
|
|
static uint boot,reads;
|
|
static uint _nv053907rm(ulong owner,uint a,uint b,uint offset,uint c){(void)owner;(void)a;(void)b;(void)c;if(offset!=0x101000)abort();reads++;return boot;}
|
|
static void _nv019887rm(void){abort();}
|
|
static void _nv019888rm(void){abort();}
|
|
static void _nv020116rm(void){abort();}
|
|
static void _nv020124rm(void){abort();}
|
|
static void _nv020586rm(void){abort();}
|
|
static void _nv020589rm(void){abort();}
|
|
static void _nv020591rm(void){abort();}
|
|
static void _nv020592rm(void){abort();}
|
|
static void _nv020596rm(void){abort();}
|
|
static void _nv020874rm(void){abort();}
|
|
static void _nv020879rm(void){abort();}
|
|
static void _nv021048rm(void){abort();}
|
|
static void _nv021059rm(void){abort();}
|
|
static void _nv021068rm(void){abort();}
|
|
static void clock_method_1d9ad0(void){abort();}
|
|
static undefined8 _nv021326rm[8];
|
|
static undefined8 _nv021357rm[8];
|
|
static undefined8 _nv021342rm[8];
|
|
/* Inferred Ghidra 12.2 pseudocode; not original source.
|
|
* input_sha256: 5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b
|
|
* entry: 063492f0 name: _nv021081rm
|
|
* per_function_timeout_seconds: 60
|
|
*/
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
void _nv021081rm(long param_1)
|
|
|
|
{
|
|
int iVar1;
|
|
|
|
if (param_1 == 0) {
|
|
_nv020158rm(0);
|
|
iVar1 = _DAT_00000050;
|
|
}
|
|
else {
|
|
iVar1 = *(int *)(param_1 + 0x50);
|
|
}
|
|
if (iVar1 == 0) {
|
|
_nv020158rm(0);
|
|
*(undefined1 *)(param_1 + 0x5c) = 0;
|
|
return;
|
|
}
|
|
*(undefined1 *)(param_1 + 0x5c) = 0;
|
|
return;
|
|
}
|
|
|
|
|
|
/* Inferred Ghidra 12.2 pseudocode; not original source.
|
|
* input_sha256: 5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b
|
|
* entry: 0636d080 name: _nv021091rm
|
|
* per_function_timeout_seconds: 60
|
|
*/
|
|
|
|
|
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
|
|
|
|
void _nv021091rm(undefined8 *param_1)
|
|
|
|
{
|
|
undefined8 *puVar1;
|
|
|
|
if (param_1 == (undefined8 *)0x0) {
|
|
_nv020158rm(0);
|
|
puVar1 = _DAT_00000000;
|
|
}
|
|
else {
|
|
puVar1 = (undefined8 *)*param_1;
|
|
}
|
|
if (puVar1 == (undefined8 *)0x0) {
|
|
_nv020158rm(0);
|
|
puVar1 = (undefined8 *)*param_1;
|
|
}
|
|
*(undefined1 *)((long)param_1 + 0x5c) = 0;
|
|
*param_1 = *puVar1;
|
|
param_1[1] = puVar1[1];
|
|
param_1[2] = puVar1[2];
|
|
param_1[3] = puVar1[3];
|
|
param_1[4] = puVar1[4];
|
|
param_1[5] = puVar1[5];
|
|
param_1[6] = puVar1[6];
|
|
param_1[7] = puVar1[7];
|
|
if (((*(int *)(param_1 + 10) == 0) || (param_1[8] != 0)) ||
|
|
((*(byte *)((long)param_1 + 0x54) & 0xf) == 0)) {
|
|
return;
|
|
}
|
|
param_1[2] = (undefined8)_nv020586rm;
|
|
param_1[3] = (undefined8)_nv020592rm;
|
|
param_1[4] = (undefined8)_nv021059rm;
|
|
return;
|
|
}
|
|
|
|
|
|
/* Inferred Ghidra 12.2 pseudocode; not original source.
|
|
* input_sha256: 5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b
|
|
* entry: 0636d450 name: _nv020711rm
|
|
* per_function_timeout_seconds: 60
|
|
*/
|
|
|
|
|
|
void _nv020711rm(undefined8 *param_1)
|
|
|
|
{
|
|
if (param_1 == (undefined8 *)0x0) {
|
|
_nv047869rm(0xeac3f74,0x870000);
|
|
_nv046745rm(0x87);
|
|
}
|
|
if (param_1[8] == 0) {
|
|
*param_1 = (undefined8)_nv021357rm;
|
|
param_1[1] = (undefined8)_nv021091rm;
|
|
param_1[2] = (undefined8)_nv020591rm;
|
|
param_1[3] = (undefined8)_nv020596rm;
|
|
param_1[4] = (undefined8)_nv021048rm;
|
|
param_1[5] = 0;
|
|
param_1[6] = 0;
|
|
param_1[7] = 0;
|
|
}
|
|
else {
|
|
*param_1 = (undefined8)_nv021342rm;
|
|
param_1[1] = (undefined8)_nv021091rm;
|
|
param_1[2] = (undefined8)_nv020586rm;
|
|
param_1[3] = (undefined8)_nv020592rm;
|
|
param_1[4] = (undefined8)_nv021068rm;
|
|
param_1[5] = (undefined8)_nv020124rm;
|
|
param_1[6] = (undefined8)_nv020874rm;
|
|
param_1[7] = (undefined8)_nv019888rm;
|
|
}
|
|
param_1[10] = 0xffffffff00000000;
|
|
*(undefined4 *)(param_1 + 0xb) = 0;
|
|
return;
|
|
}
|
|
|
|
|
|
/* Inferred Ghidra 12.2 pseudocode; not original source.
|
|
* input_sha256: 5269a23ffba19a17fe16f076463e7ad4151254659441d1711bee6c6221ff6f4b
|
|
* entry: 06350430 name: _nv020712rm
|
|
* per_function_timeout_seconds: 60
|
|
*/
|
|
|
|
|
|
void _nv020712rm(undefined8 *param_1)
|
|
|
|
{
|
|
long lVar1;
|
|
uint uVar2;
|
|
|
|
if (param_1 == (undefined8 *)0x0) {
|
|
_nv047869rm(0xe3e736a,0x3f0000);
|
|
_nv046745rm(0x3f);
|
|
}
|
|
*param_1 = (undefined8)_nv021326rm;
|
|
param_1[1] = (undefined8)_nv021081rm;
|
|
param_1[2] = (undefined8)_nv020589rm;
|
|
param_1[3] = (undefined8)clock_method_1d9ad0;
|
|
param_1[4] = (undefined8)_nv021059rm;
|
|
param_1[5] = (undefined8)_nv020116rm;
|
|
param_1[6] = (undefined8)_nv020879rm;
|
|
param_1[7] = (undefined8)_nv019887rm;
|
|
lVar1 = param_1[8];
|
|
if (lVar1 == 0) {
|
|
param_1[10] = 0xffffffff00000000;
|
|
*(undefined4 *)(param_1 + 0xb) = 0;
|
|
uVar2 = _nv053907rm(param_1[9] + 0x4120,0,0,0x101000,0);
|
|
*(uint *)(param_1 + 10) = (-(uint)((uVar2 >> 6 & 1) == 0) & 2000) + 25000;
|
|
return;
|
|
}
|
|
param_1[10] = *(undefined8 *)(lVar1 + 0x50);
|
|
*(undefined4 *)(param_1 + 0xb) = *(undefined4 *)(lVar1 + 0x58);
|
|
return;
|
|
}
|
|
|
|
|
|
static uint method_token(ulong p){if(!p)return 0;
|
|
if(p==(ulong)clock_method_1d9ad0)return 0x1d9ad1;
|
|
if(p==(ulong)_nv021081rm)return 0x1d9ae1;
|
|
if(p==(ulong)_nv021059rm)return 0x1d9b21;
|
|
if(p==(ulong)_nv020116rm)return 0x1d9b31;
|
|
if(p==(ulong)_nv020589rm)return 0x1d9c11;
|
|
if(p==(ulong)_nv020586rm)return 0x1d9cb1;
|
|
if(p==(ulong)_nv020879rm)return 0x1d9d81;
|
|
if(p==(ulong)_nv019887rm)return 0x1d9dc1;
|
|
if(p==(ulong)_nv020874rm)return 0x1d9e01;
|
|
if(p==(ulong)_nv020596rm)return 0x1e4f61;
|
|
if(p==(ulong)_nv020591rm)return 0x1e50e1;
|
|
if(p==(ulong)_nv020592rm)return 0x1fd7e1;
|
|
if(p==(ulong)_nv019888rm)return 0x1fd7f1;
|
|
if(p==(ulong)_nv021091rm)return 0x1fd871;
|
|
if(p==(ulong)_nv021068rm)return 0x1fd931;
|
|
if(p==(ulong)_nv020124rm)return 0x1fda71;
|
|
if(p==(ulong)_nv021048rm)return 0x1fdc21;
|
|
abort();}
|
|
static uint template_token(ulong p){
|
|
if(p==(ulong)_nv021326rm)return 79978177;
|
|
if(p==(ulong)_nv021357rm)return 79983681;
|
|
if(p==(ulong)_nv021342rm)return 79983617;
|
|
abort();}
|
|
static void templates(void){
|
|
_nv021326rm[0]=(ulong)_nv021326rm;
|
|
_nv021326rm[1]=(ulong)_nv021081rm;
|
|
_nv021326rm[2]=(ulong)_nv020589rm;
|
|
_nv021326rm[3]=(ulong)clock_method_1d9ad0;
|
|
_nv021326rm[4]=(ulong)_nv021059rm;
|
|
_nv021326rm[5]=(ulong)_nv020116rm;
|
|
_nv021326rm[6]=(ulong)_nv020879rm;
|
|
_nv021326rm[7]=(ulong)_nv019887rm;
|
|
_nv021357rm[0]=(ulong)_nv021357rm;
|
|
_nv021357rm[1]=(ulong)_nv021091rm;
|
|
_nv021357rm[2]=(ulong)_nv020591rm;
|
|
_nv021357rm[3]=(ulong)_nv020596rm;
|
|
_nv021357rm[4]=(ulong)_nv021048rm;
|
|
_nv021357rm[5]=0;
|
|
_nv021357rm[6]=0;
|
|
_nv021357rm[7]=0;
|
|
_nv021342rm[0]=(ulong)_nv021342rm;
|
|
_nv021342rm[1]=(ulong)_nv021091rm;
|
|
_nv021342rm[2]=(ulong)_nv020586rm;
|
|
_nv021342rm[3]=(ulong)_nv020592rm;
|
|
_nv021342rm[4]=(ulong)_nv021068rm;
|
|
_nv021342rm[5]=(ulong)_nv020124rm;
|
|
_nv021342rm[6]=(ulong)_nv020874rm;
|
|
_nv021342rm[7]=(ulong)_nv019888rm;
|
|
}
|
|
static _Alignas(8) byte pool[0x2a498],embedded[0x60],gpu[0x4124],external_parent[8];
|
|
static ulong objects[48];static uint locations[48],kinds[48],n;
|
|
static uint offsets[]={0x3f58,0xbc8,0x3340,0x2528,0x1ab0};
|
|
static uint64_t hash=14695981039346656037ULL;
|
|
static void mix(uint v){for(uint i=0;i<4;i++){hash^=(v>>(8*i))&255;hash*=1099511628211ULL;}}
|
|
static void add(ulong object,uint location,uint kind){objects[n]=object;locations[n]=location;kinds[n]=kind;n++;}
|
|
static void snapshot(void){
|
|
mix(n);mix(reads);
|
|
for(uint i=0;i<n;i++){
|
|
byte *o=(byte*)objects[i];mix(locations[i]);mix(kinds[i]);
|
|
ulong parent=*(ulong*)(o+0x40);uint p=0;if(parent==(ulong)external_parent)p=0xfffffff0;else if(parent){for(uint j=0;j<n;j++)if(parent==objects[j])p=j+1;if(!p)abort();}mix(p);
|
|
mix(template_token(*(ulong*)o));for(uint j=1;j<8;j++)mix(method_token(*(ulong*)(o+j*8)));
|
|
ulong value=*(ulong*)(o+0x50);mix(value);mix(value>>32);mix(*(uint*)(o+0x58));mix(o[0x5c]);
|
|
}
|
|
}
|
|
int main(void){uint cases=0;templates();
|
|
for(uint parent=0;parent<2;parent++)for(uint seed=0;seed<256;seed++){
|
|
memset(pool,0xa5,sizeof(pool));memset(embedded,0,sizeof(embedded));n=reads=0;boot=seed*0x9e3779b9U^0xa5a55a5a;
|
|
embedded[0x5c]=seed^0x93;*(ulong*)(embedded+0x40)=parent?(ulong)external_parent:0;
|
|
for(uint level=0;level<8;level++){
|
|
byte *base=pool+0x910+level*0x5370;byte *prior=level?base-0x5370:0;
|
|
byte *crystal=base+0x4ef8;*(ulong*)(crystal+0x40)=level?(ulong)(prior+0x4ef8):0;*(ulong*)(crystal+0x48)=(ulong)gpu;crystal[0x5c]=seed+level*13;
|
|
_nv020712rm((ulong*)crystal);add((ulong)crystal,(level<<16)|0x4ef8,0);
|
|
for(uint j=0;j<5;j++){
|
|
byte *o=base+offsets[j];*(ulong*)(o+0x40)=level?(ulong)(prior+offsets[j]):0;o[0x5c]=seed+level*13+(j+1)*7;
|
|
_nv020711rm((ulong*)o);add((ulong)o,(level<<16)|offsets[j],1);
|
|
}
|
|
|
|
}
|
|
snapshot();for(uint i=0;i<n;i++){if(kinds[i])_nv021091rm((ulong*)objects[i]);else _nv021081rm(objects[i]);}snapshot();cases++;
|
|
}
|
|
printf("%u %016lx\n",cases,(unsigned long)hash);return 0;
|
|
}
|