Commit Graph

654 Commits

Author SHA1 Message Date
AK-47
85fbba947a Select ISAAC-64 by default on a >=64-bit CPU.
Otherwise choose ISAAC instead of Mersenne Twister.
2022-01-06 20:57:18 +11:00
AK-47
6dff23d6b2 Significantly improved ISAAC and ISAAC-64 performance.
Each ISAAC call generates a block of integers, but only the first integer was used before the PRNG was called again.
This resulted in most of the random numbers being wasted and more calls to the PRNG than was necessary.
Also fixed some segmentation faults in ISAAC-64 code.
2022-01-06 13:55:00 +11:00
AK-47
76ca47f2cb Added ISAAC-64 PRNG for 64-bit systems.
Use RANDIZL=8 as recommended by ISAAC author.
Fixed possible buffer overflow in nwipe_isaac_read().
Slight performance improvement.
2022-01-06 01:36:12 +11:00
PartialVolume
fe9666bd41 Merge pull request #395 from Firminator/patch-2
Update README.md
2021-12-13 09:12:04 +00:00
Firminator
a19e07bd1b Update README.md
* remove redundant paragraphs and information especially regarding ShredOS
* move certain paragraphs around to streamline the readme and for better readability
* update links
* some minor changes
2021-12-13 00:33:30 -05:00
PartialVolume
c4430f149c Merge pull request #394 from PartialVolume/Mitigate_against_smartctls_inconsistent_use_of_case_in_labelling
Fix missing serial number on SAS drive. Fixes #384
2021-12-12 20:28:08 +00:00
PartialVolume
a83a27f8e5 Fix missing serial number on SAS drive
This was caused by inconsistent labeling of the
serial number by smartctl. In a majority of cases
smartctl would output serial number data using
the label "Serial Number:" however on a SAS
drive we found that smartctl output the label
as "Serial number:" i.e. differs with a lower
case 'n'. Unfortunately we were doing a case
sensitive search for "Serial Number" so the result
being the serial number was not found.

This patch converts both strings in the search
to lower case before searching.

In addition a new field was added to the
anonymize list, "logical unit id:" so when the
-q option is used "serial number", "lu wwn device id:"
and "logical unit id:" are all now anonymized in the
smartctl debug data.
2021-12-12 20:22:35 +00:00
PartialVolume
254a0efd2c Merge pull request #393 from PartialVolume/Improve_GUI_thread_cancellation_eror_handling
Improve GUI thread cancellation messaging
2021-12-08 23:47:38 +00:00
PartialVolume
323fc38631 Improve GUI thread cancellation messaging
If pthread_join failed, nwipe would report an error
but would also report that the thread had been
cancelled. This has been corrected so that only
the error message is displayed in a fault condition.
2021-12-08 23:43:01 +00:00
PartialVolume
7f547e7ccb Merge pull request #392 from PartialVolume/Improve_thread_cancellation_error_reporting
Improve thread cancellation error reporting
2021-12-07 23:17:25 +00:00
PartialVolume
c433326c9f Improve thread cancellation error reporting
Check for specific errors.
Add retry loop with timeout for pthread_join.
2021-12-07 23:10:20 +00:00
PartialVolume
4351b3db5d Merge pull request #391 from PartialVolume/Fix_use_of_modprobe_on_Debian_11_part2
Would help if I explicitly stated the paths ;-)
2021-12-02 22:51:48 +00:00
PartialVolume
5eb43855c7 Would help if I explicitly stated the paths :'-) 2021-12-02 22:47:48 +00:00
PartialVolume
86174b227d Merge pull request #390 from PartialVolume/Fix_use_of_modprobe_on_Debian_11
Check multiple paths for modprobe
Fixes #389
2021-12-02 22:34:09 +00:00
PartialVolume
acba2c8065 Check multiple paths for modprobe
Particularly relevant to Debian which when logged in as root
doesn't put /sbin in the $PATH environment setting.

