67347 Commits

Author SHA1 Message Date
Augustin Cavalier
3b22516ed2 drivers/network/pcnet: Allocate a small softc on the stack in probe().
Fixes #19372.
hrev58558
2025-01-25 17:02:45 -05:00
Augustin Cavalier
63215dbd2d kernel/vm: Assert in vm_unreserve_memory that the amount is a multiple of PAGE_SIZE. hrev58557 2025-01-25 16:16:55 -05:00
Augustin Cavalier
832cb40da9 kernel/vm: Add PAGE_ALIGN in size computation in VMCache::Merge().
The same is already done in SetMinimalCommitment.
2025-01-25 16:15:42 -05:00
Augustin Cavalier
bd4d542bec kernel/user_debugger: Zero-initialize addressOffset.
On some optimization levels we get warnings/errors about it being
potentially uninitialized (but not at -O2, hence this wasn't a
problem in nightly builds.)
2025-01-25 16:00:36 -05:00
Augustin Cavalier
2cee2502c5 kernel/vm: Unlock lower caches before allocating clean pages on page fault.
The documentation comment says that only "caches starting from the top
cache to at least the cache the page lives in" are guaranteed to be locked.
So it should be safe to unlock all the lower caches that we didn't find
the page in here, and leave only the topmost cache locked, to reduce
contention.

(We can't do this in the CoW case, since there we may have to unmap
the read-only page when mapping in the new read-write page. But for
clean pages, since no lower cache had the page in question, we shouldn't
have anything mapped at all, and thus unlocking the lower caches ought
to be safe.)
hrev58556
2025-01-25 15:44:23 -05:00
Augustin Cavalier
ab25a42387 kernel/elf: Fix handling of the commpage in UserSymbolLookup.
We now will find its image struct using the standard iteration,
so just check for its address specifically.

Fixes commpage symbols printing in KDL after the recent refactor.
2025-01-25 15:36:38 -05:00
Augustin Cavalier
71c04db60a kernel/vm: Reinstate assertion in InsertPage.
And fix it to be < not <= as well, and the same in MovePage.
hrev58555
2025-01-25 15:32:56 -05:00
Augustin Cavalier
5bfe88b36b kernel/device_manager: Increase virtual_end of IOCache.
We insert pages from all over the underlying disk's area,
so in order to not trip asserts, the cache must be that large too.
(It's a "null" cache, so it doesn't have any commitment.)

Fixes #19373.
2025-01-25 15:32:56 -05:00
Autocomitter
6768abb84b Update translations from Pootle hrev58554 2025-01-25 08:08:08 +00:00
Niklas Poslovski
2d9bd61681 app_server/BFont: Implement B_STRIKEOUT_FACE
Change-Id: I139621ce98847c94306c62e31774a00cde8a18e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8848
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58553
2025-01-25 03:24:55 +00:00
Ilmari "ilzu" Siiteri
acac5ed621 Wacom: Added support for CTH-470 (Bamboo Fun Pen & Touch)
Change-Id: I908a8d598bf6e5a9fed9b7dfd8aa698875db6bd0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8858
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58552
2025-01-24 01:35:17 +00:00
Augustin Cavalier
f464fc384a kernel/vm: Disable the new assert in InsertPage for now.
It triggers on boot on many systems in IOCache.
Disabling until I have time to investigate further.
hrev58551
2025-01-23 20:33:15 -05:00
Jérôme Duval
e01dfaf620 build: add acpi_thermal, amd_thermal and pch_thermal to minimum definition
Change-Id: I943b77390266c4e444ddb406455ebaa6a9549565
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8856
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
hrev58550
2025-01-23 05:25:54 +00:00
Jérôme Duval
4d5debea9e amd_thermal: new driver
inspired by ksmn in OpenBSD

Change-Id: Ic272fc15f1ea082496db99ed2df15c77655ba9c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8855
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-23 05:25:54 +00:00
Jérôme Duval
77f06cf2ae pch_thermal: use user_memcpy() to write in a user buffer
Change-Id: I8eccde638ba30051fcec375b7d616e1d1bddf5ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8854
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-23 05:25:54 +00:00
Jérôme Duval
5a2be54dd0 kernel: data_acquisition_other is also found in drivers
Change-Id: Ia3f9c661a97b54d9bfa33ca0df9f5bd773023c2f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8853
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-23 05:25:54 +00:00
Augustin Cavalier
414774d79f kernel/vm: Rename VMCache::HasPage to StoreHasPage.
It checks whether the page or page's data is present in an underlying
"backing store", not whether the page is present in the cache itself.

