| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reported by: GCC -Wparantheses
Reviewed by: wulf, hselasky
Differential Revision: https://reviews.freebsd.org/D34197
|
|
|
|
|
| |
Just like other fget routines. This enables embedding fd table pointer
in struct thread, avoiding taking a trip through proc.
|
|
|
|
|
| |
Reviewed by: bz, emaste
Differential Revision: https://reviews.freebsd.org/D34145
|
|
|
|
|
| |
Reviewed by: andrew, emaste
Differential Revision: https://reviews.freebsd.org/D34177
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Don't emit messages; this isn't any different from a Linux kernel
built without OPTIONS_SECCOMP, so the userspace already needs to know
how to deal with it. This is also similar with how we handle seccomp
in linux_prctl().
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D33808
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the PT_GETREGSET and PT_SETREGSET ptrace types. These can be
used to access all the registers from a specified core dump note type.
The NT_PRSTATUS and NT_FPREGSET notes are initially supported. Other
machine-dependant types are expected to be added in the future.
The ptrace addr points to a struct iovec pointing at memory to hold the
registers along with its length. On success the length in the iovec is
updated to tell userspace the actual length the kernel wrote or, if the
base address is NULL, the length the kernel would have written.
Because the data field is an int the arguments are backwards when
compared to the Linux PTRACE_GETREGSET call.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19831
|
|
|
|
|
|
| |
This change was based on currently reverted commit 7dea0c9e6eba.
This reverts commit 89889ab470b9f1a1cd36913dd219b78efbf484df.
|
|
|
|
|
|
|
|
|
|
| |
section"
This change results in deadlocks on UP systems
This reverts commit 7dea0c9e6eba4dc127cd67667c81fa2c250f1024.
Requested by: kib, hselasky
|
|
|
|
|
|
|
|
| |
MFC after: 1 month
MFC with: 1961a14a4743
Fixes: 1961a14a4743 ("linuxkpi: Add i2c support")
Reported by: GregV
Sponsored by: Beckhoff Automation GmbH & Co. KG
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add i2c support to linuxkpi. This is needed by drm-kmod.
For every i2c_adapter added by i2c_add_adapter we add a child to the
device named "lkpi_iic". This child handle the conversion between
Linux i2c_msgs to FreeBSD iic_msgs.
For every i2c_adapter added by i2c_bit_add_bus we add a child to the
device named "lkpi_iicbb". This child handle the conversion between
Linux i2c_msgs to FreeBSD iic_msgs.
With the help of iic(4), this expose the i2c controller to userspace
allowing a user to query DDC information from a monitor.
e.g.: i2c -f /dev/iic0 -a 0x28 -c 128 -d r
will query the standard EDID from the monitor if plugged.
The bitbang part (lkpi_iicbb) isn't tested at all for now as I don't have
compatible hardware (all my hardware have native i2c controller).
Tested on: Intel (SandyBridge, Skylake, ApolloLake)
Tested on: AMD (Picasso, Polaris (amd64 and arm64))
MFC after: 1 month
Reviewed by: hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33053
|
|
|
|
|
|
| |
This reverts commit 56981629f91fcdd358ccb41081ff6dcc2edac12f.
Wrong patch; fails to build on i386.
|
|
|
|
|
|
|
|
|
|
| |
Don't emit warnings; this isn't any different from a Linux kernel
built without OPTIONS_SECCOMP, so the userspace already needs to know
how to deal with it. This is also similar with how we handle seccomp
in linux_prctl().
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D33808
|
|
|
|
|
|
|
|
|
| |
that disables any access to ptrace(2) for all processes.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by replaceing of spin_lock() call with spin_lock_irqsave()
This fixes following panic in drm-kmod:
panic: mi_switch: switch in a critical section
cpuid = 2
time = 1636939794
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b
vpanic() at vpanic+0x187
panic() at panic+0x43
mi_switch() at mi_switch+0x198
__mtx_lock_sleep() at __mtx_lock_sleep+0x1c9
__mtx_lock_flags() at __mtx_lock_flags+0xa2
linux_wake_up() at linux_wake_up+0x38
__active_retire() at __active_retire+0xb7
dma_fence_signal() at dma_fence_signal+0x100
dma_resv_add_shared_fence() at dma_resv_add_shared_fence+0x96
i915_gem_do_execbuffer() at i915_gem_do_execbuffer+0x11d0
i915_gem_execbuffer2_ioctl() at i915_gem_execbuffer2_ioctl+0x19a
drm_ioctl_kernel() at drm_ioctl_kernel+0x72
drm_ioctl() at drm_ioctl+0x2c4
linux_file_ioctl() at linux_file_ioctl+0x297
kern_ioctl() at kern_ioctl+0x1dc
sys_ioctl() at sys_ioctl+0x124
amd64_syscall() at amd64_syscall+0x124
fast_syscall_common() at fast_syscall_common+0xf8
--- syscall (54, FreeBSD ELF64, sys_ioctl)
MFC after: 1 week
Reviewed by: manu
Reported by: Graham Perrin <grahamperrin_AT_gmail_DOT_com>
PR: 261166
Differential Revision: https://reviews.freebsd.org/D33888
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with spinning on spin_trylock. dma-buf part of drm-kmod depends on this
property and absence of it support results in "mi_switch: switch in a
critical section" assertions [1][2].
[1] https://github.com/freebsd/drm-kmod/issues/116
[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261166
MFC after: 1 week
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D33887
|
|
|
|
|
|
|
|
|
| |
The kernel pointers in this structure need to be 32-bit pointers,
not native pointers to 32-bit integers.
Reviewed by: kib
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D33905
|
|
|
|
|
|
|
|
|
|
| |
This provides information about fixed regions of the target process'
user memory map.
Reviewed by: kib
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33708
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASLR stack randomization will reappear in a forthcoming commit. Rather
than inserting a random gap into the stack mapping, the entire stack
mapping itself will be randomized in the same way that other mappings
are when ASLR is enabled.
No functional change intended, as the stack gap implementation is
currently disabled by default.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33704
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than fetching the ps_strings address directly from a process'
sysentvec, use this macro. With stack address randomization the
ps_strings address is no longer fixed.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33704
|
|
|
|
|
|
|
|
|
|
|
| |
The size of the ps_strings structure varies between ABIs, so this is
useful for computing the address of the ps_strings structure relative to
the top of the stack when stack address randomization is enabled.
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33704
|
|
|
|
|
|
| |
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33792
|
|
|
|
|
|
| |
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33790
|
|
|
|
|
|
|
|
| |
From a user point of view, this makes ^T work out of the box.
Reviewed By: debdrup (man page)
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D33842
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
enum ieee80211_channel_flags are used as bit fields and not as 1..n.
Correct the values using BIT(n).
This is also hoped to fix problems with 7260 cards which come up and
panic due to an empty channel list as all channels are set disabled [1].
It will hopefully also fix the one or other oddity.
Reported by: ambrisko, Mike Tancsa (mike sentex.net) [1]
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct data types related to delivery traffic indication map (DTIM)/
timing synchronization function (TSF) and implement/refine their
handling. This information is used/needed by iwlwifi to set a station
as associated. This will hopefully avoid more "no beacon heard"
time event failures.
The recording of the Linux specific sync_device_ts is done in the
receive path for now in case we do have the right information
available. I need to investigate as to how-much it may make sense
to also migrate it into net80211 in the future depending on the
usage in other drivers (or how we did handle this in the past in
natively ported versions, e.g. iwm).
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
Rather than just bouncing back to SCAN bounce to INIT on connection
loss. This is should be refined in the future as the comment already
indicates but we need to tie two different worlds together.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
| |
Requested by: kib
|
|
|
|
| |
Fixes: bd7630ef6198 ia32: Sync signal context type names with i386.
|
|
|
|
|
|
|
|
|
| |
- Use ia32_freebsd4_* instead of ia32_*4.
- Use ia32_o* instead of ia32_*3.
Reviewed by: brooks, imp, kib
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D33882
|
|
|
|
|
|
|
|
| |
Missed issues in truss on at least armv7 and powerpcspe need to be
resolved before recommit.
This reverts commit 3889fb8af0b611e3126dc250ebffb01805152104.
This reverts commit 1544e0f5d1f1e3b8c10a64cb899a936976ca7ea4.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In lkpi_stop_hw_scan() we have to unlock around cancelling the
hardware scan and an msleep to wait for the confirmation that the
scan ended. Otherwise we are sleeping with the non-sleepable
net80211 com lock held. At the same time we need to hold the lhw
lock for the msleep().
This lock change got lost in the refactoring of lkpi_iv_newstate().
Reported by: ambrisko, delphij
PR: 261075
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
| |
swap parameter is not supported as it is rarely used in Linux kernel
and its implementation will add some preprocessor spaghetti to qsort.
Required by drm-kmod.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33675
|
|
|
|
|
|
|
|
|
|
|
| |
compile time assertion on non-NULL pointers. Tests conducted show that
_Static_assert, negative array size method and current code does not
handle pointers well enough. Bit field method solves this problem.
This change is derrived from Linux implementation of BUILD_BUG_ON_ZERO.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33674
|
|
|
|
|
|
| |
MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are superseded by PAT and mostly useless nowadays but still can be
used on Pentium III/IV era processors. Unlike drm-kmod version, this one
ignores MTRR if PAT is available that fixes confusing "Failed to add WC
MTRR for [0xXXXX-0xYYYY]: 22; performance may suffer" message often
appearing during drm-kmod initialization process.
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33561
|
|
|
|
|
|
|
|
|
| |
Required by drm-kmod.
Obtained from: OpenBSD
MFC after: 1 week
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D33560
|
|
|
|
|
|
|
|
|
|
| |
Required by drm-kmod.
Obtained from: DragonflyBSD
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33559
|
|
|
|
|
|
|
|
| |
Required by drm-kmod 5.7
MFC after: 1 week
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D33307
|
|
|
|
|
|
|
|
|
| |
static_cpu_has returns true if CPU supports requested feature.
Obtained from: OpenBSD
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33301
|
|
|
|
|
|
|
|
|
| |
efi_enabled(EFI_BOOT) returns true if machine was booted from EFI
Used by drm-kmod and some unported drm drivers like hyperv
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33300
|
|
|
|
|
|
|
| |
Required by drm-kmod
Obtained from: DragonflyBSD
Differential Revision: https://reviews.freebsd.org/D33299
|
|
|
|
|
|
|
|
| |
Obsolete it usage but keep for a while for drm-kmod 5.4 compatibility
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33298
|
|
|
|
|
|
|
|
| |
To reduce amount of drm-kmod patching
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33297
|
|
|
|
|
|
|
|
| |
To reduce amount of drm-kmod patching
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33297
|
|
|
|
|
|
|
|
| |
for x86 and move them to asm/barrier.h
MFC after: 1 week
Reviewed by: bz, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33296
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
- Add dummy struct pin_cookie definition;
- Convert lockdep_pin_lock macro to function;
- Fix 'unused variable' compile-time errors;
MFC after: 1 week
Reviewers: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33295
|
|
|
|
|
|
|
|
| |
to prevent name clashing with drm-kmod
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33294
|
|
|
|
|
|
|
|
|
|
| |
XA_FLAGS_ALLOC1 causes allocation of xarray entries starting at 1
Required by drm-kmod 5.7
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33293
|