Commit Graph

662 Commits

Author SHA1 Message Date
PartialVolume
978c4e9c8b Fix obscure incorrect summary table status
If the drive becomes non responsive during the wipe, the MB/s will
slowly drop towards 0MB/s and will display a FAILURE -1 error. The logs
will display errors and nwipe's return status will be non zero, however
the summary table may display erased rather than FAILURE, this is because
the wipe thread exited prematurely without setting the pass error.

This fixes the error by checking the context's result status, i.e non zero
on failure and if pass equals zero it makes pass equal to one. This is
then picked up by the summary table log code which then marks the status
correctly as FAILURE in the summary table.
2022-01-12 21:03:58 +00:00
PartialVolume
5ca7458b8c Bump version to 0.32.021 2022-01-09 15:18:32 +00:00
PartialVolume
0bc79f9feb Merge pull request #399 from chkboom/gutmann
Random passes in the Gutmann method should not be rearranged.
2022-01-09 15:16:05 +00:00
AK-47
0b959b62da Random passes in the Gutmann method should not be rearranged.
https://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html
"... random passes before and after the erase process, and by performing the deterministic passes in random order ..."
"The deterministic patterns between the random writes are permuted before the write is performed, ..."
2022-01-08 12:50:18 +11:00
PartialVolume
5e9ff6dfa5 Bumped version and year. 2022-01-06 23:37:02 +00:00
PartialVolume
d964c9245d Merge pull request #398 from chkboom/isaac64
Added ISAAC-64 PRNG for 64-bit systems.
2022-01-06 23:32:56 +00:00
AK-47
aa2c7727c4 Removed asserts and make "remain" const.
Attempt to fix formatting.
2022-01-07 00:28:39 +11:00
AK-47
3094fc2fa7 Leave the blanking setting alone when changing the verification setting. 2022-01-06 21:42:01 +11:00
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