This might have caused temperatures to not be available on Debian
systems, but not necessarily on distros based on Debian like
Ubuntu which would have worked ok.
2021-12-02 22:30:39 +00:00
PartialVolume
0d3e1af83d Merge pull request #388 from PartialVolume/Fix_second_occurence_of_incorrect_specifier
Fix 2nd occurrence of incorrect format specifier.
2021-12-01 19:45:20 +00:00
PartialVolume
981f666150 Fix 2nd occurrence of incorrect format specifier.
Causing incorrect sect/block/device size to be
printed in nwipe_log but only for 32 bit builds.
2021-12-01 19:42:28 +00:00
PartialVolume
4f531e65db Merge pull request #387 from PartialVolume/Fix_nwipe_log_format_specifier_incorrect
Fix nwipe log format specifier incorrect
2021-12-01 19:33:16 +00:00
PartialVolume
181ef543de nwipe_log format specifier doesn't match variable.
The format specifier didn't match the size of the variable that holds
c2[i]->device_sector_size which is an int. This didn't appear to cause
a problem with reporting in a 64 bit build. It does cause a problem in
a 32 bit build displaying a very large & incorrect number for sector,
block and device sizes.

This doesn't cause any issues with the overall function, simply
incorrect sector, block and device sizes in 32 bit builds as displayed
in the nwipe log.

I also changed the signed long long for c2[i]->device _size to a
unsigned long long as there is little point in a negative device size.
2021-12-01 19:20:34 +00:00
PartialVolume
aab863ea7d Update ShredOS link 2021-12-01 05:50:34 +00:00
PartialVolume
ef06fed886 Merge pull request #383 from Firminator/patch-1
Update options.c with additional infor for -q
2021-11-18 15:34:05 +00:00
Firminator
6396825eb6 Update options.c
* added additional info for -q, i.e. what data is being removed from GUI and logs
* removed superfluous new line break
2021-11-18 10:11:03 -05:00
PartialVolume
b35b14ba42 Merge pull request #382 from PartialVolume/Remove_trailing_character
Remove ')' character in nwipe_log message
2021-11-18 12:07:29 +00:00
PartialVolume
2b63fb74cb Remove ')' character in nwipe_log message 2021-11-18 12:02:35 +00:00
PartialVolume
fd11b9df35 Merge pull request #381 from PartialVolume/Update_hwmon_search_directories
Update temperature for some nvme devices
2021-11-18 11:29:27 +00:00
PartialVolume
0677cebe5b Update temperature
Add /sys/class/hwmon/hwmonX/device/ to the list
of directories to search for a given device.

Some nvme devices/controllers put the device name
in /sys/class/hwmon/hwmonX/device/ rather than
/sys/class/hwmon/hwmonX/device/nvme/nvme0/

Update debug messaging.
2021-11-18 11:25:44 +00:00
PartialVolume
6b930863a6 Update comment 2021-11-17 20:32:15 +00:00
PartialVolume
e07ae7e0ef Merge pull request #380 from PartialVolume/Update_NVME_temperature_code
Update nvme temperatures.
2021-11-17 19:30:39 +00:00
PartialVolume
1744d89692 Update nvme temperatures.
For sdX devices we look in
/sys/class/hwmon/hwmonX/block for the device
name.

However, for nvme we access the device name
by looking in ..
/sys/class/hwmon/hwmonX/device/nvme/nvme0

nvme0n1

Multiple nvme drives/controllers will need
to be tested.
2021-11-17 19:27:27 +00:00
PartialVolume
8b36b3d204 Merge pull request #379 from PartialVolume/Add_anonymized_label_to_banner
Make it clear we are in anonymized mode
2021-11-17 16:26:06 +00:00
PartialVolume
c0466c4850 Make it clear we are in anonymized mode
When selecting -q or --quiet as an nwipe
option, append " (ANONYMIZED)" to the nwipe
banner.
2021-11-17 16:14:28 +00:00
PartialVolume
bb7199adf6 Bump version to v0.32.010 2021-11-17 15:39:54 +00:00
PartialVolume
e2cd608741 Merge pull request #378 from PartialVolume/Add_VRFY_instead_of_WIPE_when_verify_ones_or_zeros_only_is_selected
Distinguish between a wipe & verify
2021-11-17 15:38:16 +00:00
PartialVolume
a4d2418597 Distinguish between a wipe & verify
In the drive selection window when you
select a drive, the drive is identified
as selected for wiping with the [wipe]
label, however if you then select a
verify only method such as 'verify with
ones' or 'verify with zeros' it still
says [wipe] which is technically a
contradiction.

