Commit Graph
100 Commits
Author SHA1 Message Date
Augustin Cavalier f19676f1c0 kernel/vm: Add a fast way out in VMAnonymousCache::StoreHasPage.
If we have no allocated swap space, then we don't need to even
bother doing a lookup in the hash table (which requires a read-lock,
anyway.)

This function is now called often even if swap isn't actively
being used, so any gains here are helpful.
2026-02-04 17:54:10 -05:00
Augustin Cavalier 64a26f88bf Jamfile: Drop expat, make gzip architecture-dependent. 2026-02-04 17:42:41 -05:00
Augustin Cavalier 310f75e043 docs: Move fs_query documentation to the Haiku Book.
Also add a missing include in QueryPoseView.
2026-02-04 17:41:53 -05:00
Augustin Cavalier 379c8aebab fs_shell: Add the new B_QUERY_WATCH_ALL. 2026-02-04 17:21:25 -05:00
Augustin Cavalier fe444bc3cb libroot/glibc: Reinstate long-double printf_fphex code.
Fixes #19925.
2026-02-04 17:09:50 -05:00
Augustin Cavalier 53ee2648fb fs_query: Make B_QUERY_WATCH_ALL part of the public API.
It seems to work well enough at this point, and is used in Tracker,
so why not?

Also update live_query to demonstrate the functionality.
2026-02-04 17:09:50 -05:00
Augustin Cavalier c32328567c NTFS: Move some initialization to the struct volume constructor.
May fix #19926.
2026-02-04 16:41:37 -05:00
Augustin Cavalier 543aa2c72f kernel/vm: Refactor and reinstate swap-space freeing in the page daemon.
This has been disabled since a refactor in 2010.

Seems to work OK in some basic testing.
2026-02-04 15:34:27 -05:00
Augustin Cavalier dce3a4366d packagefs: Add a fallback buffer for reading heaps in low-memory conditions.
Otherwise we might fail with B_NO_MEMORY, or wait for long periods of
time, which we don't want to do in such a critical routine.

Should improve system responsiveness (or even prevent application
crashes) under high memory pressure.
2026-02-04 14:59:27 -05:00
Augustin Cavalier 2c4d5ab101 libnetapi: Disable -Werror for GCC2.
Fixes the build after the package repo sync.
2026-01-30 21:37:00 -05:00
Augustin Cavalier cbb5c2c9f0 generate_build_packages_repo: Fix mode. 2026-01-30 21:36:42 -05:00
Augustin Cavalier eb3a8bce86 tools: Update hardlink_packages.py into generate_build_packages_repo.py.
It doesn't hardlink packages anymore, as we use S3, so it copies instead.
This is a better name anyway.
2026-01-30 21:32:37 -05:00
Augustin Cavalier 5c254dff8c HaikuPorts: Synchronize x86_64 and x86_gcc2.
One change to app_server to build with the new FreeType.
2026-01-29 22:51:52 -05:00
Augustin Cavalier f78defbd46 Jamfile: Reformat and adjust AddHaikuImageSystemPackages.
* Put each package on its own line. This mirrors the earlier
   refactor of image rules.

 * Drop a few packages with library-only provides. The build
   system will pull them in automatically as needed (libicns, etc.)
