#
ef9ffb85 |
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
d068ea16 |
| 28-Dec-2023 |
Mark Johnston <markj@FreeBSD.org> |
cam: Let cam_periph_unmapmem() return an error
As of commit b059686a71c8, cam_periph_unmapmem() can legitimately fail if the copyout() operation fails. However, this failure was never signaled to u
cam: Let cam_periph_unmapmem() return an error
As of commit b059686a71c8, cam_periph_unmapmem() can legitimately fail if the copyout() operation fails. However, this failure was never signaled to upper layers. In practice it is unlikely to occur since cap_periph_mapmem() would most likely fail in such circumstances anyway, but an error is nonetheless possible.
However, some code reading revealed a few paths where the return value of cam_periph_mapmem() is not checked, and this is definitely a bug. Add error checking there and let cam_periph_unmapmem() return errors from copyout().
Reviewed by: dab, mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D43201
show more ...
|
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/
|
#
e474a8e2 |
| 28-Jul-2023 |
Warner Losh <imp@FreeBSD.org> |
cam: Log errors from passthru commands
Since a30ecd42b8e09 we've logged almost all unexpected errors from commands. However, some passthru commands were not logged via devctl. To fix this, pass all
cam: Log errors from passthru commands
Since a30ecd42b8e09 we've logged almost all unexpected errors from commands. However, some passthru commands were not logged via devctl. To fix this, pass all requests through passerror (which calls cam_periph_error), but flag those requests that didn't want error recovery as SF_NO_RECOVERY, like we do for device probing. By doing this we get identical behavior to the current code, but log these errors.
We have had hangs on drives that seems to show no error. Vendor analysis of the drive found an illegal command that happen to hang the drive. In verifying their analysis, we discovered that the pass through commands from things like smartctl that encountered errors or timeouts weren't logged.
Sponsored by: Netflix Reviewed by: ken, mav Differential Revision: https://reviews.freebsd.org/D41167
show more ...
|
#
7c5d20a6 |
| 25-Jul-2023 |
Warner Losh <imp@FreeBSD.org> |
cam/scsi: Migrate to modern uintXX_t from u_intXX_t
As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html move to the modern uintXX_t.
MFC After: 3 days Sponsored by: Netflix
|
#
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 |
|
#
5f438dd3 |
| 11-Jun-2022 |
Alan Somers <asomers@FreeBSD.org> |
ses: don't panic if disk elements have really weird descriptors
SES allows element descriptors to contain characters like spaces and quotes that devfs does not allow to appear in device aliases. Si
ses: don't panic if disk elements have really weird descriptors
SES allows element descriptors to contain characters like spaces and quotes that devfs does not allow to appear in device aliases. Since SES element descriptors are outside of the kernel's control, we should gracefully handle a failure to create a device physical path alias.
PR: 264513 Reported by: Yuri <yuri@aetern.org> Reviewed by: imp, mav Sponsored by: Axcient MFC after: 2 weeks
show more ...
|
Revision tags: release/13.1.0 |
|
#
ca2a7262 |
| 13-Jan-2022 |
Kenneth D. Merry <ken@FreeBSD.org> |
Free UMA zones when a pass(4) instance goes away.
If the UMA zones are not freed, we get warnings about re-using the sysctl variables associated with the UMA zones, and we're leaking the other memor
Free UMA zones when a pass(4) instance goes away.
If the UMA zones are not freed, we get warnings about re-using the sysctl variables associated with the UMA zones, and we're leaking the other memory associated with the zone structures. e.g.:
sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.size)! sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.flags)! sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.bucket_size)! sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.bucket_size_max)! sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.name)! sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.rsize)! sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.ppera)! sysctl_warn_reuse: can't re-use a leaf (vm.uma.pass44.keg.ipers)!
Also, correctly clear the PASS_FLAG_ZONE_INPROG flag in passcreatezone(). The way it was previously done, it would have had set the flag and cleared all other flags that were set at that point.
MFC after: 1 week Sponsored by: Spectra Logic
show more ...
|
Revision tags: release/12.3.0 |
|
#
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 ...
|
#
a081a943 |
| 06-Jul-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
cam: drop unused 'saved_ccb' field from softcs
No functional changes. Do not MFC this, it changes kernel ABI.
Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://re
cam: drop unused 'saved_ccb' field from softcs
No functional changes. Do not MFC this, it changes kernel ABI.
Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D30698
show more ...
|
Revision tags: release/13.0.0 |
|
#
cd853791 |
| 28-Nov-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pag
Make MAXPHYS tunable. Bump MAXPHYS to 1M.
Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys.
Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value.
Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work.
Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav.
Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225
show more ...
|
Revision tags: 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)
|
#
f1f3f7cf |
| 18-Aug-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
cam: add missing MAKEDEV_NOWAIT in passregister
Reported by: dhw
|
Revision tags: release/11.4.0 |
|
#
ab485b01 |
| 13-Apr-2020 |
Warner Losh <imp@FreeBSD.org> |
Checks here against useracc are not useful and are racy.
copyin/copyout are sufficient to guard against bad addresses. They will return EFAULT if the user is up to no good (by choice or ignorance).
Checks here against useracc are not useful and are racy.
copyin/copyout are sufficient to guard against bad addresses. They will return EFAULT if the user is up to no good (by choice or ignorance). There's no point in checking, since it doesn't even improve the error messages.
Noticed by: jhb Reviewed by: brooks, jhb
show more ...
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
7648bc9f |
| 13-May-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @347527
Sponsored by: The FreeBSD Foundation
|
#
8cb46437 |
| 06-May-2019 |
Alexander Motin <mav@FreeBSD.org> |
Drop periph lock around cam_periph_unmapmem().
Since r345656 it may call copyout(), that may sleep.
MFC after: 3 days Sponsored by: iXsystems, Inc.
|
Revision tags: release/12.0.0, release/11.2.0 |
|
#
eed99e75 |
| 01-May-2018 |
Scott Long <scottl@FreeBSD.org> |
cam_periph_runccb() changed several years ago to overwrite the ccb callback pointer. It's now unhelpful and misleading for callers to continue to set it, so bring all callers into conformance. Ther
cam_periph_runccb() changed several years ago to overwrite the ccb callback pointer. It's now unhelpful and misleading for callers to continue to set it, so bring all callers into conformance. There's no real functional change, but it makes reading the code a lot less confusing.
Sponsored by: Netflix
show more ...
|
#
6469bdcd |
| 06-Apr-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Move most of the contents of opt_compat.h to opt_global.h.
opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is close
Move most of the contents of opt_compat.h to opt_global.h.
opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options.
Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures.
Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files.
Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941
show more ...
|
#
871dc983 |
| 12-Mar-2018 |
Brooks Davis <brooks@FreeBSD.org> |
Reject CAMIOGET and CAMIOQUEUE ioctl's on pass(4) in 32-bit compat mode.
These take a union ccb argument which is full of kernel pointers. Substantial translation efforts would be required to make t
Reject CAMIOGET and CAMIOQUEUE ioctl's on pass(4) in 32-bit compat mode.
These take a union ccb argument which is full of kernel pointers. Substantial translation efforts would be required to make this work. By rejecting the request we avoid processing or returning entierly wrong data.
Reviewed by: imp, ken, markj, cem Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14654
show more ...
|
#
99e7a4ad |
| 06-Feb-2018 |
Scott Long <scottl@FreeBSD.org> |
Return a C errno for cam_periph_acquire().
There's no compelling reason to return a cam_status type for this function and doing so only creates confusion with normal C coding practices. It's technic
Return a C errno for cam_periph_acquire().
There's no compelling reason to return a cam_status type for this function and doing so only creates confusion with normal C coding practices. It's technically an API change, but the periph API isn't widely used. No efffective change to operation.
Reviewed by: imp, mav, ken Sponsored by: Netflix Differential Revision: D14063
show more ...
|
#
4fc74049 |
| 29-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r327169 through r327340.
|
#
151ba793 |
| 25-Dec-2017 |
Alexander Kabaev <kan@FreeBSD.org> |
Do pass removing some write-only variables from the kernel.
This reduces noise when kernel is compiled by newer GCC versions, such as one used by external toolchain ports.
Reviewed by: kib, andrew(
Do pass removing some write-only variables from the kernel.
This reduces noise when kernel is compiled by newer GCC versions, such as one used by external toolchain ports.
Reviewed by: kib, andrew(sys/arm and sys/arm64), emaste(partial), erj(partial) Reviewed by: jhb (sys/dev/pci/* sys/kern/vfs_aio.c and sys/kern/kern_synch.c) Differential Revision: https://reviews.freebsd.org/D10385
show more ...
|
#
762a7f4f |
| 07-Dec-2017 |
Warner Losh <imp@FreeBSD.org> |
Define xpt_path_inq.
This provides a nice wrarpper around the XPT_PATH_INQ ccb creation and calling.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13387
|