| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If devfs_set_cdevpriv() fails, we will panic when we enter the
cuse_client_free() callback, for a number of reasons:
- pcc->server is not yet assigned, so we'll use a NULL pointer.
- pcc has not yet been added to the pcs->hcli TAILQ, but we'll try to
remove it.
- pccmd->sx and pccmd->cv are not yet initializated, but we'll try to
destroy them.
Even if we'd get past all these somehow, we'd still get two errors in
the devfs_set_cdevpriv() failure block:
- We'll unref the server twice, once in cuse_client_free(), and again in
cuse_client_open().
- A double-free panic, since we'd be trying to free(pcc), which has
already been freed in cuse_client_free().
Fix all those issues. While here, also get rid of some unnecessary
devfs_clear_cdevpriv().
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D53708
|
| |
|
|
|
|
|
|
| |
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D52045
|
| |
|
|
| |
MFC after: 3 days
|
| |
|
|
|
|
| |
No functional change intended.
MFC after: 1 week
|
| |
|
|
| |
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
|
| |
|
|
|
|
|
|
|
| |
No functional change intended.
Differential Revision: https://reviews.freebsd.org/D36633
Suggested by: jrtc27@ and avg@
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
|
|
|
| |
When doing small reads and writes use an intermediate buffer to store the
data to save locking the remote process to access data.
Reviewed by: imp @
Differential Revision: https://reviews.freebsd.org/D36633
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
|
|
| |
No functional change intended.
Reviewed by: imp @
Differential Revision: https://reviews.freebsd.org/D36633
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Currently the cuse(3) mmap(2) offset is split into 128 banks of 16 Mbytes.
Allow cuse(3) to make allocations that span multiple banks at the expense
of any fragmentation issues that may arise. Typically mmap(2) buffers are
well below 16 Mbytes. This allows 8K video resolution to work using webcamd.
Reviewed by: markj @
Differential Revision: https://reviews.freebsd.org/D35830
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
| |
The page allocation limit is inclusive and not exclusive.
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
|
| |
To allow for a dynamic page size on arm64 remove the static value from libcuse.
Differential Revision: https://reviews.freebsd.org/D35585
MFC after: 1 week
Sponsored by: NVIDIA Networking
|
| |
|
|
|
|
|
|
|
|
|
|
| |
module by name and not only by the version information, so that
"kldstat -q -m cuse" works.
Found by: Goran Mekic <meka@tilda.center>
MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking
Notes:
svn path=/head/; revision=366961
|
| |
|
|
| |
Notes:
svn path=/head/; revision=365070
|
| |
|
|
|
|
|
|
|
|
|
| |
PR: 240545
Submitted by: Andrew Reiter <arr@watson.org>
Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25765
Notes:
svn path=/head/; revision=363446
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement one mutex per cuse(3) server instance which also cover the
clients belonging to the given server instance.
This should significantly reduce the mutex congestion inside the
cuse(3) kernel module when multiple servers are in use.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=359452
|
| |
|
|
|
|
|
|
|
|
|
| |
devices have been destroyed to avoid creating character devices with
identical name.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=349368
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The final server unref should be done by the server thread to prevent
deadlock in the client cdevpriv destructor, which cannot destroy
itself.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=349367
|
| |
|
|
|
|
|
|
|
|
|
| |
compat mode or not. This is useful when implementing compatibility ioctl(2)
handlers in userspace.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=346356
|
| |
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=333806
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=332122
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of malloc(). The SWAP objects are automagically freed when there are no
more consumers. This greatly simplifies the mmap logic inside CUSE(3) in the
kernel. This change fixes an issue where mmapped memory can accumulate and never
get freed, if many different mmap sizes are needed over time. Further this
change fixes memory leaks when the CUSE(3) kernel module is unloaded.
While at it make sure the CUSE_ALLOC_PAGES_MAX limit is treated as an exclusive
limit. CUSE(3) memory maps must be less than CUSE_ALLOC_PAGES_MAX number of pages.
Reviewed by: kib @
Differential Revision: https://reviews.freebsd.org/D11392
Sponsored by: Mellanox Technologies
MFC after: 1 week
Notes:
svn path=/head/; revision=325362
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This error code is useful when emulating Linux input event
devices from userspace.
PR: 218626
Submitted by: jan.kokemueller@gmail.com
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes:
svn path=/head/; revision=324320
|
| |
|
|
|
|
|
|
|
| |
Avoid locking the global CUSE lock when the polling flags are zero.
MFC after: 1 week
Notes:
svn path=/head/; revision=319355
|
| |
|
|
|
|
|
|
|
|
| |
declaring support for the cuse4bsd interface in cuse.ko.
Found by: Sergey V. Dyatko <sergey.dyatko@gmail.com>
MFC after: 1 week
Notes:
svn path=/head/; revision=306228
|
| |
|
|
|
|
|
|
| |
Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru>
Approved by: re (gjb)
Notes:
svn path=/head/; revision=302381
|
| |
|
|
|
|
|
| |
different from the size of a pointer.
Notes:
svn path=/head/; revision=292594
|
| |
|
|
|
|
|
| |
different from the size of a pointer.
Notes:
svn path=/head/; revision=292593
|
| |
|
|
|
|
|
|
| |
the same time. This can easily lead to a deadlock when destroying the
character devices nodes.
Notes:
svn path=/head/; revision=292592
|
| |
|
|
|
|
|
|
|
|
| |
function. Many existing clients don't understand POLLNVAL and instead
relies on an error code from the read(), write() or ioctl() system
call. Also make sure we wakeup any client pollers before the cuse
server is closing, so they don't wait forever for an event.
Notes:
svn path=/head/; revision=277127
|
| |
|
|
|
|
|
| |
Submitted by: kib @
Notes:
svn path=/head/; revision=267825
|
|
|
The CUSE library is a wrapper for the devfs kernel functionality which
is exposed through /dev/cuse . In order to function the CUSE kernel
code must either be enabled in the kernel configuration file or loaded
separately as a module. Currently none of the committed items are
connected to the default builds, except for installing the needed
header files. The CUSE code will be connected to the default world and
kernel builds in a follow-up commit.
The CUSE module was written by Hans Petter Selasky, somewhat inspired
by similar functionality found in FUSE. The CUSE library can be used
for many purposes. Currently CUSE is used when running Linux kernel
drivers in user-space, which need to create a character device node to
communicate with its applications. CUSE has full support for almost
all devfs functionality found in the kernel:
- kevents
- read
- write
- ioctl
- poll
- open
- close
- mmap
- private per file handle data
Requested by several people. Also see "multimedia/cuse4bsd-kmod" in
ports.
Notes:
svn path=/head/; revision=266581
|