#
a2f733ab |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
lib: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
lib: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0 |
|
#
1abf1e8c |
| 27-Nov-2021 |
Andriy Gapon <avg@FreeBSD.org> |
cam_get_device: resolve path links before parsing device name
The CAM subsystem uses bus:taget:lun tuple to address peripherals. But for convenience many userland programs such as camcontrol accept
cam_get_device: resolve path links before parsing device name
The CAM subsystem uses bus:taget:lun tuple to address peripherals. But for convenience many userland programs such as camcontrol accept devices names such as da0. There is a libcam function, cam_open_device, to support that. It first calls cam_get_device() to parse the device name as a driver name and a unit (and handle some special device name prefixes) and then uses cam_lookup_pass() to find a matching pass device.
This change extends cam_get_device() to apply realpath(3) to the device name before parsing it. This will allow to use tools such as camcontrol and smartctl with symbolic links that could be friendlier (more distinguished) names for devices.
MFC after: 3 weeks Relnotes: maybe
show more ...
|
Revision tags: release/13.0.0 |
|
#
3e404b8c |
| 29-Dec-2020 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
libcam(3): make cam_getccb(3) zero the whole ccb, not just the header
Leaving zeroing to the clients leads to error-prone pointer tricks (zeroing needs to preserve the CCB header), and this code is
libcam(3): make cam_getccb(3) zero the whole ccb, not just the header
Leaving zeroing to the clients leads to error-prone pointer tricks (zeroing needs to preserve the CCB header), and this code is not performance-critical, so there's really no reason to not do it.
Reviewed By: imp, rpokala (manpages) Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D27333
show more ...
|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
0812ee3a |
| 07-Dec-2017 |
Alan Somers <asomers@FreeBSD.org> |
Fix a null-pointer dereference and a tautological check in cam_get_device
Reported by: Coverity CID: 1017964 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://revie
Fix a null-pointer dereference and a tautological check in cam_get_device
Reported by: Coverity CID: 1017964 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13184
show more ...
|
#
5e53a4f9 |
| 26-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error pr
lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
33193da2 |
| 29-Mar-2017 |
Enji Cooper <ngie@FreeBSD.org> |
Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf)
Part of my original reasoning as far as converting the snprintf calls was to permit switching over from char[] to wchar_t[] i
Fix up r316081 by using nitems(cam_errbuf) instead of sizeof(cam_errbuf)
Part of my original reasoning as far as converting the snprintf calls was to permit switching over from char[] to wchar_t[] in the future, as well as futureproof in case cam_errbuf's size was ever changed.
Unfortunately, my approach was bugged because it conflated the number of items with the size of the buffer, instead of the number of elements being a fixed size != 1 byte.
Use nitems(..) instead which counts the quantity of items of a specific type, as opposed to an unqualified sizeof(..) (which assumes that the number of characters is equal to the buffer size).
MFC after: 2 months Noted by: cem Sponsored by: Dell EMC Isilon
show more ...
|
#
c9bac21c |
| 29-Mar-2017 |
Enji Cooper <ngie@FreeBSD.org> |
libcam: use __func__ instead of hardcoding the function name as `func_name`
MFC after: 3 days Tested with: `cam_device_copy(NULL, NULL)` // ;).. Sponsored by: Dell EMC Isilon
|
#
7b7820a8 |
| 28-Mar-2017 |
Enji Cooper <ngie@FreeBSD.org> |
Use `sizeof(cam_errbuf)` instead of `CAM_ERRBUF_SIZE` in snprintf calls
Reindent snprintf calls' arguments to match style(9) guidelines with respect to indentation.
MFC after: 3 days Sponsored by:
Use `sizeof(cam_errbuf)` instead of `CAM_ERRBUF_SIZE` in snprintf calls
Reindent snprintf calls' arguments to match style(9) guidelines with respect to indentation.
MFC after: 3 days Sponsored by: Dell EMC Isilon
show more ...
|
#
4056f956 |
| 20-Mar-2017 |
Enji Cooper <ngie@FreeBSD.org> |
libcam: NULL out freed `ccb.cdm.matches` and `ccb.cdm.patterns` pointers
This is being done to avoid potential double frees with the values.
Differential Revision: D9970 MFC after: 1 week Reviewed
libcam: NULL out freed `ccb.cdm.matches` and `ccb.cdm.patterns` pointers
This is being done to avoid potential double frees with the values.
Differential Revision: D9970 MFC after: 1 week Reviewed by: imp Sponsored by: Dell EMC Isilon
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
95320ace |
| 24-May-2016 |
Don Lewis <truckman@FreeBSD.org> |
Fix multiple Coverity Out-of-bounds access false postive issues in CAM
The currently used idiom for clearing the part of a ccb after its header generates one or two Coverity errors for each time it
Fix multiple Coverity Out-of-bounds access false postive issues in CAM
The currently used idiom for clearing the part of a ccb after its header generates one or two Coverity errors for each time it is used. All instances generate an Out-of-bounds access (ARRAY_VS_SINGLETON) error because of the treatment of the header as a two element array, with a pointer to the non-existent second element being passed as the starting address to bzero(). Some instances also alsp generate Out-of-bounds access (OVERRUN) errors, probably because the space being cleared is larger than the sizeofstruct ccb_hdr).
In addition, this idiom is difficult for humans to understand and it is error prone. The user has to chose the proper struct ccb_* type (which does not appear in the surrounding code) for the sizeof() in the length calculation. I found several instances where the length was incorrect, which could cause either an actual out of bounds write, or incompletely clear the ccb.
A better way is to write the code to clear the ccb itself starting at sizeof(ccb_hdr) bytes from the start of the ccb, and calculate the length based on the specific type of struct ccb_* being cleared as specified by the union ccb member being used. The latter can normally be seen in the nearby code. This is friendlier for Coverity and other static analysis tools because they will see that the intent is to clear the trailing part of the ccb.
Wrap all of the boilerplate code in a convenient macro that only requires a pointer to the desired union ccb member (or a pointer to the union ccb itself) as an argument.
Reported by: Coverity CID: 1007578, 1008684, 1009724, 1009773, 1011304, 1011306 CID: 1011307, 1011308, 1011309, 1011310, 1011311, 1011312 CID: 1011313, 1011314, 1011315, 1011316, 1011317, 1011318 CID: 1011319, 1011320, 1011321, 1011322, 1011324, 1011325 CID: 1011326, 1011327, 1011328, 1011329, 1011330, 1011374 CID: 1011390, 1011391, 1011392, 1011393, 1011394, 1011395 CID: 1011396, 1011397, 1011398, 1011399, 1011400, 1011401 CID: 1011402, 1011403, 1011404, 1011405, 1011406, 1011408 CID: 1011409, 1011410, 1011411, 1011412, 1011413, 1011414 CID: 1017461, 1018387, 1086860, 1086874, 1194257, 1229897 CID: 1229968, 1306229, 1306234, 1331282, 1331283, 1331294 CID: 1331295, 1331535, 1331536, 1331539, 1331540, 1341623 CID: 1341624, 1341637, 1341638, 1355264, 1355324 Reviewed by: scottl, ken, delphij, imp MFH: 1 month Differential Revision: https://reviews.freebsd.org/D6496
show more ...
|
#
0edd2576 |
| 16-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
fbcdfe1d |
| 14-Apr-2016 |
Enji Cooper <ngie@FreeBSD.org> |
Clean up trailing whitespace in lib/libcam; no functional change
MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division
|
Revision tags: release/10.3.0 |
|
#
b626f5a7 |
| 04-Jan-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH r289384-r293170
Sponsored by: The FreeBSD Foundation
|
#
a5d8944a |
| 19-Nov-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Catch up with head (r291075).
|
#
11d38a57 |
| 28-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
Sponsored by: Gandi.net
|
#
031c294c |
| 19-Oct-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
211d8666 |
| 17-Oct-2015 |
Enji Cooper <ngie@FreeBSD.org> |
Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd descriptor to avoid trashing valid file descriptors that access dev->fd at a later point in time
PR: 192671 Submitted by: Sc
Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd descriptor to avoid trashing valid file descriptors that access dev->fd at a later point in time
PR: 192671 Submitted by: Scott Ferris <scott.ferris@isilon.com> MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
show more ...
|
Revision tags: release/10.2.0, release/10.1.0, release/9.3.0 |
|
#
9d2ab4a6 |
| 27-Apr-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head
|
#
84e51a1b |
| 23-Apr-2014 |
Alan Somers <asomers@FreeBSD.org> |
IFC @264767
|
#
485ac45a |
| 04-Feb-2014 |
Peter Grehan <grehan@FreeBSD.org> |
MFC @ r259205 in preparation for some SVM updates. (for real this time)
|
Revision tags: release/10.0.0 |
|
#
f9b2a21c |
| 31-Oct-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge head r232040 through r257457. M usr.sbin/portsnap/portsnap/portsnap.8 M usr.sbin/portsnap/portsnap/portsnap.sh M usr.sbin/tcpdump/tcpdump/Makefile
|
#
169a84dd |
| 30-Oct-2013 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
Add missing header.
Submitted by: Sean Bruno
|
#
abe83505 |
| 30-Oct-2013 |
Nathan Whitehorn <nwhitehorn@FreeBSD.org> |
printf() specifier updates to CAM to handle either 32-bit or 64-bit lun_id_t.
MFC after: 2 weeks
|