Commit Graph

67296 Commits

Author SHA1 Message Date
John Scipione
e7735d59c3 Deskbar: A few minor style fixes to StatusView (tray)
Change-Id: I89036bda8bc9b93cac90c606dafe0a13cfd8a05d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8831
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-14 22:46:39 +00:00
Augustin Cavalier
853ddd218e Debug Kit: Don't find the runtime_loader debug area if no debug context.
We can't clone it or do anything in that case.

Also clean up coding style, and drop B_CLONEABLE_AREA from
the debug area, as it's not needed anymore.
2025-01-14 17:30:36 -05:00
Augustin Cavalier
7331a67227 kernel/util: Require passing a list_link to list_remove_link.
If something other than a list_link is passed, an explicit cast
will now be needed.

No functional change intended.
2025-01-14 17:30:36 -05:00
Augustin Cavalier
7d232f0cf8 kernel/image: Switch to using DoublyLinkedList<> for struct image.
No functional change intended.
2025-01-14 17:30:36 -05:00
Augustin Cavalier
9792c51694 kernel/elf: Use extended_image_info instead of reading runtime_loader structures.
This solves some TODOs and allows image_debug_lookup_user_symbol_address
to be dropped entirely. It should also fix reading symbols from binaries
that have multiple TEXT regions, and most functions are not in the first.
2025-01-14 17:30:36 -05:00
Niklas Poslovski
802fb5b90f Documentation: Replace remaining references of OpenBeOS with Haiku
Fixes #19335

Change-Id: I8458431be907e3f59165c7e9cf43d715e904af3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8826
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2025-01-13 22:23:11 +00:00
Niklas Poslovski
ee40fc9747 Documentation: Remove old unused doxygen_config files
Change-Id: I5f29561cea9bf34e1c92a381e6293ccae78c48c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8829
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-13 22:22:43 +00:00
Niklas Poslovski
2f8543fe8c interface_kit/ChannelSlider: Fix binary compatibility breakage
Change-Id: I350c80baf7508a9db9a176e3ee050042fafa9321
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8828
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-13 20:07:35 +00:00
Augustin Cavalier
e0f5c2e5cd kernel/vm: Distinguish reserved areas from non-existent areas in vm_area_for.
RESERVED_AREA_ID == -1, so previously they weren't distinguishable.
Now we return a different error code for an address that's in a
reserved area.
2025-01-13 15:00:54 -05:00
Augustin Cavalier
c125a32508 kernel/vm: Adjust kernel permissions check in vm_area_for.
Areas in the kernel address space generally won't have B_KERNEL_AREA.
Instead we should check if the area in question has user permissions
at all. If it doesn't, then return an error. If the address space
isn't the kernel one, then we don't bother with this check, as
all areas in the user address space should be returned even if
they don't have permissions or are a "kernel" area.
2025-01-13 14:52:38 -05:00
Augustin Cavalier
43b96dabf2 kernel/user_debugger: Add some padding/flexibility to debug_nub_message.
* Reorder a few messages, and add base numbers so that messages
   can be added in the future to all "sections" without breaking
   previous ABI.

 * Rename some messages for consistency.
2025-01-13 14:50:03 -05:00
Augustin Cavalier
bddf466406 kernel/user_debugger: Add some more permissions checks.
Only root, teams of the same UID, or the actually installed
debugger team can remove a team debugger or debug a thread.
2025-01-13 14:47:23 -05:00
Augustin Cavalier
0dd81e3d4b licenses: Drop "GNU GPL v2 classpath exception".
The only thing in HaikuPorts that uses this has its own copy
of the full GPLv2 with the exception and doesn't reference
this copy.
2025-01-13 14:17:41 -05:00
Augustin Cavalier
01b94ce7b8 AboutSystem: Drop GLU credit.
We use Mesa3d GLU now, which is under MIT license.
2025-01-13 14:16:40 -05:00
Augustin Cavalier
1c45ac1e20 licenses, AboutSystem: Add credits for netresolv.
* Add the ISC license; it's similar to the MIT license but isn't
   worded identically, and it's referenced from netresolv.

 * Drop the "Berkeley" license, it was used for an older version
   of the NetBSD credits, and is just the 3-clause BSD anyway, it appears.
