66407 Commits

Author SHA1 Message Date
Augustin Cavalier
1587ce3d7f kernel/vm: Add page structure offset sanity checks.
The sanity check of the physical_page_number can't work in many cases
since physical page ranges may be discontiguous. Instead what we should
check here is that the page structure address is at an expected offset
within the pages array, and print messages if it's not (and also don't
try to read the mappings linked list if it's not.)

This would have more easily caught the problem fixed in hrev57945:
the KDLs that commit fixed were "invalid concurrent access to page",
but with a very large "expected" number, indicating an overflow.

Change-Id: I784c183c2c146077ffe3c1dede2e54817bde52c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8051
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit e1c13f3ff7b700c20dde1e82febd5ada14b14330)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8058
2024-08-19 17:42:50 +00:00
Niklas Poslovski
26b3b99daa Cortex: Use B_LIST_*_COLORS for Media Add-ons list
Change-Id: I65e37f7c2ef91e96fb009b3636279832ef1de771
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7942
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 7db19fa2937ff7e3185b57e1ebb9c8acda3132f1)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8057
2024-08-19 17:30:08 +00:00
Niklas Poslovski
ea55c7990f FontDemo: Add support for theming by using B_DOCUMENT_BACKGROUND_COLOR and B_DOCUMENT_TEXT_COLOR
Change-Id: I8686e1e0607f3d007971f909d66f57c834363520
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7941
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit c02c239d8d676dbc56e0bb2483e12cb351fe41dd)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8056
2024-08-19 16:21:51 +00:00
John Scipione
0790989100 Decorator: Redraw phantom tab
Add the area of the tab that just got removed from the stack
to the update (redraw) region so that it will be redrawn.

Fixes #16006, #18517

Change-Id: I5a26c353e2dd2e63f72440ddd0b522b52b02b2a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8046
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: X512 X512 <danger_mail@list.ru>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d35bcb118c183533f29733bfce1a29cf6fe8150f)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8035
2024-08-19 16:01:20 +00:00
John Scipione
c17e778103 ListView: Do not alter selection on mouse up if was dragging
Fixes #19001

Change-Id: I2e5956f4f4e48f1032e46e9b5bcd0cf03f1eb568
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8045
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>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: humdinger humdinger <humdinger@mailbox.org>
(cherry picked from commit eb1dc4b1a858cb7e825bea129193ecc925fadadc)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8034
2024-08-19 16:00:50 +00:00
Oscar Lesta
257cc41e63 Clock: make sure the first on-screen draw uses current time.
This avoids starting the clock at 00:00, just to jump to current time.

Change-Id: I911b60716ab60722e4ac38a3d597ab495fb5945d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8049
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>
(cherry picked from commit 03766d494bea7e39b5a9114a445e8bf904976ff1)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8033
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-19 15:58:52 +00:00
PulkoMandy
da0fd8635d ECAM: do not convert 8 and 16 bit access to 32 bit ones
May fix #18536

Change-Id: I8854350b70793160548fe96e15d95874deed4f7b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit feff791acc350f4f0e8372dcd8109a3f0d9d0d80)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8032
2024-08-17 16:31:29 +00:00
PulkoMandy
399dfac046 ahci: make Intel quirk more similar to Linux implementation
May help with #18536

Change-Id: I5755b3484eb8e89fba6fd49a31dd701b8fe884d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8041
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>
(cherry picked from commit 3a84f6fc568a0a50619592e8681d9e67756a46eb)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8031
2024-08-17 16:30:58 +00:00
John Scipione
67d3cb2ec9 Tracker: Enable/disable New Folder/Template menu on context-click.
(kWindowPopUpContext not kPosePopUpContext).

Fixes #18975 again on context-click

Change-Id: I4e3cf134f318e513c40aad42001257437aea70c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8039
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit d5a862047c1dc6ce857f4476cbd5e51d8c449b51)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8030
2024-08-15 16:18:00 +00:00
PulkoMandy
f2457192e2 BMenuItem: draw checkmark on marked item in matrix-layout menus
Fixes #18990

