| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have hit the case multiple times that some LinuxKPI field may not be
set during driver bringup and lindebugfs would cause a panic.
The backtrace goes like:
strlen() at strlen+0x54
pfs_create_dir() at pfs_create_dir+0x41
debugfs_create_dir() at debugfs_create_dir+0xa1
...
While the problem is clearly in LinuxKPI or the driver, we likely
should at least add an assert to pfs_create_dir() if name is NULL
like we have for pfs_add_node() but for lindebugfs at least make
this a graceful error and continue without creating the dir instead
of panicing.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D54944
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In D52038, we kind of guess at the reason that pfs_create_dir() failed,
which isn't great: it could be EEXISTS, or it could even be ENOMEM.
Change the pfs_create_*() interfaces to return an error and use a double
pointer to return the new node as requested. Outside of the changes
in sys/fs/pseudofs, this diff is the result of running the added
coccinelle script against in-tree pseudofs and fixing all of the
style(9) violations that spatch added.
We set *opn to NULL in the failure cases to avoid breaking callers that
did actually error-check their results, since the cocci patch does not
attempt to handle that in any way.
Reviewed by: des (previous version), kib
Differential Revision: https://reviews.freebsd.org/D52157
|
| |
|
|
|
|
|
|
|
|
| |
If `debugfs_destroy()` is called early as part of error handling during
initialzation, `pn->pn_data` is unset. This led to a panic in that if
because `dm` is NULL.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50985
|
| |
|
|
|
|
|
|
| |
This function is used by the i915 DRM driver starting with Linux 6.8.
Reviewed by: bz, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49067
|
| |
|
|
|
|
|
|
|
|
| |
Change to the C99 version and not the old gcc name.
No functional changes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: dumbbell, emaste
Differential Revision: https://reviews.freebsd.org/D48736
|
| |
|
|
|
|
|
|
|
| |
[Why]
This function is used by hhe DRM generic code starting with Linux 6.7.
Reviewed by: manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48761
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to use lindebugfs for debugging wirless drivers two issues
became apparent:
(a) a panic in lindebugfs calling a hard coded release function if the
caller had not provided one. This seems to be based on assumptions
that no longer hold up. Remove the hard coded release function to
prevent panics.
(b) In LinuxKPI simple_read_from_buffer() would call copy_to_user() but
buffers weren't setup for this (lindebugfs copies data from its
own buffer) and then pseudofs will do another copyout to the user
on this; remove the copy_to_user() and simply copy the data over
to the provided buffer; this works for as long as the only consumers
remain debugfs callers (which currently seems to be the case).
[the only out-of-tree consumers I am aware off are two drm-kmod
drivers/gpu/drm/amd/pm/* debugfs functions I cannot test].
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Tested by: jfree
Differential Revision: https://reviews.freebsd.org/D45755
|
| |
|
|
|
|
|
|
|
|
| |
This is mostly to reduce the diff with CheriBSD which adds additional
constants to enum uio_rw, but also matches the normal style used for
uio_segflg.
Reviewed by: kib, emaste
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D45142
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
This is the same as `debugfs_create_file()` but takes the initial size
of the file. In FreeBSD, the given size is ignored and
`debugfs_create_file()` is called.
Reviewed by: emaste, manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D37914
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The `debugfs_create_x*()` variants are the same as their
`debugfs_create_u*()` equivalent, but they work with lowercase
hexadecimal.
While here, fix a few style(9) issues.
Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38087
|
| |
|
|
|
|
| |
Reviewed by: jfree
Approved by: jfree
Differential Revision: https://reviews.freebsd.org/D37915
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add debugfs_create_u8() based on other already present implementations.
Add a read-only implementation for debugfs_create_blob().
Both are needed for iwlwifi debugfs support.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
OKed by: jfree (earlier version)
Differential Revision: https://reviews.freebsd.org/D37090
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This diff extends LinuxKPI to support simple attribute files in debugfs.
These simple attributes are an essential component for compiling drm-kmod
with CONFIG_DEBUG_FS enabled.
This will allow for easier graphics driver debugging using
Intel's igt-gpu-tools.
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D35883
Sponsored by: Google, Inc. (GSoC 2022)
|
| |
|
|
|
|
|
| |
Fix sign.
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
|
| |
This avoids clients using garbage values on the stack and makes
debugging easier.
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
|
|
|
|
| |
For write operation pseudofs creates an sbuf with the data.
Use this data instead of the uio as it's not usable anymore after
uiomove.
Reviewed by: hselasky
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D34114
|
| |
|
|
|
|
|
|
|
|
| |
This makes it possible to run an unmodified Linux syzkaller executor
against the Linuxulator, and have it gather code coverage information.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=365319
|
| |
|
|
| |
Notes:
svn path=/head/; revision=365080
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The source file was moved to base earlier and also improved upon,
but never compiled in. This patch will:
- Make a module in sys/modules
- Make lindebugfs depend on linuxkpi (for seq_file)
- Check if read/write functions are set before calling, DRM drivers
don't always set both of them.
Reviewed by: hps
Approved by: imp (mentor), hps
MFC after: 1 week
Notes:
svn path=/head/; revision=347973
|
|
|
Reviewed by: hps@
MFC after: 1 week
Sponsored by: iX Systems
Differential Revision: https://reviews.freebsd.org/D19258
Notes:
svn path=/head/; revision=344485
|