2025-01-13 14:15:20 -05:00
Augustin Cavalier
25534c1907 licenses: Make formatting and wording of BSD licenses consistent.
They were formatted differently and used different "generic" language
than the OSI versions of the licenses, so replace them for consistency's
sake.
2025-01-13 13:58:25 -05:00
Augustin Cavalier
238b2aa31c licenses: Add "NewOS".
It's a BSD license, but in the source code there's still many headers
that reference the "NewOS license", so we should have a file in
the "licenses" directory that's called that.
2025-01-13 13:56:37 -05:00
Augustin Cavalier
e68498c7c9 Debug Kit: Fix LoadedImage SymbolLookup for multiple TEXT segments.
Similar fixes to the previous commits: we need to take the size
of all the text segments into account. In userspace we already
have this value in the image_info, in the kernel we'd have to
compute it.

Also add TODOs to the kernel to adjust things in UserSymbolLookup.
At present we don't fetch any image infos other than [0], but
we should probably store this data differently in the runtime_loader
structure anyway.

Change-Id: Ife72a8fc18d3139bf2f1606782181ec0006aaf81
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8825
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-13 18:03:52 +00:00
Augustin Cavalier
c3ff6461e5 Debug Kit: Don't rebuild image_info for LoadedImage.
The one that came from the kernel will be more accurate,
including having text and data sizes that properly
encompass all regions.

Change-Id: I63bea39727fad7d87323568f3904a8f7ed992264
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8824
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-13 18:03:52 +00:00
Augustin Cavalier
d20817c284 Debug Kit: Build the areas list on-demand.
Now that we don't need to know the area IDs when cloning addresses
from the remote team, we can build the areas list lazily using just
the information returned from the debug nub thread.

Change-Id: I8a6344704273f0bc60af2fa78e39336c21995401
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8822
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-13 18:03:52 +00:00
Augustin Cavalier
2c9560581b Debug Kit: Restore support for symbol lookup by remote memory access.
It's been broken since clone_area was changed to block cloning of
areas without B_CLONEABLE_AREA set on them. We here introduce a
B_DEBUG_MESSAGE_CLONE_AREA debug nub message, which clones the areas
of the debugged team for the debugger.

Also fix some bugs in SymbolLookup::_FindLoadedImageAt methods:
they didn't work properly when *next was NULL, so they would
always fail when iterating over the full list.

Note that this technically breaks libdebug.so and the debugger
protocol ABI. However, nothing out-of-tree that I know of uses
the private libdebug.so, and while GDB does use the debugger
protocol, it doesn't actually use any of the messages past
the first block, so it should still work after this.

Fixes #15251.

Change-Id: I71ccbee4afd17dae30d5dacbc7590d1e2175a90e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8821
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-13 18:03:52 +00:00
Augustin Cavalier
7105c3f66d Debugger Kit: Rename "TextDelta" to "LoadDelta".
It's both the offset of the first TEXT segment as well as the
overall load address, so we should call it that for clarity.

Change-Id: I370e14054e9b4f8f88a6ce6c80e0a743f9f14d64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8820
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-13 18:03:52 +00:00
Augustin Cavalier
ad85518214 Debug Kit: Handle more than two TEXT/DATA segments.
ELF files may have more than one, in which case we need to collect
the addresses and sizes from all of them. (runtime_loader already
does this when building image_info.)

Fixes #19021.

Change-Id: I379c4065976e9569a7bd7a538f46787ebcf6d3e8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8819
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-13 18:03:52 +00:00
Lt-Henry
4c73b06622 hid: Fix for incoming feature reports not parsed
Incoming feature reports were being ignored. I guess this patch won't fix any ticket because as far as I know, we are not reading/writing feature reports at any point. However, as I am trying to get i2c trackpads working, one of the solutions may be set the trackpad in a mouse-like compatible mode, while we rebuild Tablet handler for multi-touch reports

Change-Id: I64e581f8264049552ffc804c208191c0521a766a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8767
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-12 09:12:04 +00:00
Chris Roberts
8738012f43 rc: fix app_version handling during decompile
The length of the BeOS resource is twice as long because it contains
additional system info. For resources compiled with the Haiku version of
rc we can compare the length with a single sizeof(version_info)

Change-Id: Ia0c243434a5dd5792d0b97e7baecdfaf6b4027be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8827
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-12 04:55:15 +00:00
Niklas Poslovski
08028803b1 interface_kit/ChannelSlider: Divide value by 1000 and show one digit after the point.
Fixes #17600