Change-Id: Id2f3b78bb443b8f76ab0bdde4318ddfd95d283bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8038
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
(cherry picked from commit d289e5bfabe51dc8e85d3d38428e5743a137782c)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8029
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
2024-08-15 11:19:24 +00:00
Augustin Cavalier
0750f5b62d ramfs: Properly acquire/release references to the vnode in VMCache.
This is what AcquireStoreRef/ReleaseStoreRef are for. We don't use
VMVnodeCache here because that is a non-"temporary" cache that
writes its pages back to disk, while we need a store for the pages
that won't discard unmodified ones when memory is low.

Add a close() to the mmap_cut_tests, which triggers the case where
this is important (a file is unlinked, mmap'ed, and then the lone
FD referring to it is closed, triggering the file's deletion unless
the mmap also acquired a reference to the vnode.)

Fixes KDLs with Firefox test builds.
(cherry picked from commit c0a12a6b7d697382511ff36e7815aad6a379b3a7)

Change-Id: I589325966f7b8eb837750aea1f5adbdd94e06aeb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8028
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-14 22:37:43 +00:00
Augustin Cavalier
47e97829f6 kernel/vm: Add "unmergeable" flag to VMCache.
ramfs needs to create caches that are both temporary and unmergeable,
so add another flag to make this state possible.

Otherwise, mmap'ed files from ramfs might wind up in VMCache
trying to merge the caches when the last one is closed, which
we don't want.
(cherry picked from commit a8877df135c0395285945b11a75d57e10b7aecdf)

Change-Id: Iec9549f5f36207968e1502ce1a0d5fb9354f02d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8027
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-14 22:37:36 +00:00
Augustin Cavalier
0975843f11 runtime_loader: Properly unload libraries whose dependencies fail to load.
If some (but not all) of the dependencies failed to load, they
will be in an inconsistent state (some NEEDED unset/uninitialized, etc.)
In order to neither leak this data nor have it cause problems later,
we should unload actually call unload_library() and thus put_image()
to have the unused/uninitialized dependencies be propery unloaded.

To make this work correctly, adjust unload_library to only call
the exit hooks if the initialization hooks were also called.

Fixes a crash in Firefox startup when some dependencies aren't installed.
(cherry picked from commit 1f1be520070165ce402b46d17a44a2941c0dda2f)

Change-Id: I75fb8bea779afed223c585399e85b4b8e10aa76e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8026
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-14 19:46:59 +00:00
Augustin Cavalier
dcb6880ba6 BListView: Do not call virtual ScrollTo(BPoint) method in ScrollTo(index).
ScrollTo(index) was introduced only in 82bfaa954dcfd90582fb2c1a0e918971eea57091,
in the implementation of autoscroll-on-drag. But if we call the virtual
methods from here, subclasses might recurse back into us when calling
other methods (MouseMoved() in particular), so in order to avoid
an infinite recursion we have to call ourselves explicitly here.

Fixes a crash on drag in list views in WonderBrush.

Change-Id: Ie7a1bbb75161815bac1f5a800c9ba5830ac43a0f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8014
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
(cherry picked from commit 256f79af68e5c30d573c92abdde5cde7724e5733)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8025
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-14 00:38:50 +00:00
Augustin Cavalier
e03d60c2f9 kernel/x86: Clear %edx in syscall handler if the return value isn't 64-bit.
Otherwise, we will leak random kernel values to userland, and
also have incorrect output in strace for anything that doesn't
have a 64-bit return value.

Fixes strace displaying return values on 32-bit x86.

Change-Id: Ibd6304bd989580f64b25f1505a5e02fb928dce84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8013
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit b261d68da291a88537e552007c5b7fd2d2e77249)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8024
2024-08-13 21:49:57 +00:00
Augustin Cavalier
85700285aa DefaultBuildProfiles: We now have Python 3.10.
Change-Id: I848dfecf13409e642e642e1538f74debe144f72b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8010
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-13 00:10:27 +00:00
Augustin Cavalier
ebdc761c50 BuildFeatures: Don't specify libtiff SOVERSION.
Let the compiler figure it out.
(cherry picked from commit 72be912bae8ccb93da9f217a6f4253ebe61d9c53)

Change-Id: I197863f84e02aa02606b980708946ed79070c8bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8022
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-12 20:48:44 +00:00
X512
826221cf8d build: put each package build entry to separate line, adjust code style
Change-Id: Ib682fc276a08131e69fcdaa2cdba8c22d9e54a1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8004
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
(cherry picked from commit 0971cc2fac552e21bbde876151cbf2c113b86c1b)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8021
2024-08-12 20:40:17 +00:00
Autocommitter
3c58c1a476 Update translations from Pootle [rollup] 2024-08-12 16:36:53 -04:00
Augustin Cavalier
bb36d0f2fc HaikuPorts: Synchronize.
(cherry picked from commit 427d0b067b76fba3c89ff181ba02e71d36b8f357)