No functional change intended.
hrev58549
2025-01-22 16:19:33 -05:00
Augustin Cavalier
ece9fcbaa8 kernel/vm: Assert in VMCache::InsertPage() that the offset is within the cache.
This would have caught the problem fixed in the previous commit.
Also adjust the assertion in MovePage for correctness.
hrev58548
2025-01-22 15:39:58 -05:00
Augustin Cavalier
8ff91e4a44 kernel/vm: Always insert new clean pages into the topmost cache on fault.
The previous logic, which dates back to the NewOS kernel, inserted them
into the deepest cache instead if the fault was a read and not a write.
But this creates problems if the deepest cache is of a smaller size than
the topmost cache, because then we'll be inserting pages with offsets
past the cache's virtual_end. In the case there are multiple levels of
caches between the topmost and the deepest cache which all are smaller
than the topmost, then when/if the deepest cache is merged with the second-
deepest cache, those pages will get skipped and freed when they may still
be in-use, which was the cause of #19367.

To solve this, just insert new pages into the topmost cache always.
Inserting them into the deepest cache seems to have been an optimization
(and a savings of pages), and not a matter of correctness.
2025-01-22 15:39:57 -05:00
John Scipione
4ae0548774 Terminal: Make Colors window height shorter and font-dependent
Roughly the same height as the Appearance window at 12pt font.

Change-Id: Iaa456aecfde6ebe92f4829e3aabca6a29b68bc08
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8847
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>
hrev58547
2025-01-22 19:28:58 +00:00
John Scipione
622853ff8e Appearance and Terminal: Move ColorPreview to shared
Move ColorListView and ColorItem to shared in BPrivate namespace.

ColorItem typedef to BPrivate::BColorItem for apps that are already
using this class.

Gravity screensaver:
* ColorItem => BColorItem.
* Use make_color() to set colors.

Make color drop message name agnostic, check for B_RGB_COLOR_TYPE.
Add be:sender and source to drag message.

Add _SetTermColors() convenience method to set colors on all tabs.

Change-Id: I5a9f55d3ab423ccaa341997cf444603373024553
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8846
Reviewed-by: John Scipione <jscipione@gmail.com>
2025-01-22 19:28:58 +00:00
John Scipione
012d90c553 BColorControl: SetValue and Invoke on color drop if enabled
Change-Id: I055750707ed625b21c6b4cf02faf2509f615e169
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8845
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-22 19:28:58 +00:00
John Scipione
a6fee6a1ca intel_extreme: Remove spurious whitespace
Change-Id: I5a15cada42d1d527b0d65f89401d04e7771ef4b6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8852
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58546
2025-01-20 19:32:32 +00:00
Dru Satori
0db74e1ae1 intel_extreme: add support for Alder Lake chipsets.
Added AlderLake-P and AlderLake-N variants to agp_gart bus
and intel_extreme driver. Tested and confirmed working.

Change-Id: I1ac1e04fbba222a2f9eef483d68575665561e837
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8840
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58545
2025-01-20 17:17:43 +00:00
John Scipione
04bf57110c Tracker: Disallow control characters in file name edit
Change-Id: I1e87768cc70fdd501ca0a4710df619dd2d59ce7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8170
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58544
2025-01-20 16:27:04 +00:00
Autocomitter
d292bcc64b Update translations from Pootle hrev58543 2025-01-18 08:09:55 +00:00
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>
hrev58542
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.
hrev58541
2025-01-17 00:13:43 -05:00
Augustin Cavalier
ebc6bc8ed7 ramfs: Add iterator locking to index classes. hrev58540 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 12d6ecf0df54dc8752f7ccd1f430d74f45fcbd9b.
hrev58539
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. hrev58538 2025-01-15 14:55:17 -05:00
Augustin Cavalier
07ed8d0df8 kernel/vm: Block non-root teams from inspecting other teams' memory properties. hrev58537 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.
hrev58536
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>
hrev58535
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.
hrev58534
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.
hrev58533
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>
hrev58532
2025-01-14 23:19:00 +00:00