Change-Id: I4357655915270e0ed61f0ce305f299555578bb8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8384
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-11 18:37:00 +00:00
Autocomitter
7bd2986f91 Update translations from Pootle 2025-01-11 08:09:51 +00:00
PawanYr
773e743f72 Tracker: Fix Query/Template crash
Steps to reproduce: after having opened the panel at least once on your
install, open the tracker Find panel, and without
creating/opening/saving any new queries/templates, click Query > Recent
queries > any recent query, or Templates > any template. Tracker will
crash because we try to open an entry ref that was never set, which
we'll then try to unset once we try to select a recent query or saved
template.

Change-Id: I5e3f184bbc9c69687fc9d79e144663a33befcb1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8823
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-11 03:51:30 +00:00
PawanYr
cb4220ebf2 Background: Update when X or Y changed
Currently, in Background prefs, when you type a
value into the X or Y box, the preview is only
updated and the 'Apply' and 'Revert' buttons are
only enabled (or disabled if the value is changed
back) when you click into the other field. This
change updates once the user types a new value
into the boxes.

Change-Id: Ia3906d989639c16ec90d4ea157c4718061520bb0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8818
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-10 17:52:06 +00:00
PawanYr
372d066f2f TeamMonitor: Group teams.
Programs like Iceweasel and Falkon/QTWebEngine spawn lots of processes
that clog up Team monitor. To reduce the clutter, group teams under the BApplication that spawned them.

Groups are collapsed by default, and the tree only goes one level deep.
If a BApp spawns other BApps with the same executable, they are grouped
under it.

Also, fix bug where opening Team monitor before be_roster has info for a
BApp (immediately after launch) can sometimes cause the 'Quit' button to
be incorrectly disabled.

Also, update BOutlineListView::RemoveItem documentation; neither the
BeBook nor the HaikuBook mentioned that these will both remove *and
delete* child items (BeBook mentions removing, HaikuBook mentions
neither), which cost me some time debugging . . .

(a previous version of this patch grouped solely by name)