Change-Id: If49dc21b91fefdc46de4ad8650394d8c7f94ca60
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8020
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-12 20:32:04 +00:00
Augustin Cavalier
5f5ce32efc libbsd: Fix kqueue reporting errors when selection fails.
We shouldn't proceed to "wait" if we got errors back from "select",
but should just return the count of errors-reported-as-events
directly, or return the status if we can't report them that way.

Fixes libevent kqueue backend hanging forever on startup.
(cherry picked from commit 380ed24e115ca3169ca718412b3ddd3728fdda8d)

Change-Id: Ia725c74219139199db2dd8cf0dc29337bb97c4f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8019
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-12 19:59:58 +00:00
Augustin Cavalier
511922fd60 nvme_disk: Don't reallocate the vtophys array if it was too small.
The "(request->Length() / B_PAGE_SIZE) + 2" calculation should suffice
for any physical_entry runs that we can actually use as unbounced I/O,
since all entries except the first and last must start and end on a
page boundary.

Also, use alloca() if the buffer length is small enough.
(cherry picked from commit a432595dc467fdeaef7b4bc1fc0c0731c65d0544)

Change-Id: I2e903d47932c67af4d82fea1e79ca84d615f8a7a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8018
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-12 18:55:39 +00:00
Humdinger
34d5f568fc FSUtils: Fix entry_ref of renamed file, locale fixes
FSCreateNewFolder(): Fix entry_ref of renamed file
* If FSMakeOriginalName() renames a file, because the file name
  already exists, FSCreateNewFolder() needs to set the ref to the
  new filename.

* Fix copy-suffix in FSCreateNewFolder(). The space comes before the dash: " -".
  Before, you ended up with "File name-  2"

FSMakeOriginalName(): Make truncation localization aware

* In FSMakeOriginalName() don't hardcode the 4 characters of "copy" when
  determine to truncate an overly long filename.

* Adjust comment in that regard + typo fixes.

* Localize default suffix " copy".

Change-Id: Ica880a8b831b321657f3f2d3825509b7fb9fe72d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7960
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit e0a6acb74df485c3c574020ac283ba19907553b4)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8017
2024-08-12 18:20:36 +00:00
Máximo Castañeda
85547354f4 app_server: avoid duplicate scan of font directories
When scanning a directory for fonts we also include its subdirectories.
Those may already be in the list and may even have been scanned before.
That happens in a typical setup, where the system fonts directory is
obviously included and then a subdirectory is added as part of the
default mappings.

See #18979

Change-Id: I92c6b7965aee030520402e2d53c4190fdca8b0e1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8001
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>
(cherry picked from commit ff3924b325c3bac93868423dc7c5e9651dc5ec61)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8016
2024-08-12 17:26:59 +00:00
John Scipione
6c3373df70 Tracker: Repopulate menus when entering/leaving volumes
Change-Id: Ifef64abb6ae2865d281b66fd2de7e2b7ba067ca6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8003
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>
(cherry picked from commit 6edfc6e0125063b446ac5259416cc4c6cd4fe3b9)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7995
2024-08-12 16:56:51 +00:00
John Scipione
ed4342bbef Tracker: Enable/disable New Folder/Templates on UpdateMenu()
Fixes #18975

Change-Id: Icbcf4bb95a999bdf7ce0afed2051c2d3cfb59971
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8002
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>
(cherry picked from commit 8717bb87dd77b5d6beb9376c31a806da6b83f31f)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7994
2024-08-12 16:56:41 +00:00
Niklas Poslovski
77bb08e93c Appearance: Make B_MENU_SELECTED_BACKGROUND_COLOR darker in dark theme
Change-Id: Ia9845b45b04f92e6e1e40fa16ef172760d75a664
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7937
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 2c63a75fa43f5c35e588371de363bc27352fab97)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7993
2024-08-12 16:56:01 +00:00
Augustin Cavalier
bf1035e39e OptionalPackages: Re-add perl.
Change-Id: Ib118211e814dd771828e08b573f0a0963bb131bd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7992
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-11 04:06:44 +00:00
Augustin Cavalier
da8667cb04 HaikuPorts/x86_gcc2: Synchronize.
Still TODO: libtiff.
(cherry picked from commit 39d510f7dd31592d71cb610254d093be7b843993)

