Skip to content

Commit 4536143

Browse files
committed
feat: Finish more_hardening
Finishing integrating security feature updates. Updates include C11 annex-k type functions, GCC/Clang attributes to catch compile time issues with the libraries, and updates to secure_file to better message errors to users.
2 parents 2db1972 + 9c23a10 commit 4536143

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+12663
-9573
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
task:
33
name: FreeBSD
44
env:
5-
GITHUB_TOKEN: ENCRYPTED[!ee1c9f1da9e4736edb4f543b3d2431949b17e6a86877e95ca4323f677185f7fbaae52c6afeb8145f0735bad487291a27!]
5+
GITHUB_TOKEN: ENCRYPTED[!7caf87915c9ce489a116c7ce1bd09d806f892e8375a3a1af35c5dad0e01633e8bf795fe265aab9a5b57919112fdfa29c!]
66
freebsd_instance:
77
matrix:
88
image_family: freebsd-14-1

.clang-format

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Use the Microsoft coding style
2+
# This is the style our code already mostly followed-TJE
3+
BasedOnStyle: Microsoft
4+
5+
# Additional Customizations
6+
PointerAlignment: Left
7+
AlignConsecutiveAssignments: true
8+
AlignConsecutiveDeclarations: true
9+
AlignTrailingComments: true
10+
AlignAfterOpenBracket: true
11+
BinPackParameters: false
12+
AllowAllParametersOfDeclarationOnNextLine: false
13+
AlignConsecutiveMacros: 'AcrossEmptyLines'
14+
BraceWrapping:
15+
AfterControlStatement: true
16+
AllowShortBlocksOnASingleLine: Never
17+
AllowShortIfStatementsOnASingleLine: Never
18+
IndentPPDirectives: AfterHash
19+
BreakBeforeBraces: Allman

.clang-tidy

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Checks:
2+
'-*,
3+
modernize-*,
4+
cert-*,
5+
bugprone-*,
6+
-bugprone-easily-swappable-parameters,
7+
clang-analyzer-*,
8+
-clang-analyzer-deadcode.DeadStores,
9+
misc-*,
10+
-misc-no-recursion,
11+
-misc-unused-parameters,
12+
readability-non-const-parameter,
13+
readability-inconsistent-declaration-parameter-name,
14+
readability-redundant-control-flow,
15+
readability-duplicate-include,
16+
readability-avoid-const-params-in-decls,
17+
readability-function-cognitive-complexity'
18+
19+
# Other available checks:
20+
# clang-analyzer-*, performance-*, readability-*, misc-*
21+
22+
# Disabled checks:
23+
# - bugprone-easily-swappable-parameters:
24+
# Warns a LOT. Sometimes on functions meant to look like standardized C11 annex k functions.
25+
# While overall useful, it's too noisy right now and may complicate API usability.
26+
# - clang-analyzer-deadcode.DeadStores:
27+
# Generates many warnings. Cleanup is needed, but focus on more pressing issues first.
28+
# - misc-no-recursion:
29+
# Recursion is useful in our code, so this check is not applicable.
30+
# - misc-unused-parameters:
31+
# Too many false positives.
32+
# - readability-*:
33+
# Currently generates too many warnings. Manually adding rules until we can address these issues later.
34+
35+
WarningsAsErrors: ''
36+
HeaderFilterRegex: '.*'
37+
AnalyzeTemporaryDtors: false
38+
FormatStyle: 'file'

docs/man/man8/openSeaChest_Basics.8

