The former must have B_NO_COMMAND_KEY if the shortcut has no command key,
while the latter should simply not have B_COMMAND_KEY.
This mixup meant that modifiers flags without either set were
passed back to BMenuItem, which then used them when calling
RemoveShortcut(), but that method expects B_NO_COMMAND_KEY
to be specified, so the shortcuts weren't really removed,
resulting in use-after-frees.
Fixes#19426 and related issues.
Tested by OscarL and confirmed to be working on at least
one machine, though on others it hangs, so leaving out
of the default builds for now.
This adds an "acpi_processor_id" field to x86 arch_cpu_info,
gleaned from the MADT, so we can match our cpu_ents to ACPI
processor objects. (FreeBSD does a similar mapping, see
their acpi_cpu_probe method.)
Change-Id: Idb5e3c1fc1efaa4256d60ea17dd1824345369687
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9637
Reviewed-by: waddlesplash <[email protected]>
Allows building with GCC >=15, which defaults to c23 and disallows
function declarations without parameters and old-style function
declarations.
Fixes#19584
Change-Id: Idb141b804e80d3909558abecd2c74538cb3766ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9684
Reviewed-by: waddlesplash <[email protected]>
- Resolve TODO about using map for server area_id lookup.
- Remove server cloned area delete request logic because it is less
efficient and robust. Cloned area delete request messages may be
missed if client message queue is full so it may cause cloned area
leak.
- Implement reference counting for cloned areas instead.
Change-Id: Ie434ad36c2761ab0df00d341d55a6cea67b69830
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9667
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
When using type-ahead filtering, the list of all entries is not the same
as the list of the visible ones. `PoseAtIndex`, `FindPose` and
`SelectPoses` all work on the visible entries, so count those.
Fixes: #5529
Change-Id: I65cf67e544f515508b08bb661ee594244ab94952
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9680
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
The notify loop normally checks all pending condition variable entries
and notifies either all of them, or only the first one.
In the case where the first one is being removed from the condition
variable just as the notification happens, it is skipped, however, in
the case of NotifyOne, that should lead to attempting to notify the next
one.
It looks like an oversight in 6d3065508f,
where the notified threads counter was changed in a similar way, but
these two lines of code were not.
The problem seems pretty unlikely, as it would need:
- Multiple threads waiting on the same condition variable,
- The first one being removed just as the variable is notified
Change-Id: I0492c56b15b6b2871954e9114df046ec94539971
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9677
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
EHCI has more DMA restrictions than XHCI, so if we can't use them,
we just fall back to copying the buffers as before.
Tested in QEMU, system booted successfully. However, it seems that
quite a lot of disk I/O can't use physical buffers here, probably
due to packagefs' use of uncached reads.
Change-Id: I4d35642ee1a8f5ba2531f6658f8cbbef5a7785ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9613
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
"Show in Tracker" or "Trim to selection" actions don't work when
applied to selected sub-items. With this change, we get the top-level
item of those sub-items to get to the file's path to fix this.
Change-Id: Idfda52d7cbd04598e52f6226f422f3afc6895d75
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9659
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
- On read errors, make sure to reset the read buffer pointer and not
return any more packets from the incorrectly read buffer
- Fix a case where an error didn't stop the processing, and we would
return a zero-byte packet to the network stack instead of an error
- Make sure to use different log messages for different error cases
- Use strerror where appropriate
- Add some TRACE calls to be able to fully trace the code.
There seem to be an error at the XHCI level where it has an "USB
Transaction" error (converted to a B_DEVICE_CRC_ERROR Haiku error code).
After that, despite cancelling that transfer and clearing the HALT
feature, it is not possible to receive anything from the receive
endpoint and the connexion is stuck (it appears sending data still
works, at least from the network stack point of view).
Change-Id: I58687a6eb7b19ba7e7ca594c55499b60fb8b5b26
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9658
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
BAffineTransform is not POD type and contains vtable. Reading it from
byte stream as-is will cause vtable corruption.
Change-Id: I1371444444ffa47f77a88f5f82b3fe6ea031b14c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9660
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
* Use the delegation stateid instead of the open stateid when sending
a read, write, or write stat request.
* Ensure that the uid and gid of a request reflect the user who opened
the file in question.
* Add measures to avoid deadlocks when a delegation is recalled.
* Fix a race condition in which OpenState can be deleted before an IO
job is done with it.
* Possible fix for #19694.
The NFS 4.0 RFC specifies that the if a delegation is held, the
delegation stateid should be used for IO requests, and for SETATTR
(write stat) requests that set file size.
Change-Id: I9604ef58e3232f64d1e02ab180c603220e967e1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9587
Reviewed-by: waddlesplash <[email protected]>
SVG does not support conic, diamond, xy, or sqrt_xy gradients.
Show a one time warning and export them as linear approximations.
Fixes#19533.
Change-Id: Id49d9ea098a47088c0865d5a8609b657b0bcc45b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9636
Reviewed-by: Zardshard Zardshard <[email protected]>
Tested-by: Commit checker robot <[email protected]>
USB code now goes in a separate static library.
This also paves the way for supporting more busses than PCI
and USB in the compat layer.
Tested with realtekwifi, still works.
* Move ukphy ("unknown phy") code into the compat layer rather
than duplicating it across many drivers.
* Move MIIbus related code to a separate static library.
* Genericize most attach methods that touched the MII bus directly
to not need the code that's now in the static library.
Tested with rtl81xx, still works.
This partially synchronizes to "upstream" commit 3c144bdfe53c61e2589e209d419f28f94ac77151.
Some of the more functional changes and new features I didn't import,
but mostly just the color tinting changes to match the new control colors.
Instead of reusing objects as fast as possible, use two magazines per
CPU, and allocate and free objects from separate magazines, always
exchanging full and empty ones with the depot. Furthermore, reverse
the ordering of objects in full magazines, to get FIFO rather than
LIFO behavior.
sys time on "git status" and "compile HaikuDepot" benchmarks in
a 4-core VM seems increased by about 5% at most (e.g. 8.2s -> 8.6s.)
This may help with further catching use-after-free and other like
problems, so it seems worth it to leave enabled on KDEBUG.
- Update the file with the latest version (from
https://uefi.org/sites/default/files/resources/devids%20%285%29.txt)
- Tweak the Jamfile and awk script a bit to fix conflicts with acpi
device IDs structures, add missing const, allow tabs in the input file
instead of spaces (it is not formatted consistently)
- Match the hid or cid of ACPI devices to show well known names from the
file if available and we have nothing better.
Change-Id: Iea11ca44c8fef245d044a7535e7e7a13230be848
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9632
Reviewed-by: waddlesplash <[email protected]>
* Make more info available from Dump functions.
* Allow locking to fail in Dump functions to avoid deadlocks caused by
debug output.
* Make corrections to the nfs4_unlink() changes in hrev59023.
Change-Id: I8e5431baacb3cfa0baaedd2695c597549e746d2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9628
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
B_FILE_ERROR == EBADF == "Bad file descriptor". It's used
when there's no valid file descriptor, or when attempting
a read or write operation on a file descriptor not opened
with that mode. All other places should use B_IO_ERROR or
some other like value, instead.
The tty_notify_select_event() at the end of tty_close_cookie()
checked if the other_tty's open_count was > 0 before notifying.
But in the case where the master is closing all children,
it will drop to 0 and leave things still in the select pool.
So we should notify unconditionally here.
Additionally, use B_SELECT_DISCONNECTED (i.e. POLLHUP). This matches
what Linux seems to do.
Fixes#19714.
This should make use-after-frees more likely to be caught by the
standard paranoia facilities (and make them less likely to be
exploitable as memory will take longer to be reused.)