Change-Id: I11ace633879bb708b56c806bad0e546c728b79ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7991
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-10 21:37:26 +00:00
Augustin Cavalier
4d831c4698 Updates in preparation for package sync on gcc2h.
(cherry picked from commit 050c34d5d197433dc8cf668f967883864a2f7ec3)

Change-Id: I04be220a9e771bf8d6a17c1e75ec28b28fe20ef4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7990
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-10 21:37:15 +00:00
PulkoMandy
5b82b59da6 gnu/sched.h: missing features.h include
Change-Id: I5032dbf08a034df77ab4b436178d08fba2137da5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7974
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 62ee409eac5ddad1edd292a1a27c45a8950f9eec)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7989
2024-08-10 11:27:04 +00:00
Augustin Cavalier
a67006e8c6 FAT: Fix type of volumeCluster.
pcbmap takes a u_long.

Fixes #18958.
(cherry picked from commit 5a09cea418fd04eb24e555c6f8fe097657a83a17)

Change-Id: I9a5518d736c801a536fbb16398fe61261b0e359c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7988
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-10 04:54:35 +00:00
Augustin Cavalier
5ebed4cb9f HaikuPorts/x86_64: Synchronize.
Includes OpenSSL 3.0, Python 3.10, and more.
(cherry picked from commit 7dea48f378ea64a3dfdeba5f2f2bc9c80d2e0254)

Change-Id: Id029ee3b91baad503ea5b5c7cd2b6a5cf2054a32
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7986
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-10 02:56:15 +00:00
Augustin Cavalier
3c51bdc1d6 BuildFeatures: Updates for libtiff >= 6.0.
(cherry picked from commit 101769a5838a70a87ae60f596d146396b5e3efc1)

Change-Id: Id8ac097a714cc9c0574ed7e8c7b56b143064e7b5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7987
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-10 02:56:10 +00:00
PulkoMandy
3136ee3be9 Update to OpenSSL 3.
- Rename the package in Jamfiles as appropriate (but don't rename the
  build feature)

- Remove libnetapi SSL class (not needed anymore, OpenSSL now knows how
  to use pthread functions directly and seed its random generator)

- Rename or remove a few other deprecated functions

Change-Id: I624833923e113a8235932d7ce8020bf27c6e2ea6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7717
(cherry picked from commit 6c59ed739ba2adcde633b55a9f829c8b48e7e9af)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7984
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-10 02:55:53 +00:00
Augustin Cavalier
59e6559754 JPEG2000Translator: Tweaks for usage with the new JasPer version.
(cherry picked from commit a79f10b8d136b2c3e68ba1e458fcd8b94f9410f5)

Change-Id: Ia185192d03df4ef81cecbbf56da3fea88623d319
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7985
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-10 02:55:45 +00:00
Augustin Cavalier
bff2211768 IORequest: Correct major oversight in finished callback API.
The IORequest internally likes to deal with transferEndOffset
not transferredBytes because of sub-requests potentially being
prepared all at once (in some paths in the I/O scheduler),
thus fTransferSize can get incremented in Advance() before we have
actually executed that transfer.

But external consumers much prefer just knowing transferredBytes
not transferEndOffset. And many of them actually named their
variables that (or "bytesTransferred") and just passed the
transferEndOffset through to variables with that name! That's
obviously wrong, and it's surprising it wasn't discovered before now.

The problem was uncovered by repeated KDLs in PrecacheIO.
That method used the "bytesTransferred" value as a count of
pages transferred, which would then run past the end of the array
if the transfer start offset was not 0 (which the majority
of the time it would be, since this method gets called on
the first mmap() of a file, probably before any pages are read in.)

Most other consumers of this API did not check the value, it seems,
or otherwise had some mitigating factor that prevented it from
causing more problems. An exception is the page code, which
may have spuriously considered writes as successful when they
really weren't.

May fix some of the "invalid concurrent access to page" KDLs.
(cherry picked from commit 3ecbb34240d2f647222aa53ff0b5dca7f3873c33)