Change-Id: I29c627fbc905da5b5dc7145589f8da21ae8ba6fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8770
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-10 03:53:34 +00:00
X512
44cc18e1c4 app_server: make AS_SET_DECORATOR use the same error handling as other setters
Change-Id: Ia094099caddf2e53b0a5af814516e182c4404227
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8816
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-10 03:40:22 +00:00
Alexander von Gluck
f1ea2e7ad4 radeon_hd: Ensure userspace accesses the AtomBIOS rom is R/W
* We should only need R/O in theory, but AtomBIOS has issues with R/O
  for some reason that needs investigated (#19348)
* For now, we keep it R/W to userspace so radeon_hd doesn't break after
  33c3179

Change-Id: Id50c8916690e6068c94fc496bbe89e80d7ba1bf8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8817
Reviewed-by: Alexander von Gluck <alex@terarocket.io>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-10 03:38:07 +00:00
Augustin Cavalier
9eae4e9bd4 kernel/vm & libroot/os: Move selection of B_RANDOMIZED to libroot.
This way, the syscall will just adhere to whatever's passed,
in case something has need of bypassing ASLR selectively.
This also enables randomization for clone_area, which wasn't
before, it appears.

Also put the ABI version checks behind an #ifdef.
2025-01-09 14:06:44 -05:00
Augustin Cavalier
16e17faf59 kernel/vm: Block teams from cloning read-only areas with write permissions.
Enforce this via protectionMax so they can't set it through
set_area_protection either.

Also adjust a few log messages for consistency.
2025-01-09 13:58:28 -05:00
Augustin Cavalier
603df32f9b kernel/team: Fix typo in common_get_team_usage_info.
Problem was introduced in 6a75e767e6.
2025-01-09 12:35:32 -05:00
Humdinger
70a0a1d51e Web+: don't pop DL window to the front
When you download a file, the Downloads window is opened to show
the progress etc. This is good, but once opened, it shouldn't
get activated (= pop to the front and getting focus) for each
new download. Often you've continued scrolling a webpage and when
the download finally starts, the DL window steals the focus...

Change-Id: Icdbd6bc5e2f0441eff650428834348f3fb508906
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8799
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2025-01-09 17:22:44 +00:00
Zardshard
84902f8854 Icon-O-Matic: Improve variable names
Change-Id: I71610f53ad4ee70396edfb597699471fc180c96e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8773
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2025-01-09 11:42:51 +00:00
Augustin Cavalier
48273952cf packagefs: Clean up ZSTD rules in Jamfile.
* There's no such thing as zstdSources anymore, put the real
   file in here.

 * Move the zlib Includes up, so they match.

 * Slightly reorder the logic inside the "if" to better match
   the Support Kit Jamfile.

Fixes a missing dependency on the Zstd headers.
2025-01-08 23:39:39 -05:00
Alexander von Gluck
bba724134f riscv64/uart/sifive: If we get an invalid clock, skip setting baud
* Prevents us breaking a potentially working serial uart.

Change-Id: I57bed42cfa571d3d961ee07f380c96b62c7f34d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8798
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-09 02:50:32 +00:00
Alexander von Gluck
1a6cfd7849 boot/efi/dtb: If we can't find a clock-frequency, set a failure condition
* If we don't find a clock frequency, it can be worked around later
  in a critcal code path for uart. Flag a failure or unknown with -1

Change-Id: I34d078da7471f559aafcf8926dc646aa9a7d4867
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8797
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Alexander von Gluck <alex@terarocket.io>
2025-01-09 02:50:32 +00:00
Alexander von Gluck
b2474d284f 3rdparty/cross-compiler: Various fixes and multi-host arch support
Change-Id: I57e8a0be75950c767d115131b838006036d4bc0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8796
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-09 02:50:32 +00:00
Augustin Cavalier
8ecc31ca7b Errors.h: Add ESOCKTNOSUPPORT.
It's in POSIX.1-2024, see
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html

Fixes #19347.
2025-01-08 11:35:35 -05:00
Augustin Cavalier
2a6dd3744d kernel/block_cache: Clean up uses of errno.
Improves another case like the one fixed in the last commit, and
avoids referencing it multiple times in a row unnecessarily.
2025-01-08 01:19:21 -05:00
Augustin Cavalier
0d139d259e kernel/block_cache: Make sure we return an error if block reading fails.
In #19343 it appears that read_pos returned "No error" but 0 bytes read.
We need to return an error code in this case, lest whoever called us
think the block was read in correctly after all.
2025-01-08 01:14:44 -05:00
Augustin Cavalier
1c956c9bf4 bootloader packagefs: Drop fModifiedTime.
Nothing uses it at present. This saves 8 bytes per PackageNode on 32-bit
and 16 bytes on 64-bit (mostly just EFI). We allocate a PackageNode
for every file in haiku.hpkg, so this is a significant savings in
the small bootloader heap.
2025-01-07 17:34:44 -05:00
Augustin Cavalier
babcaa3c29 runtime_loader: Resize heap areas instead of creating new ones.
This is more efficient and works most of the time. Additionally,
we can potentially join with a previous free chunk in the allocator,
avoiding extra fragmentation on the heap.

app_server (on x86_64) only has 1 "rld heap" area after this change
with a size of 0x50000 (320KB), whereas previously it had around 7
with a total size of 0x80000 (512KB).
2025-01-07 17:30:29 -05:00
Augustin Cavalier
7137fc03b2 bootloader heap: Actually implement DEBUG_ALLOCATIONS.
The old define was really "check heap integrity", so it's split off.
In the userland test harness, this takes the total time spent in
the allocator from around 1ms to 14ms for all the allocations used
during a boot with "nightly" profile, so it seems acceptable to
enable it under KDEBUG.

Tested with both BIOS and EFI bootloaders, still works.
2025-01-07 17:30:28 -05:00
Augustin Cavalier
0f843fe15a tests/boot: Add boot_heap_replay_test.
This uses a recorded array of allocation operations and "replays" them.
The included .h with such an array is mostly for demonstration; the
real captures from bootloader logs are very large (half a MB or more)
and so not included here. A small node.js script that can generate these
from such logs is included.
2025-01-07 17:30:28 -05:00
Augustin Cavalier
9bf3184b3c kernel/util: Merge the bootloader and runtime_loader heap implementations.
They were mostly copies of one another, save for the glue code
and a few other things. Now they're mostly unified, and this allows
the test to be greatly simplified, too, since it can avoid including
any bootloader code at all.

The heap implementation itself should have no behavioral changes
from before. Those will come in future commits.
2025-01-07 17:30:24 -05:00
Augustin Cavalier
c55f4f2698 tests/boot: Make heap_test build again. 2025-01-07 12:33:15 -05:00