2026-01-29 22:49:29 -05:00
Augustin Cavalier 0af3006721 QueryParser: Don't send notifications if the node's been deleted.
Gets rid of redundant messages under B_QUERY_WATCH_ALL.
2026-01-29 18:10:12 -05:00
Augustin Cavalier 377f154bf0 BFS: Implement the trivial case of Volume::CheckForLiveQuery.
Saves a bit of work when there are no live queries running
(as will often be the case on an idle system.)
2026-01-29 18:01:37 -05:00
Augustin Cavalier 18dd362efa kernel/fs: Return B_BAD_VALUE for O_RDONLY|O_TRUNC on open().
According to Sortix os-test, this better matches the behavior
of OpenBSD and other OSes that reject this combination of flags.
2026-01-29 15:24:03 -05:00
Augustin Cavalier 6fc8d99e21 libroot: Expose exect() only if building with BeOS ABI compatibility.
It's non-standard and redundant, but was in the public R5 headers,
so we need to keep it around at least for compatibility.
2026-01-29 15:04:23 -05:00
Augustin Cavalier 4310e8e1c8 posix_spawn: Expose file_actions_add[f]chdir.
The non-"_np" versions were exported, but not declared in the header.
Do that, and also make the "_np" versions the alias, as these are
specified in POSIX-2024.
2026-01-29 15:00:12 -05:00
Augustin Cavalier 83da6699df Tracker: BPoseView handles "size" and "last_modified" with B_STAT_UPDATE.
Fixes #19916.
2026-01-28 22:30:32 -05:00
Augustin Cavalier d1cbd0b1e3 rtl8125: Synchronize with upstream OpenBSD.
Adds support for RTL8126 and RTL8127.
2026-01-28 21:38:01 -05:00
Augustin Cavalier 4ed2896398 Package Kit: Refactor BRepositoryCache to have GetPackageInfos(callback)...
... instead of GetIterator(). This allows us to avoid loading the
cache entirely in SetTo(), and allows consumers to read the cache
much more efficiently than loading it all into memory and then
freeing it again afterwards.