Change-Id: Id4f0e4cf96d44760691a533dbd82d95c8bc35e9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7983
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-09 22:06:49 +00:00
Augustin Cavalier
93fa78edd3 app_server: Move user-path management more into GlobalFontManager.
The Desktop instance is currently a singleton, and by the time it starts
the GlobalFontManager's initial scan is already running, so if we
register the user paths then it will spend a long time waiting for
the lock. GlobalFontManager didn't even use the provided UID,
so just move the add-user-paths logic into the constructor.

This helps with #18669 on systems that have the default fonts set
and no font settings file. (On systems that do, the global font
manager lock will be acquired in desktop settings initialization.)
(cherry picked from commit 4909eb2091b751e2cee8eac11ecabf3315544a99)

Change-Id: I682b2c524996a9fbb2ddc0c4c661fd27c71fcec5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7982
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-09 21:10:48 +00:00
Augustin Cavalier
8ff844174f virtio_net: Received length includes net_hdr length.
This wasn't noticed until now because the IPv4 module would just
truncate packets to their actual length, but the extra data would
appear in packet captures.
(cherry picked from commit 27462aa0c7cc684a0d3ed2ee7797f60b9410c44c)

Change-Id: Ied9e42dbd104e85962f280424a17bb9fe0e96c03
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7981
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-09 01:17:04 +00:00
Augustin Cavalier
1d44b9df27 device_manager: Only scan busses/scsi in the default case for virtio.
Otherwise we load and unload the SCSI module thousands of times,
which is expensive. It was only added to this section for virtio
in d3b108c53d151d7c0aab32c1562bca355462868b, so avoid scanning
it here except in that case.

Confirmed that virtio_scsi still works as a boot device.

While at it, remove an unused get_attr.

Change-Id: I0882fcb3465809d6bcdd8ed45e66a4dbfe91f7ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7965
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 58c9714921c8fd4d82f2217693241fb71b29ec3a)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7980
2024-08-09 00:42:39 +00:00
Máximo Castañeda
83bd5bfe7c Input server: add some mouse settings checks
Workarounds broken settings as in #18973.

Change-Id: I9723cba7fc46ab624da54ebaf3e6e9e1fa547d66
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7962
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 12c5e574396e644b2325f8bf68c4f7783522bee7)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7979
2024-08-08 22:35:59 +00:00
Pascal Abresch
ea4b303b2a Appearence: Fix control background color in automatic colors dark mode.
Change-Id: I845f65ea811820ef27874d30782100bb5d175419
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7959
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 988542e39ef16369127ec9fb5ac8b2d7b2b5ae3b)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7978
2024-08-08 20:59:58 +00:00
X512
5b15e0f307 build: put each image build target to separate line
It helps to simplify to view difference and apply patches.

No functional changes.

Change-Id: Ia29368eceaeb3306990c09da77c4527eff87c72a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7932
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit aa55fb1f729ab15477f533f83670b84d6d5402a5)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7977
2024-08-08 16:21:49 +00:00
Augustin Cavalier
6d79bd4959 freebsd_network: Use the correct buffer length in receive.
Should fix #18966.

Change-Id: I05e35ecbdc4c269501980c18cedfc69d99618ae6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7961
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-08-08 16:11:40 +00:00
Augustin Cavalier
b87faca10d Adjust repositories to r1beta5. 2024-08-08 10:59:57 -04:00
Augustin Cavalier
6eed7e52ab build: Enable HAIKU_OFFICIAL_RELEASE. 2024-08-08 10:58:41 -04:00
Augustin Cavalier
9d0312eb00 Disable serial debug output by default.
EFI doesn't have a boot keys mechanism so we just disable the
routine that enables it entirely. Also disable it in early kernel
output before the settings file has been read.
2024-08-08 10:57:57 -04:00
Augustin Cavalier
90da87bd88 kernel_debug_config: Turn KDEBUG_LEVEL down from 2 to 1.
Per the ReleaseCookbook.
2024-08-08 10:48:24 -04:00
Augustin Cavalier
69ca3cb319 Versioning: This will be R1/beta5. 2024-08-08 10:45:56 -04:00
Augustin Cavalier
a1d79e238e Versioning: Add BETA_5 and PRE_BETA_6 version constants.
* PRE_BETA_6 is now the default in master.
hrev57937
2024-08-08 10:42:41 -04:00