+22-27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
2-
.TH OPENSEACHEST_BASICS "1" "September 2024" "openSeaChest_Basics ==========================================================================================" "User Commands"
2+
.TH OPENSEACHEST_BASICS "1" "October 2024" "openSeaChest_Basics ==========================================================================================" "User Commands"
33
.SH NAME
44
openSeaChest_Basics \- manual page for openSeaChest_Basics ==========================================================================================
55
.SH DESCRIPTION
@@ -8,8 +8,8 @@ openSeaChest_Basics \- manual page for openSeaChest_Basics =====================
88
openSeaChest_Basics \- openSeaChest drive utilities \- NVMe Enabled
99
Copyright (c) 2014\-2024 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
1010
openSeaChest_Basics Version: 3.6.2\-8_0_1 X86_64
11-
Build Date: Sep 19 2024
12-
Today: 20240925T133704 User: current user
11+
Build Date: Oct 29 2024
12+
Today: 20241030T162217 User: current user
1313
.PP
1414
==========================================================================================
1515
Usage
@@ -73,18 +73,6 @@ Anything else = unknown error
7373
Utility Options
7474
===============
7575
.HP
76-
\fB\-\-csmiIgnorePort\fR (Obsolete)
77-
.IP
78-
This option is obsolete and will be removed in future versions.
79-
.HP
80-
\fB\-\-csmiUsePort\fR (Obsolete)
81-
.IP
82-
This option is obsolete and will be removed in future versions.
83-
.HP
84-
\fB\-\-csmiVerbose\fR (Obsolete)
85-
.IP
86-
This option is obsolete and will be removed in future versions.
87-
.HP
8876
\fB\-\-echoCommandLine\fR
8977
.IP
9078
Echo the command line entered into the utility on the screen.
@@ -238,10 +226,6 @@ interfaceSCSI \- show devices on a SCSI or SAS interface
238226
interfaceNVME = show devices on an NVMe interface
239227
sd \- show sd device handles
240228
sgtosd \- show the sd and sg device handle mapping
241-
ignoreCSMI \- do not scan for any CSMI devices
242-
allowDuplicates \- allow drives with both CSMI and PD handles
243-
.IP
244-
to show up multiple times in the list
245229
.HP
246230
\fB\-S\fR, \fB\-\-Scan\fR
247231
.IP
@@ -259,7 +243,6 @@ devices in the system when the device is unable to come to a ready state.
259243
.IP
260244
Use this option with most commands to specify the device
261245
handle on which to perform an operation. Example: /dev/sg<#>
262-
CSMI device handles can be specified as <error<#><#><#>>
263246
To run across all devices detected in the system, use the
264247
"all" argument instead of a device handle.
265248
Example: \fB\-d\fR all
@@ -592,24 +575,36 @@ with the \fB\-\-trim\fR/\-\-unmapRange option.
592575
openSeaChest_Basics \- openSeaChest drive utilities \- NVMe Enabled
593576
Copyright (c) 2014\-2024 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
594577
openSeaChest_Basics Version: 3.6.2\-8_0_1 X86_64
595-
Build Date: Sep 19 2024
596-
Today: 20240925T133705 User: current user
578+
Build Date: Oct 29 2024
579+
Today: 20241030T162217 User: current user
597580
.PP
598581
==========================================================================================
599582
Version Info for openSeaChest_Basics:
600583
.IP
601584
Utility Version: 3.6.2
602-
opensea\-common Version: 4.1.0
585+
opensea\-common Version: 5.0.0
603586
opensea\-transport Version: 8.0.1
604587
opensea\-operations Version: 8.0.2
605-
Build Date: Sep 19 2024
588+
Build Date: Oct 29 2024
606589
Compiled Architecture: X86_64
607590
Detected Endianness: Little Endian
608-
Compiler Used: GCC
609-
Compiler Version: 11.4.0
591+
Compiler Used: Clang
592+
Compiler Version: 14.0.0
610593
Operating System Type: Linux
611594
Operating System Version: 5.15.153\-1
612-
Operating System Name: Ubuntu 22.04.4 LTS
595+
Operating System Name: Ubuntu 22.04.4 LTS"
596+
.PP
597+
NAME="Ubuntu"
598+
VERSION_ID="22.04"
599+
VERSION="22.04.4 LTS (Jammy Jellyfish)"
600+
VERSION_CODENAME=jammy
601+
ID=ubuntu
602+
ID_LIKE=debian
603+
HOME_URL="https://www.ubuntu.com/"
604+
SUPPORT_URL="https://help.ubuntu.com/"
605+
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
606+
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms\-and\-policies/privacy\-policy"
607+
UBUNTU_CODENAME=jammy
613608
.SH "SEE ALSO"
614609
The full documentation for
615610
.B openSeaChest_Basics

docs/man/man8/openSeaChest_Configure.8