This technically breaks API/ABI, however the Package Kit APIs
are not considered stable (I don't think.)

All consumers adjusted. As we build the host tools with modern GCC
only, I made update_package_requires use a C++11 lambda function.
All others use out-of-line static methods.

"time pkgman list-repos -v" (which has to read the whole cache)
is ~0.5s before this change, and ~0.25s after this change,
on my test VM.

Change-Id: I6976b4cf5eb846fc925ed199dc00eb227fc81344
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10247
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Andrew Lindesay <[email protected]>
2026-01-21 20:27:13 +00:00
Augustin Cavalier 7fe5a67108 HaikuDepot: Another fix for the GCC2 build. 2026-01-20 15:33:07 -05:00
Augustin Cavalier 999bb2e88a sys/param.h: Add DEV_BSIZE and make use of it.
POSIX-2024 says:

> There is no correlation between values of the st_blocks and
> st_blksize, and the f_bsize (from <sys/statvfs.h>) structure members.

Some code in Haiku has mixed that up in the past (e.g. the write_overlay).
This will allow a constant to be used instead, clarifying what's happening.

POSIX-2024 does not actually require this constant, but it does say:

> Traditionally, some implementations defined the multiplier for
> st_blocks in <sys/param.h> as the symbol DEV_BSIZE.

And indeed, glibc, musl, and FreeBSD (at least) all define it.
So it seems to make sense for us to do the same.

Related to #19251.
2026-01-20 14:43:37 -05:00
Augustin Cavalier c30e5cf106 libroot/locale: Allow global locales to be applied to the current thread.
I added this assertion thinking it would incorrectly override
thread locales, and that invocationns this way would be a bug.
Instead it appears that this is the expected behavior in select
circumstances.

Fixes #19896 and other recent regressions.
2026-01-16 12:33:14 -05:00
Augustin Cavalier c329ad53b1 libroot/musl: Check gmtoff before returning timezone names.
And add a fallback for GMT.

Improves the situation in #18471.
2026-01-15 19:18:05 -05:00
Augustin Cavalier 7b94842122 ICUCtypeData: Fix MB_CUR_MAX under most encodings.
See inline comment.

Fixes #19881.
2026-01-15 18:48:10 -05:00
Augustin Cavalier f1ca09f6a2 ICUCtypeData: Use U16_APPEND rather than implementing our own version. 2026-01-15 18:48:10 -05:00
Augustin Cavalier 9be2b373d3 locale: Refactor ctype storage and consolidate some files.
* Drop the global definitions from ctype.h, and move them to
   the internal LocaleData.h: the functions should be used always
   when building new applications (as they're thread-safe.)

 * Make __ctype_get_mb_cur_max thread-safe and move it to live
   alongside the other __ctype...() methods.

 * Put the __ctype...() methods in two files, clearly indicating
   versions: ctype_loc_global for the global (non-thread-safe) versions,
   used for the kernel, and ctype_loc_thread for the libroot versions.

 * Consolidate more internal functions into LocaleInternal.cpp.
2026-01-15 18:48:10 -05:00
Augustin Cavalier 2d20dfef26 libroot/locale: Consolidate some headers.
No behavioral change intended.
2026-01-15 18:48:09 -05:00
Augustin Cavalier 256ab7351b libroot/posix: fchdir() should not accept AT_FDCWD.
It doesn't make sense to change directories to the current one.

Should fix #19059.
2026-01-08 18:21:06 -05:00
Augustin Cavalier 988d9d80b1 kernel/fs: Check O_DIRECTORY in the VFS, not filesystems.
Just like O_NOFOLLOW. Also drop the now-redundant checks from
all filesystems.

At least some filesystem hooks (FIFOs in particular, see #19879) did not
check this, so this fixes them.
2026-01-08 16:34:51 -05:00
Augustin Cavalier f1f209415b kernel/fs: Relocate and consolidate open mode checks.
* get_new_fd is actually too late for the O_TRUNC one: we will
   have already called the vnode open() hook by then. So, we
   need to do that in open_vnode.

 * Move checks to a new static helper method, and invoke it
   in all relevant places.

 * Delete now-redundant O_NOFOLLOW checks.
2026-01-08 16:31:21 -05:00
Augustin Cavalier 7d234f26de strtok_r: Include features.h and reinstate "restrict". 2026-01-08 15:48:50 -05:00
Augustin Cavalier 04ebf3d669 libroot: Appease GCC2 for strtok_r. 2026-01-07 18:23:43 -05:00
Augustin Cavalier da0529e546 kernel/team: Add set_foreground_process_group failure case with EPERM.
As specified in POSIX.

Fixes Sortix os-test/tcsetpgrp-wrong-session, part of #19877.
2026-01-07 18:18:36 -05:00
Augustin Cavalier 35061cc3cb limits.h: Add missing _POSIX2_CHARCLASS_NAME_MAX. 2026-01-07 17:08:43 -05:00
Augustin Cavalier 713e7b2c54 locale: Implement getlocalename_l.
Specified in POSIX-2024.

GNUlib currently has a nasty Haiku-specific hack to implement
equivalent functionality; after this it should be able to use
this function instead.
2026-01-07 16:27:46 -05:00
Augustin Cavalier 571ec77bf1 kernel: Add new strtok_r.c to the Jamfile. 2026-01-07 16:05:27 -05:00
Augustin Cavalier 95b41d5986 libroot/posix: Replace strtok_r with musl's.
And rewrite/cleanup strtok.c also.
2026-01-07 16:04:18 -05:00
Augustin Cavalier ac46a180d8 kernel/fs: Check if the existing node is a directory in create_vnode.
Otherwise, calling open(O_CREAT) on a path that exists but is
a directory will succeed.

Fixes Sortix os-test open-tmpdir-rdonly-creat. (Interestingly
many other OSes also fail this test; only Linux, FreeBSD, Solaris,
and Sortix, and now also Haiku, properly return EISDIR.)

While at it, fix the doc comment, which appears to have been
copied from open_vnode.
2026-01-07 14:02:46 -05:00
Augustin Cavalier a76a638355 uname: C89 fix to appease GCC2. 2026-01-06 19:57:18 -05:00
Augustin Cavalier b0570368f3 limits.h: Clean up and fix _POSIX_* values.
These aren't actual limits, but rather the minimum limit
as specified in POSIX (e.g. _POSIX_NAME_MAX is the minimum
allowed value for NAME_MAX).

Add missing values as defined in POSIX-2024, at least for
features we support, and change wrong values to be the ones
specified in POSIX.

No behavioral intended change (nothing should be using these directly.)
2026-01-06 19:57:07 -05:00
Augustin Cavalier d763a3829a semaphore.h: Add SEM_VALUE_MAX.
It's specified in POSIX, and FreeBSD puts it in this file.

Distinguish it from _POSIX_SEM_VALUE_MAX (which is really a
"minimum value this can have" as specified in POSIX.)
2026-01-06 19:40:23 -05:00
Augustin Cavalier ca5c5d531e unistd: Add _POSIX_DEVICE_CONTROL.
We have posix_devctl, so we should declare this now.
2026-01-06 19:38:49 -05:00
Augustin Cavalier 1e4c529aeb search.h: Declare posix_tnode as specified in POSIX-2024.
FreeBSD does the same.
2026-01-06 19:37:53 -05:00
Augustin Cavalier f869860377 kernel: Return B_HAIKU_VERSION for kernel_version & handle it in uname().
We have returned "1" here since this code was originally written
in 2004 (hrev7290). BeOS R5 apparently returns "1000009" for this
value, while the Be Book gives no details about what this value means.

So, return an actually useful value of the Haiku version, and then
in uname() process this to return a string indicating the Haiku
version. This makes "uname" print the actual system version,
not just the hrev.

It appears Linux and other systems give non-integer values in
info->release, so this should be fine.

Fixes #17030.
2026-01-06 19:30:44 -05:00
Augustin Cavalier 6a1ad86129 Debugger: Fix jobs trying to re-add dependencies.
Linked lists are used to manage these, so if we re-add
jobs we'll corrupt the linked lists and cause crashes.

Fixes #19864 and possibly others.
2026-01-06 18:01:24 -05:00
Augustin Cavalier 708d8e42c3 ps2: Disable v2.
It isn't working properly; see #19874.

Leave the others enable for testing for now. We can disable them
in the beta6 branch if necessary (if nobody reports that they are
indeed working.)
2026-01-06 16:24:03 -05:00
Augustin Cavalier 33bc049b2d freebsd_wlan: Don't include stdbool.h under C++.
Should appease GCC 2.
2025-12-30 22:04:33 -05:00
waddlesplash 781af7ad7a Revert "makebootable: guard against writing to non-bfs partitions"
This reverts commit 41f7e3c29a.

It breaks generation of @*-raw images: they weren't bootable anymore
after this change.

Change-Id: I23afdb99fd7b14d5e5a0dc5d3db244a83817ae4d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10173
Reviewed-by: waddlesplash <[email protected]>
2025-12-31 02:58:18 +00:00
Augustin Cavalier 80dc70d5df drivers/ether: Synchronize intel22x, ipro1000, iflib with FreeBSD 15. 2025-12-30 21:56:34 -05:00
Augustin Cavalier 829caf8905 freebsd_network: Additions and motifications for FreeBSD 15 iflib drivers.
* Rewrite machine/atomic.h for clarity and correctness, and add
   a few methods.

 * Add two methods to libkern.h.
2025-12-30 21:55:45 -05:00
Augustin Cavalier a564fd3ccd drivers/ether: Synchronize all non-iflib drivers with FreeBSD upstream.
Mostly minor changes. (Some related to power management refactors
not imported for now.)
2025-12-30 21:54:35 -05:00
Augustin Cavalier e67600e2a4 Synchronize net80211 and all FreeBSD drivers with upstream 15.0.
Tested with realtekwifi.
2025-12-30 19:49:40 -05:00
Augustin Cavalier 4203e71194 freebsd_network: Split m_get3 out of m_get2.
The manpages indicate get2 will return NULL for anything larger
than MJUMPAGESIZE.

(The soon-to-be-merged realtekwifi from FreeBSD 15 uses m_get3 directly.)
2025-12-30 19:18:32 -05:00
Augustin Cavalier e923b9b52b checkfs & resizefs: Adapt following API change in the Storage Kit.
This function always declared that it returned status_t, but
then in practice it didn't. In d225106a20
that was fixed, so these workarounds can be removed now.

Fixes #19862.
2025-12-30 18:36:25 -05:00
Augustin Cavalier ea58f1fc7c kernel/vm: Add missing Put() when removing a reserved area.
This code is triggered whenever an area gets resized to be as large
as, or larger than, a reservation. That can happen with the new heap
when it grows to rather large sizes, in which case we would then leak
the address space when the team was deleted (including all the page
table memory.)

Fixes memory leaks seen e.g. when running Rust compiles, and especially
other short-lived but high-memory-use applications.
2025-12-15 21:24:22 -05:00
Augustin Cavalier 51d39dc74f kernel/vm: Put the address space in get_memory_map_etc.
We don't need a lock here (as we just want the TranslationMap),
but we do need to release the reference we acquired when finished,
otherwise the address space will be leaked.
2025-12-15 21:21:51 -05:00
Augustin Cavalier 24f5beed39 kernel/vm: Minor code cleanup to get_memory_map_etc.
* Move variable declarations closer to use.

 * Adjust comment to be similar to other functions.

No functional change.
2025-12-15 21:21:17 -05:00
Augustin Cavalier ab701fd69e kernel/vm: Print thread ID as decimal, not hex.
Matches the other places this is done.
2025-12-15 21:19:56 -05:00
Augustin Cavalier 0110436f37 ProcessController: Add casts to appease GCC2. 2025-12-15 13:48:57 -05:00
Augustin Cavalier 1e3d21fd30 ProcessController: Allow manual resizing of the replicant window.
There's no real reason to forbid it.

Fixes #13173.
2025-12-15 13:38:42 -05:00
Augustin Cavalier f77f533f72 ProcessController: Scale width by height.
This makes ProcessController look a whole lot nicer on HiDPI.
Tested with 12pt (should be the same), 18pt, 24pt fonts.
2025-12-15 13:34:55 -05:00
Augustin Cavalier 4523120b97 ProcessController: Refactor size computation.
* Don't duplicate the logic, put it all in one place: in a
   static method of the main class.

 * Compose sizes in PCWindow.

Fixes #18049.
2025-12-15 13:34:23 -05:00
Augustin Cavalier 42bb2865fd ProcessController: Base margin on font size.
Arrows don't overlap bars in HiDPI anymore.

Fixes #16306.
2025-12-15 11:58:02 -05:00
Augustin Cavalier 0630e71e0e BuildSetup: Remove some unnecessary disabling of DEBUG.
All these can be built with DEBUG=1 now, it appears.
I tested most of the others and they still fail.

(The settings in this section can be overridden by setting something
else in UserBuildConfig, it appears; they're likely only relevant
when trying to build the entire tree with DEBUG=1.)
2025-12-12 21:19:35 -05:00
Augustin Cavalier a7ee307329 kernel/fs: Clean up and improve logic around address copying.
This follows up after 3b7038d884: migrate the copy-from-userland
logic into a separate method, migrate all consumers to use it, and
add more missing checks and initializations.

Change-Id: I6a2e11a2d0fae7ecf1c94f5b112fa946aaef68ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10055
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-12-12 05:20:38 +00:00
Augustin Cavalier 758538e666 UDF: Put the root node in unmount.
Fixes #19845.
2025-12-09 21:33:29 -05:00
Augustin Cavalier 0125f39fd4 UDF: Upgrade some more TRACEs into ERRORs.
Otherwise it won't be clear why some volumes aren't able to
be mounted.
2025-12-09 21:33:13 -05:00
Augustin Cavalier 333909db33 kernel: Adjust missed OpenHashTable include. 2025-12-09 16:18:49 -05:00
Augustin Cavalier 1257e2ba22 Move most headers containing generic template classes out of kernel/util.
This follows on the move of BitUtils. Many of these headers were
already used in userspace.

Fixes #19849.
2025-12-09 16:11:46 -05:00
Augustin Cavalier 9f786b6af7 Rename "headers/private/utils" to "util".
This undoes some changes from cf930b7e6c.

Nearly all the other utility directories in the tree are named "util"
not "utils", so let's be consistent.
2025-12-09 16:03:02 -05:00
Augustin Cavalier 9c4c97f7f1 BUSBInterface: Fix incorrect management of fEndpoints on updating.
num_endpoints will be changed by the ioctl; we need to use the old
one when deleting the array.

fDescriptor is just zeroed if we fail to fetch, so just perform
the deletions up-front.
2025-12-09 15:00:47 -05:00
Augustin Cavalier 3b66de32f4 libroot/strftime: Add support for %k and %l.
These aren't in POSIX but glibc and FreeBSD support them,
and our ICUTimeData class expects that strftime will handle them.

Fixes #18471 and some of the problems described in #14356.
2025-12-04 16:41:45 -05:00
Augustin Cavalier 984dfdee36 ICUTimeData: Replace all spaces with a regular ' '.
ICU 72 started using Unicode spaces in many patterns.
We don't want those here, so just replace them with
a regular ASCII space character.
2025-12-04 16:23:49 -05:00
Augustin Cavalier 49a702dd58 libroot/locale: Only set all locales if we checked the whole set.
If we only checked one, then of course we can't set LC_ALL,
as that will override ones we didn't verify were the same.

Seems this code has been wrong since it was first imported in 2010.

Fixes #19446.
2025-11-29 19:38:37 -05:00
Augustin Cavalier 1f58862893 app_server: Acquire the window lock in Set*Cursor.
SetScreenMode() and other methods around here also acquire it
in this way.

Adjust one place in ServerApp that would cause a lock-order-inversion
otherwise.

Should fix #19837.
2025-11-29 19:20:42 -05:00
Augustin Cavalier 39c7c29e69 net_server: Run DHCP negotiation on a separate thread to fix hangs.
Previously we ran DHCP negotiation on the looper thread. This meant
that we just blocked it for long periods of time, which stopped
configuration settings changes from working properly, and causing
the Network preferences panel to hang when net_server failed to
respond to its messages.

Now, we spawn a separate thread to do the real work on, and unlock
the looper around the recvfrom() with long timeouts. There's now a
kMsgAutoConfigureFailed that is sent when auto-configuration fails,
so that the AutoconfigLooper can fallback as before. Additionally,
the main NetServer class quits loopers for devices on any configuration
change, rather than deferring it unecessarily (and possibly wrongly, in
some cases.)

Fixes #18037. Probably fixes #17300 and may help with others.
2025-11-27 14:30:54 -05:00
Augustin Cavalier 9cbbc82087 kernel/fs: Block mounting partitions that are already mounted.
Previously this actually succeeded, which could obviously cause
disk corruption and other such problems.

While at it, clean up some code style.

Fixes #16734. Related to #19303.
2025-11-26 23:03:51 -05:00
Augustin Cavalier 5373300610 app_server: Remove window token first in ~ServerWindow.
This way, if the Desktop has locked its window list, RemoveWindow
will wait until the lock is released, at which time we're guaranteed
that the Desktop object will no longer be using this window.

May fix #19750 and related tickets.
2025-11-25 18:46:21 -05:00
waddlesplash b5f59c2d1c Merge "Fix bootstrap build for arm and arm64" 2025-11-22 18:03:38 +00:00
Augustin Cavalier d39ce117e0 app_server: ServerMemoryAllocator takes the original area as the key.
Should fix memory leaks caused by fe8f88cff4.
2025-11-19 16:20:39 -05:00
Augustin Cavalier 1838903ee6 RosterPrivate: Define kMsgAppServerStarted as uint32 to appease GCC2. 2025-11-19 00:46:04 -05:00
Augustin Cavalier 49a92384f4 servers & kits: Rehabilitate app_server restart functionality.
* It's not really possible to distinguish between a first startup
   and a restart inside app_server itself. Due to the new BServer
   setup, the same port will still be used, too. So, change the
   messages sent to just "AppServerStarted".

 * Since the message is sent out much later than the port is created,
   by the time applications see it, the app_server may have already
   been started a while and applications may have connected to it.
   So, check if we really need to reconnect in BApplication before
   actually trying to do that.

 * BWindow now starts with updates disabled, so they must be
   enabled after reconnecting.

After this commit, basic app_server restart functionality works again;
it's restarted automatically by launch_daemon after dying or being killed
and applications automatically reconnect. However, some problems still
linger (e.g. Terminal doesn't always recreate its windows, colors
on the Desktop look wrong, missing desktop background image, etc.)
2025-11-18 22:26:31 -05:00
Augustin Cavalier fe8f88cff4 app_server: Rework ClonedAreaMemory to use ServerMemoryAllocator.
This takes advantage of the new reference (use)-counting logic
inside ServerMemoryAllocator to not re-clone areas needlessly.

Fixes #8501.
2025-11-18 20:10:05 -05:00
Augustin Cavalier 2661f371fb Debugger: Don't wait for threads or user in the CLI input loop.
It seems to be unecessary and just hangs the CLI most of the time
if there's no thread about to stop.

Makes Debugger --team <team> actually work instead of just
hanging.
2025-11-18 18:45:06 -05:00
Augustin Cavalier f4415c8657 tests: Rehabilitate bootloader test.
Now builds and starts again, at least.
2025-11-18 17:39:16 -05:00
Augustin Cavalier d640e20575 BeBuild.h: Add _DEPRECATED.
Change-Id: I983e89fa5324983f3721c50904d2a1d9b2014009
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9087
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: X512 X512 <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-16 16:37:38 +00:00
Augustin Cavalier dee9cb73c6 partitioning_systems: Move Intel-related classes back to the "intel" folder.
This partially reverts commit 61790bdb8a.

These aren't really "common", they're specific to the "Intel" partitioning
system, which GPT also interacts with. So, move them back to the "intel"
folder, but keep the static library setup the commit moving them
to the "common" folder created, which is indeed better and was most
of the advantage of that commit.
2025-11-14 19:24:22 -05:00
Augustin Cavalier 775449bef9 kernel/vm: Don't shrink commitment on precommit in VMAnonymousNoSwapCache.
Same change as was made for VMAnonymousCache.
2025-11-14 19:06:11 -05:00
Augustin Cavalier db168093dd kernel/vm: Adopt() in overcommitting caches needs to adopt commitment.
Fixes incorrectly low commitments causing assertion failures
under AddressSanitizer.
2025-11-14 18:48:25 -05:00
Augustin Cavalier 1dd462720e kernel/vm: Don't shrink commitment on precommit in VMAnonymousCache.
If we were "donated" some commitment (e.g. in copy_on_write_area)
then we don't want to drop it when pre-committing.

Fixes some commitments being too low in forked teams.
2025-11-14 18:48:25 -05:00
Augustin Cavalier 527f059fb1 kernel/vm: Adjust some out-of-date doc comments. 2025-11-14 18:48:24 -05:00
Augustin Cavalier d530817956 Debugger: Fix lock order inversion in CliContext::PrintCurrentThread.
Fixes some hangs in the CLI.
2025-11-13 15:22:57 -05:00
Augustin Cavalier 78e1c0f063 Debugger: Handle terminations occurring during WaitForThreadOrUser.
Otherwise we enter an infinite loop.
2025-11-13 15:22:22 -05:00
Augustin Cavalier 82b9d8f1f7 bootloader: Make Partition::Size return the partition's size.
Partition::ReadAt() and WriteAt() already do bounds-checking
based on the size, but Size() was returning the underlying FD
size, which might be that of the entire disk, not just this
partition. So, move initialization around a bit, and return
the actual size.

Should fix the bootloader menu displaying the wrong sizes
for boot partitions.
2025-11-12 16:50:37 -05:00
Augustin Cavalier f4344e53b8 Interface Kit: Use computed spacing for tooltips.
B_USE_HALF_ITEM_SPACING is 6 with a 12pt font, so this increases
the insets slightly. B_USE_BIG_SPACING should be 20, so that
should be the same.

Improves tooltip appearance on HiDPI.
2025-11-12 16:40:25 -05:00
Augustin Cavalier a9cde90d40 IPv4 & TCP: Implement naive Path MTU Discovery.
* Set IP_DONTFRAG on all TCP sockets by default.

 * Handle receiving B_NET_ERROR_MESSAGE_SIZE, update MaxSegmentSize
   appropriately, and trigger retransmit.

Tested and verified as working.

Part of #1073. However this doesn't implement all of what's needed,
only the most basic form of the algorithm (we don't record MTUs
for reuse later for instance, right now we only store routing
information for the LAN, it appears, so we will need somewhere else
to store that.)

Change-Id: I37a24b50db18af908c6f6257c6fb6d72127d2787
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9402
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-11-12 20:48:08 +00:00
Augustin Cavalier b1231e164d nvme_disk: Add include to fix the build on RISC-V.
Seems this is implicitly included on other architectures somehow.
2025-11-12 14:48:08 -05:00