This patch changes the [wipe] to a
[vrfy] when a verify only method is
selected. If a method is selected
that writes data to the disc then the
label is displayed as [wipe].
2021-11-17 15:27:45 +00:00
PartialVolume
40ae117db4 Merge pull request #377 from PartialVolume/add_temperature_support_to_nvme_drives
Add temperature support to NVME drives, patch #1 ready for checking @Firminator . Thanks
2021-11-17 14:44:53 +00:00
PartialVolume
4ef3dbc5dd Add temperature support to NVME drives
Patch #1 (first check)
2021-11-17 14:37:16 +00:00
PartialVolume
93fe596c04 Merge pull request #375 from PartialVolume/Dont_calculate_ETA_when_throughput_is_zero
Fixes ETA under fault condition
2021-11-17 11:53:38 +00:00
PartialVolume
dd44cc8176 Fixes ETA under fault condition
If a faulty drive fails mid wipe and it's
throughput drops until eventually reaching
zero. The ETA calculation grows to an enormously
high value.

This patch prevents the ETA being calculated if
the throughput for a given drive drops below
100,000 bytes per second. In this way we can still
see that something is wrong because the ETA is much
higher than normal but prevents the sort of calculation
that looks like this ! 90867213:29:12 i.e ..
90,867,213 hours, 29 minutes and 12 seconds, or put
another way, 3,786,133 days or 10,372 years.
2021-11-17 11:50:22 +00:00
PartialVolume
c6fda62558 Merge pull request #374 from PartialVolume/Make_verify_error_message_more_succinct_to_reduce_line_wrap_on_many_verification_errors
Make verify & pass error succinct
2021-11-17 10:45:10 +00:00
PartialVolume
87f63e1388 Make verify & pass error succinct
When many verification or pass errors are detected
the status line can wrap on a 80 column display.

This patch makes the error message more succinct
which will free up about 10 characters & prevents
the line wrapping.
2021-11-17 10:40:36 +00:00
PartialVolume
bfe5939e33 Merge pull request #373 from PartialVolume/Fix_intermittent_FAILED_message_instead_of_UABORTED_on_control-C
Fix summary table - Control-C
2021-11-17 10:03:45 +00:00
PartialVolume
fb6b47d12a Fix summary table - Control-C
If you used control-c during a wipe,
the summary table would report FAILED
rather than UABORTED, even though no
errors had occured and no errors were
reported in the error summary table.

The correct message on control-c abort
should be UABORTED if no errors on that
drive had so far been detected or FAILED
if errors had been detected.

nwipe reported correctly when letting
the wipe continue to it's natural completion.

This patch fixes that issue.
2021-11-17 09:59:20 +00:00
PartialVolume
5d0d0ecb8a Merge pull request #371 from PartialVolume/Add_LU_WWN_ID_to_the_list_of_items_that_can_be_anonymized
Anonymize 'LU WWN ID' when -q specified.
2021-11-16 17:54:11 +00:00
PartialVolume
5cb27e60ce Anonymize 'LU WWN ID' when -q specified.
Add 'LU WWN ID' to the list of data returned
by smartctl that should be anonymized when
-q or --quiet is specified.
2021-11-16 17:48:50 +00:00
PartialVolume
f3f5ab1cac Bump version 2021-11-15 22:00:57 +00:00
PartialVolume
357031ce54 Merge pull request #367 from PartialVolume/Anonymize_SMBIOS-DMI_data_in_log_when_q_option_used
Anonymize SMBIOS/DMI data if -q --quiet specified
2021-11-15 21:57:41 +00:00
PartialVolume
190dae3dec Anonymize SMBIOS/DMI data if -q --quiet specified 2021-11-15 21:46:20 +00:00
PartialVolume
b9cb2369d1 Merge pull request #366 from PartialVolume/Add_anonymize_serial_numbers_option
Add -q --quiet option - anonymize serial numbers
2021-11-15 18:41:03 +00:00
PartialVolume
e982ca5fee Add -q --quiet option - anonymize serial numbers
Anonymize the serial numbers in the gui, the
log and the summary table.

If a serial number was obtained from the device,
it is replaced with "XXXXXXXXXXXXXXX".

If the serial number could not be obtained from the
device, it's replaced with "???????????????".
2021-11-15 18:19:47 +00:00
PartialVolume
a074be7f87 Merge pull request #365 from PartialVolume/Remove_dev_prefix_for_long_device_names_for_gui
Remove /dev/ from gui for long filenames
2021-11-15 10:07:47 +00:00