+22-27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
2-
.TH OPENSEACHEST_CONFIGURE "1" "September 2024" "openSeaChest_Configure ==========================================================================================" "User Commands"
2+
.TH OPENSEACHEST_CONFIGURE "1" "October 2024" "openSeaChest_Configure ==========================================================================================" "User Commands"
33
.SH NAME
44
openSeaChest_Configure \- manual page for openSeaChest_Configure ==========================================================================================
55
.SH DESCRIPTION
@@ -8,8 +8,8 @@ openSeaChest_Configure \- manual page for openSeaChest_Configure ===============
88
openSeaChest_Configure \- openSeaChest drive utilities \- NVMe Enabled
99
Copyright (c) 2014\-2024 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
1010
openSeaChest_Configure Version: 2.7.1\-8_0_1 X86_64
11-
Build Date: Sep 19 2024
12-
Today: 20240925T133705 User: current user
11+
Build Date: Oct 29 2024
12+
Today: 20241030T162217 User: current user
1313
.PP
1414
==========================================================================================
1515
Usage
@@ -76,18 +76,6 @@ Anything else = unknown error
7676
Utility Options
7777
===============
7878
.HP
79-
\fB\-\-csmiIgnorePort\fR (Obsolete)
80-
.IP
81-
This option is obsolete and will be removed in future versions.
82-
.HP
83-
\fB\-\-csmiUsePort\fR (Obsolete)
84-
.IP
85-
This option is obsolete and will be removed in future versions.
86-
.HP
87-
\fB\-\-csmiVerbose\fR (Obsolete)
88-
.IP
89-
This option is obsolete and will be removed in future versions.
90-
.HP
9179
\fB\-\-echoCommandLine\fR
9280
.IP
9381
Echo the command line entered into the utility on the screen.
@@ -195,7 +183,6 @@ Utility Arguments
195183
.IP
196184
Use this option with most commands to specify the device
197185
handle on which to perform an operation. Example: /dev/sg<#>
198-
CSMI device handles can be specified as <error<#><#><#>>
199186
To run across all devices detected in the system, use the
200187
"all" argument instead of a device handle.
201188
Example: \fB\-d\fR all
@@ -221,10 +208,6 @@ interfaceSCSI \- show devices on a SCSI or SAS interface
221208
interfaceNVME = show devices on an NVMe interface
222209
sd \- show sd device handles
223210
sgtosd \- show the sd and sg device handle mapping
224-
ignoreCSMI \- do not scan for any CSMI devices
225-
allowDuplicates \- allow drives with both CSMI and PD handles
226-
.IP
227-
to show up multiple times in the list
228211
.HP
229212
\fB\-i\fR, \fB\-\-deviceInfo\fR
230213
.IP
@@ -821,24 +804,36 @@ using a TRIM/UNMAP command.
821804
openSeaChest_Configure \- openSeaChest drive utilities \- NVMe Enabled
822805
Copyright (c) 2014\-2024 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
823806
openSeaChest_Configure Version: 2.7.1\-8_0_1 X86_64
824-
Build Date: Sep 19 2024
825-
Today: 20240925T133705 User: current user
807+
Build Date: Oct 29 2024
808+
Today: 20241030T162217 User: current user
826809
.PP
827810
==========================================================================================
828811
Version Info for openSeaChest_Configure:
829812
.IP
830813
Utility Version: 2.7.1
831-
opensea\-common Version: 4.1.0
814+
opensea\-common Version: 5.0.0
832815
opensea\-transport Version: 8.0.1
833816
opensea\-operations Version: 8.0.2
834-
Build Date: Sep 19 2024
817+
Build Date: Oct 29 2024
835818
Compiled Architecture: X86_64
836819
Detected Endianness: Little Endian
837-
Compiler Used: GCC
838-
Compiler Version: 11.4.0
820+
Compiler Used: Clang
821+
Compiler Version: 14.0.0
839822
Operating System Type: Linux
840823
Operating System Version: 5.15.153\-1
841-
Operating System Name: Ubuntu 22.04.4 LTS
824+
Operating System Name: Ubuntu 22.04.4 LTS"
825+
.PP
826+
NAME="Ubuntu"
827+
VERSION_ID="22.04"
828+
VERSION="22.04.4 LTS (Jammy Jellyfish)"
829+
VERSION_CODENAME=jammy
830+
ID=ubuntu
831+
ID_LIKE=debian
832+
HOME_URL="https://www.ubuntu.com/"
833+
SUPPORT_URL="https://help.ubuntu.com/"
834+
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
835+
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms\-and\-policies/privacy\-policy"
836+
UBUNTU_CODENAME=jammy
842837
.SH "SEE ALSO"
843838
The full documentation for
844839
.B openSeaChest_Configure

docs/man/man8/openSeaChest_Defect.8

