mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 09:58:16 +00:00
Fixed hardware management sysfs readings in status screen (typically ROCm controlled GPUs)
This commit is contained in:
parent
dc4aee6748
commit
bb1460d851
@ -48,6 +48,7 @@
|
|||||||
- Fixed both false negative and false positive results in -m 3000 in -a 3 (affecting only NVIDIA GPU)
|
- Fixed both false negative and false positive results in -m 3000 in -a 3 (affecting only NVIDIA GPU)
|
||||||
- Fixed buffer overflow in -m 1800 in -O mode which is optimized to handle only password candidates up to length 15
|
- Fixed buffer overflow in -m 1800 in -O mode which is optimized to handle only password candidates up to length 15
|
||||||
- Fixed buffer overflow in -m 4710 in -P mode and only in single hash mode if salt length is larger than 32 bytes
|
- Fixed buffer overflow in -m 4710 in -P mode and only in single hash mode if salt length is larger than 32 bytes
|
||||||
|
- Fixed hardware management sysfs readings in status screen (typically ROCm controlled GPUs)
|
||||||
- Fixed include guards in several header files
|
- Fixed include guards in several header files
|
||||||
- Fixed incorrect maximum password length support for -m 400 in optimized mode (reduced from 55 to 39)
|
- Fixed incorrect maximum password length support for -m 400 in optimized mode (reduced from 55 to 39)
|
||||||
- Fixed internal access on module option attribute OPTS_TYPE_SUGGEST_KG with the result that it was unused
|
- Fixed internal access on module option attribute OPTS_TYPE_SUGGEST_KG with the result that it was unused
|
||||||
|
34
src/hwmon.c
34
src/hwmon.c
@ -351,7 +351,7 @@ static int hm_SYSFS_get_pp_dpm_pcie (hashcat_ctx_t *hashcat_ctx, const int backe
|
|||||||
|
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
hc_asprintf (&path, "%s/pp_dpm_pcie", syspath);
|
hc_asprintf (&path, "%s/current_link_width", syspath);
|
||||||
|
|
||||||
hcfree (syspath);
|
hcfree (syspath);
|
||||||
|
|
||||||
@ -380,14 +380,9 @@ static int hm_SYSFS_get_pp_dpm_pcie (hashcat_ctx_t *hashcat_ctx, const int backe
|
|||||||
|
|
||||||
if (len < 2) continue;
|
if (len < 2) continue;
|
||||||
|
|
||||||
if (ptr[len - 2] != '*') continue;
|
int rc = sscanf (ptr, "%d", &lanes);
|
||||||
|
|
||||||
int profile = 0;
|
if (rc == 1) break;
|
||||||
float speed = 0;
|
|
||||||
|
|
||||||
int rc = sscanf (ptr, "%d: %fGB, x%d *", &profile, &speed, &lanes);
|
|
||||||
|
|
||||||
if (rc == 3) break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hc_fclose (&fp);
|
hc_fclose (&fp);
|
||||||
@ -2559,8 +2554,6 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|||||||
{
|
{
|
||||||
if (true)
|
if (true)
|
||||||
{
|
{
|
||||||
int hm_adapters_id = 0;
|
|
||||||
|
|
||||||
for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
|
for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
|
||||||
{
|
{
|
||||||
hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
|
hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
|
||||||
@ -2572,18 +2565,16 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|||||||
|
|
||||||
if (device_param->is_opencl == true)
|
if (device_param->is_opencl == true)
|
||||||
{
|
{
|
||||||
|
const u32 device_id = device_param->device_id;
|
||||||
|
|
||||||
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
if ((device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
|
||||||
|
|
||||||
hm_adapters_sysfs[hm_adapters_id].sysfs = backend_devices_idx; // ????
|
hm_adapters_sysfs[device_id].buslanes_get_supported = true;
|
||||||
|
hm_adapters_sysfs[device_id].corespeed_get_supported = true;
|
||||||
hm_adapters_sysfs[hm_adapters_id].buslanes_get_supported = true;
|
hm_adapters_sysfs[device_id].fanspeed_get_supported = true;
|
||||||
hm_adapters_sysfs[hm_adapters_id].corespeed_get_supported = true;
|
hm_adapters_sysfs[device_id].fanpolicy_get_supported = true;
|
||||||
hm_adapters_sysfs[hm_adapters_id].fanspeed_get_supported = true;
|
hm_adapters_sysfs[device_id].memoryspeed_get_supported = true;
|
||||||
hm_adapters_sysfs[hm_adapters_id].fanpolicy_get_supported = true;
|
hm_adapters_sysfs[device_id].temperature_get_supported = true;
|
||||||
hm_adapters_sysfs[hm_adapters_id].memoryspeed_get_supported = true;
|
|
||||||
hm_adapters_sysfs[hm_adapters_id].temperature_get_supported = true;
|
|
||||||
|
|
||||||
hm_adapters_id++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2664,7 +2655,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
|||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
||||||
{
|
{
|
||||||
hwmon_ctx->hm_device[backend_devices_idx].adl = hm_adapters_adl[device_id].adl;
|
hwmon_ctx->hm_device[backend_devices_idx].adl = hm_adapters_adl[device_id].adl;
|
||||||
hwmon_ctx->hm_device[backend_devices_idx].sysfs = hm_adapters_sysfs[device_id].sysfs;
|
hwmon_ctx->hm_device[backend_devices_idx].sysfs = hm_adapters_sysfs[device_id].sysfs; // not used
|
||||||
hwmon_ctx->hm_device[backend_devices_idx].nvapi = 0;
|
hwmon_ctx->hm_device[backend_devices_idx].nvapi = 0;
|
||||||
hwmon_ctx->hm_device[backend_devices_idx].nvml = 0;
|
hwmon_ctx->hm_device[backend_devices_idx].nvml = 0;
|
||||||
hwmon_ctx->hm_device[backend_devices_idx].od_version = 0;
|
hwmon_ctx->hm_device[backend_devices_idx].od_version = 0;
|
||||||
@ -2789,7 +2780,6 @@ void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx)
|
|||||||
|
|
||||||
if (hwmon_ctx->hm_sysfs)
|
if (hwmon_ctx->hm_sysfs)
|
||||||
{
|
{
|
||||||
|
|
||||||
sysfs_close (hashcat_ctx);
|
sysfs_close (hashcat_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user