Commit Graph

67321 Commits

Author SHA1 Message Date
John Scipione
0d50dc1f3e Tracker: Call AdoptSystemColors() to apply read-only tint
2 - 1.147 = 0.853

Change-Id: I260af9d07f5e43e939ce351bfd4036665ad126f4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8269
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-17 16:57:38 +00:00
John Scipione
9105063938 BTextView: Use document colors on AdoptSystemColors()
AdoptSystemColors() tints document background color to match panel
color if uneditable.

Calling MakeEditable() will automatically apply or unapply uneditable
background tint if you have previously called AdoptSystemColors().

Parent BView::AdoptSystemColors() sets panel colors, we want document
colors here. Do not alter text color - only view, low and high colors
are changed.

Document AdoptSystemColors() and MakeEditable() in BTextView docs.

Change-Id: Ib215735f27bb01fc2f95fcf2fee0185e5fc83f70
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8263
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-17 16:57:38 +00:00
John Scipione
13553050f9 HaikuDepot: MarkupTextView SetForegroundColor to HighUIColor
Also the bullet point color
Allow Usage Conditions window to be resized
Tint disabled color instead of hardcoding

Copyright 2024 Haiku, Inc.

Fixes the other half of #19067

Change-Id: Ibf74d9dd673807b0f107e56cefb5b30916baed96
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8262
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-17 16:57:38 +00:00
Augustin Cavalier
cce39b3cc0 ramfs: Add lock for NodeListeners.
This is only needed on add/remove; when the lists are actually
iterated we should already have a write lock.
2025-01-17 00:13:43 -05:00
Augustin Cavalier
ebc6bc8ed7 ramfs: Add iterator locking to index classes. 2025-01-16 23:23:39 -05:00
Augustin Cavalier
5ac03c3714 ramfs: Clean up Iterator lockers API.
No functional change intended.
2025-01-16 23:23:19 -05:00
Augustin Cavalier
c9892ac20f ramfs: A write lock is needed when truncating files.
Should fix all KDLs in #19360.
2025-01-16 23:21:47 -05:00
Augustin Cavalier
48bfa9ee2f ramfs: Add some WriteLocked assertions.
These would have caught the problem in #19360.
2025-01-16 23:21:04 -05:00
Augustin Cavalier
6d6a53f147 kernel/fs: Add missing frees to I/O context destruction.
Fixes a memory leak regression from 12d6ecf0df.
2025-01-16 20:07:31 -05:00
Augustin Cavalier
3f35917df2 kernel/team: Slight cleanup to the synchronization logic in load_image_internal.
Adjust the comment and use ASSERT() rather than a panic().
2025-01-16 19:49:47 -05:00
Augustin Cavalier
1124f672a0 kernel/vm: Improve address range blocking for uninitialized/freed memory.
* Use a "null" cache and avoid committing memory unnecessarily.

 * Block the 64-bit ranges also. On x86_64 the kernel is above
   userspace, so we have to |= KERNEL_BASE here; but in case
   something actually tries to access those pointers directly
   they should get a GPE anyway (as the address should be outside
   the canonical range.) If it's not, then SMAP should catch it.
2025-01-16 15:17:39 -05:00
Augustin Cavalier
cc389ab314 strace: Drop reference to wait_for_thread syscall. 2025-01-15 14:55:17 -05:00
Augustin Cavalier
07ed8d0df8 kernel/vm: Block non-root teams from inspecting other teams' memory properties. 2025-01-15 14:54:05 -05:00
Augustin Cavalier
f3f347f90d kernel & libroot: Drop wait_for_thread syscall in favor of wait_for_thread_etc.
We don't have many etc and non-etc syscall pairs in this file
(the semaphores seem to be a notable exception), so drop
wait_for_thread and just call wait_for_thread_etc instead.

This breaks syscall ABI, but we've already broken it since beta5
anyway.
2025-01-15 14:52:15 -05:00
Augustin Cavalier
26cf47386e kernel/elf: Map user images with kernel protections only at first.
They're still mapped into the team address space and with user addresses,
of course, and we reset all their protections later on anyway. This allows
a number of arch_cpu_{enable|disable}_user_access() calls to be dropped.

Also adjust the name of ro/text segments to "rx" to match what
runtime_loader now does.

Tested with SMAP enabled, still works.
2025-01-15 13:35:00 -05:00
Augustin Cavalier
b21f31ea16 runtime_loader: Consolidate some elf_region code.
No functional change intended.
2025-01-15 13:35:00 -05:00
Augustin Cavalier
e38be9392a runtime_loader: Actually respect PF_EXECUTE program header.
If it's not set (and we aren't on pre-Haiku GCC2 ABI), then don't make
the region executable.

This mostly only makes a difference for Clang/LLD-linked binaries
that have a readable, non-writable, non-executable program segment.
GCC/LD-linked binaries just have all read-only data in the main
read+execute section by default.
2025-01-15 13:35:00 -05:00
Augustin Cavalier
e0101fa39b runtime_loader: Clean up code in remap_images().
No functional change intended.
2025-01-15 13:35:00 -05:00
Niklas Poslovski
71a7116eb7 Time: Tint AnalogClock use B_DOCUMENT_BACKGROUND_COLOR
... and B_DOCUMENT_TEXT_COLOR with the selected hand using
B_NAVIGATION_BASE_COLOR when dragging instead of blue
(well, it is still blue but customizable).

Analog clock colors adjusted for light and dark modes.

Change-Id: I2d5af04f10090258b0ef989498f8e43dbded8def
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7940
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-15 18:09:47 +00:00
Augustin Cavalier
89dd4ee819 ramfs: Avoid acquiring locks for suspend/resume of EntryIterator in more cases.
If we don't have an Entry to attach/detach from, then we don't need
to acquire any locks at all. Now that we return multiple dirents
from read_dir, it's much more likely that we wind up with
EntryIterators in such a state, so this avoids some lock contention.
2025-01-14 21:37:43 -05:00
Augustin Cavalier
3f73e6e934 ramfs: Code cleanup to EntryIterator.
No functional change intended.
2025-01-14 21:17:43 -05:00
Augustin Cavalier
0f63c097ac ramfs: Read multiple dirents in read_dir() at once.
Massively cuts down on syscall count when reading directories.
2025-01-14 19:10:12 -05:00
Augustin Cavalier
eab4f99826 ramfs: Use the generic open_mode_to_access.
And clean up O_TRUNC at the same time.
2025-01-14 18:29:57 -05:00
Augustin Cavalier
7e29de9266 ramfs: Add support for "special" nodes.
Like S_IFIFO. It doesn't support ones with "sub-vnodes", but FIFOs
and UNIX sockets don't seem to use those (does anything, actually?)

Fixes #19261.

Change-Id: I9eeac4efcbe74e9084653c77d883dbb44e6f1d2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8830
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-14 23:19:00 +00:00
John Scipione
297aa21e46 Deskbar: Always AdoptParentColors() on StatusView
... be_control_look is assumed.

Change-Id: If41f74ede3debd5439093e0172294861f65f5d6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8832
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
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