+22-27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
2-
.TH OPENSEACHEST_DEFECT "1" "September 2024" "openSeaChest_Defect ==========================================================================================" "User Commands"
2+
.TH OPENSEACHEST_DEFECT "1" "October 2024" "openSeaChest_Defect ==========================================================================================" "User Commands"
33
.SH NAME
44
openSeaChest_Defect \- manual page for openSeaChest_Defect ==========================================================================================
55
.SH DESCRIPTION
@@ -8,8 +8,8 @@ openSeaChest_Defect \- manual page for openSeaChest_Defect =====================
88
openSeaChest_Defect \- openSeaChest drive utilities \- NVMe Enabled
99
Copyright (c) 2014\-2024 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
1010
openSeaChest_Defect Version: 0.9.0\-8_0_1 X86_64
11-
Build Date: Sep 19 2024
12-
Today: 20240925T133705 User: current user
11+
Build Date: Oct 29 2024
12+
Today: 20241030T162217 User: current user
1313
.PP
1414
==========================================================================================
1515
Usage
@@ -42,18 +42,6 @@ Anything else = unknown error
4242
Utility Options
4343
===============
4444
.HP
45-
\fB\-\-csmiIgnorePort\fR (Obsolete)
46-
.IP
47-
This option is obsolete and will be removed in future versions.
48-
.HP
49-
\fB\-\-csmiUsePort\fR (Obsolete)
50-
.IP
51-
This option is obsolete and will be removed in future versions.
52-
.HP
53-
\fB\-\-csmiVerbose\fR (Obsolete)
54-
.IP
55-
This option is obsolete and will be removed in future versions.
56-
.HP
5745
\fB\-\-echoCommandLine\fR
5846
.IP
5947
Echo the command line entered into the utility on the screen.
@@ -161,7 +149,6 @@ Utility Arguments
161149
.IP
162150
Use this option with most commands to specify the device
163151
handle on which to perform an operation. Example: /dev/sg<#>
164-
CSMI device handles can be specified as <error<#><#><#>>
165152
To run across all devices detected in the system, use the
166153
"all" argument instead of a device handle.
167154
Example: \fB\-d\fR all
@@ -187,10 +174,6 @@ interfaceSCSI \- show devices on a SCSI or SAS interface
187174
interfaceNVME = show devices on an NVMe interface
188175
sd \- show sd device handles
189176
sgtosd \- show the sd and sg device handle mapping
190-
ignoreCSMI \- do not scan for any CSMI devices
191-
allowDuplicates \- allow drives with both CSMI and PD handles
192-
.IP
193-
to show up multiple times in the list
194177
.HP
195178
\fB\-i\fR, \fB\-\-deviceInfo\fR
196179
.IP
@@ -389,24 +372,36 @@ starting LBA is specified.
389372
openSeaChest_Defect \- openSeaChest drive utilities \- NVMe Enabled
390373
Copyright (c) 2014\-2024 Seagate Technology LLC and/or its Affiliates, All Rights Reserved
391374
openSeaChest_Defect Version: 0.9.0\-8_0_1 X86_64
392-
Build Date: Sep 19 2024
393-
Today: 20240925T133705 User: current user
375+
Build Date: Oct 29 2024
376+
Today: 20241030T162217 User: current user
394377
.PP
395378
==========================================================================================
396379
Version Info for openSeaChest_Defect:
397380
.IP
398381
Utility Version: 0.9.0
399-
opensea\-common Version: 4.1.0
382+
opensea\-common Version: 5.0.0
400383
opensea\-transport Version: 8.0.1
401384
opensea\-operations Version: 8.0.2
402-
Build Date: Sep 19 2024
385+
Build Date: Oct 29 2024
403386
Compiled Architecture: X86_64
404387
Detected Endianness: Little Endian
405-
Compiler Used: GCC
406-
Compiler Version: 11.4.0
388+
Compiler Used: Clang
389+
Compiler Version: 14.0.0
407390
Operating System Type: Linux
408391
Operating System Version: 5.15.153\-1
409-
Operating System Name: Ubuntu 22.04.4 LTS
392+
Operating System Name: Ubuntu 22.04.4 LTS"
393+
.PP
394+
NAME="Ubuntu"
395+
VERSION_ID="22.04"
396+
VERSION="22.04.4 LTS (Jammy Jellyfish)"
397+
VERSION_CODENAME=jammy
398+
ID=ubuntu
399+
ID_LIKE=debian
400+
HOME_URL="https://www.ubuntu.com/"
401+
SUPPORT_URL="https://help.ubuntu.com/"
402+
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
403+
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms\-and\-policies/privacy\-policy"
404+
UBUNTU_CODENAME=jammy
410405
.SH "SEE ALSO"
411406
The full documentation for
412407
.B openSeaChest_Defect

0 commit comments

Comments
 (0)