#
771501e9 |
| 26-Dec-2023 |
Mark Johnston <markj@FreeBSD.org> |
ses: Add error checking for copyout() calls
This is in preparation for annotating copyin() and related functions with __result_use_check.
Reviewed by: mav, imp, asomers Tested by: asomers MFC after
ses: Add error checking for copyout() calls
This is in preparation for annotating copyin() and related functions with __result_use_check.
Reviewed by: mav, imp, asomers Tested by: asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43130
show more ...
|
#
519b24f0 |
| 23-Nov-2023 |
Alexander Motin <mav@FreeBSD.org> |
CAM: Replace random sbuf_printf() with cheaper cat/putc.
|
Revision tags: release/14.0.0 |
|
#
2ffd30f7 |
| 06-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Remove left-over sys/cdefs.h in sys/cam
These weren't removed when $FreeBSD$ was removed. They aren't needed and now are a style(9) nonconformity.
Sponsored by: Netflix
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: 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 ...
|
#
fd02926a |
| 14-Apr-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Properly mask out the status bits to get completion code
ccb_h.status has two parts: the actual status and some addition bits to indicate additional information. It must be masked before compar
cam: Properly mask out the status bits to get completion code
ccb_h.status has two parts: the actual status and some addition bits to indicate additional information. It must be masked before comparing against completion codes. Add new inline function cam_ccb_success to simplify this to test whether or not the request succeeded. Most of the code already does this, but a few places don't (the rest likely should be converted to use cam_ccb_status and/or cam_ccb_success, but that's for another day). This caused at least one bug in recognizing devices behind a SATA port multiplexer, though some of these checks were fine with the special knowledge of the code paths involved.
PR: 270459 Sponsored by: Netflix MFC After: 1 week (and maybe a EN requst) Reviewed by: ken, mav Differential Revision: https://reviews.freebsd.org/D39572
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0 |
|
#
170a0a8e |
| 25-Aug-2021 |
Alan Somers <asomers@FreeBSD.org> |
ses: minor cleanup
* Prefer variables of small scope rather than large scope * Remove a magic number * style(9) for return statements * Remove the get_enc_status method, which never did anything * F
ses: minor cleanup
* Prefer variables of small scope rather than large scope * Remove a magic number * style(9) for return statements * Remove the get_enc_status method, which never did anything * Fix a variable type in the handle_string method * Proofread some comments
MFC after: 2 weeks Sponsored by: Spectra Logic, Axcient Reviewed by: ken, mav Differential Revision: https://reviews.freebsd.org/D31686
show more ...
|
#
6637b746 |
| 24-Nov-2021 |
Warner Losh <imp@FreeBSD.org> |
cam: Remove all the write-only variables
Delete all the write only variables in CAM. At worst, the only behavior change would be to prevent core dumps from chasing NULL pointers (though I think in a
cam: Remove all the write-only variables
Delete all the write only variables in CAM. At worst, the only behavior change would be to prevent core dumps from chasing NULL pointers (though I think in all these cases the pointers can't be NULL).
Sponsored by: Netflix
show more ...
|
#
730ea72c |
| 05-Oct-2021 |
Alexander Motin <mav@FreeBSD.org> |
cam(4): Limit search for disks in SES enclosure by single bus
At least for SAS that we only support now disks are typically connected to the same bus as the enclosure. Limiting the search scope mak
cam(4): Limit search for disks in SES enclosure by single bus
At least for SAS that we only support now disks are typically connected to the same bus as the enclosure. Limiting the search scope makes it much faster on systems with multiple buses and thousands of disks.
Reviewed by: imp MFC after: 2 weeks Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D32305
show more ...
|
#
04389c85 |
| 08-Aug-2021 |
Gordon Bergling <gbe@FreeBSD.org> |
Fix some common typos in comments
- s/configuraiton/configuration/ - s/specifed/specified/ - s/compatiblity/compatibility/
MFC after: 5 days
|
#
ec5325db |
| 10-Apr-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
cam: make sure to clear even more CCBs allocated on the stack
This is my second pass, this time over all of CAM except for the SCSI target bits. There should be no functional changes.
Reviewed By:
cam: make sure to clear even more CCBs allocated on the stack
This is my second pass, this time over all of CAM except for the SCSI target bits. There should be no functional changes.
Reviewed By: imp Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D29549
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
27dcd3d9 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
cam: clean up empty lines in .c and .h files
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
c119ccdb |
| 17-Aug-2020 |
Alexander Motin <mav@FreeBSD.org> |
Extend EIIOE field handling according to ses4r5 draft.
It should not affect any existing systems.
MFC after: 2 weeks
|
Revision tags: release/11.4.0 |
|
#
f721fcbc |
| 08-May-2020 |
John Baldwin <jhb@FreeBSD.org> |
Fix a memory leak for ENCIOC_GETSTRING I introduced in r360171.
MFC after: 1 week Sponsored by: DARPA
|
#
47e735ad |
| 21-Apr-2020 |
John Baldwin <jhb@FreeBSD.org> |
Don't access a user buffer directly from the kernel.
The handle_string callback for the ENCIOC_SETSTRING ioctl was passing a user pointer to memcpy(). Fix by using copyin() instead.
For ENCIOC_GET
Don't access a user buffer directly from the kernel.
The handle_string callback for the ENCIOC_SETSTRING ioctl was passing a user pointer to memcpy(). Fix by using copyin() instead.
For ENCIOC_GETSTRING ioctls, the handler was storing the user pointer in a CCB's data_ptr field where it was indirected by other code. Fix this by allocating a temporary buffer (which ENCIOC_SETSTRING already did) and copying the result out to the user buffer after the CCB has been processed.
Reviewed by: kib Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24487
show more ...
|
#
5326289d |
| 17-Apr-2020 |
John Baldwin <jhb@FreeBSD.org> |
Don't try to copyout() to a kernel buffer.
The handle_string callback for the ENCIOC_GET_ENCNAME and ENCIOC_GETENCID ioctls tries to copy the size of the generated string out to userland. However,
Don't try to copyout() to a kernel buffer.
The handle_string callback for the ENCIOC_GET_ENCNAME and ENCIOC_GETENCID ioctls tries to copy the size of the generated string out to userland. However, the callback only has access to the kernel copy of the structure populated by copyin(). The copyout() call simply overwrites the value in the kernel's copy preventing the subsequent overflow prevention logic from working.
Fix this by instead doing a copyout() of the updated length in the caller after the callback returns.
Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D24456
show more ...
|
#
12fec4c3 |
| 06-Apr-2020 |
Alexander Motin <mav@FreeBSD.org> |
Relax too strict SES element descriptors check in r355430.
SES specifications allows the string to be NULL-terminated, while previous code was considering it as invalid due to incorrectly ordered co
Relax too strict SES element descriptors check in r355430.
SES specifications allows the string to be NULL-terminated, while previous code was considering it as invalid due to incorrectly ordered conditions.
MFC after: 1 week Sponsored by: iXsystem, Inc.
show more ...
|
#
e4ee6c54 |
| 19-Mar-2020 |
Alexander Motin <mav@FreeBSD.org> |
Fix SES on device slots without phys after r349321.
Broadcom 9400-8i8e HBAs report virtual SES device, where slots representing external connectors are reported having no phys. Since sasdev_phys is
Fix SES on device slots without phys after r349321.
Broadcom 9400-8i8e HBAs report virtual SES device, where slots representing external connectors are reported having no phys. Since sasdev_phys is NULL there and proto_hdr is a union, ses_paths_iter() misinterpreted them as ATA. Add explicit protocol check to properly differentiate them.
MFC after: 1 week Sponsored by: iXsystems, Inc.
show more ...
|
#
e083fb08 |
| 06-Dec-2019 |
Alan Somers <asomers@FreeBSD.org> |
ses: sanitize illegal strings in SES element descriptors
The SES4r3 standard requires that element descriptors may only contain ASCII characters in the range 0x20 to 0x7e. Some SuperMicro expanders
ses: sanitize illegal strings in SES element descriptors
The SES4r3 standard requires that element descriptors may only contain ASCII characters in the range 0x20 to 0x7e. Some SuperMicro expanders violate that rule. This patch adds a sanity check to ses(4). Descriptors in violation will be replaced by "<invalid>".
This patch fixes "sesutil --libxo xml" on such systems. Previously it would generate non-well-formed XML output.
PR: 241929 Reviewed by: allanjude MFC after: 2 weeks Sponsored by: Axcient
show more ...
|
Revision tags: release/12.1.0 |
|
#
61c1328e |
| 13-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352105 through r352307.
|
#
07f7e4c8 |
| 11-Sep-2019 |
Alexander Motin <mav@FreeBSD.org> |
Fix assumptions of only one device per SES slot.
It is typical to have one, but no longer true for multi-actuator HDDs with separate LUN for each actuator.
MFC after: 4 days Sponsored by: iXsystems
Fix assumptions of only one device per SES slot.
It is typical to have one, but no longer true for multi-actuator HDDs with separate LUN for each actuator.
MFC after: 4 days Sponsored by: iXsystems, Inc.
show more ...
|
#
c5c3ba6b |
| 03-Sep-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r351317 through r351731.
|
#
6a216c0b |
| 29-Aug-2019 |
Alexander Motin <mav@FreeBSD.org> |
Take proper lock in ses_setphyspath_callback().
XPT_DEV_ADVINFO call should be protected by the lock of the specific device it is addressed to, not the lock of SES device. In some weird case, proba
Take proper lock in ses_setphyspath_callback().
XPT_DEV_ADVINFO call should be protected by the lock of the specific device it is addressed to, not the lock of SES device. In some weird case, probably with hardware violating standards, it sometimes caused NULL dereference due to race.
To protect from it further, add lock assertion to *_dev_advinfo().
MFC after: 1 week Sponsored by: iXsystems, Inc.
show more ...
|
Revision tags: release/11.3.0 |
|
#
7f49ce7a |
| 28-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @349476
Sponsored by: The FreeBSD Foundation
|