Commit Graph

61637 Commits

Author SHA1 Message Date
Jérôme Duval
12bd6e12a2 mmap: using PROT_NONE usually means the memory isn't actually used.
A program can mmap virtual memory which will only trigger signal handlers.
This is for instance needed for ASAN.

Change-Id: I4a42b4860b5acab17465683e9cf73c486bea7d40
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2554
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 18:07:27 +00:00
Jérôme Duval
65b777592a Move the heap reservation higher on 64-bit platforms.
this is required for AddressSanitizer to operate correctly, see
https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm#64-bit
Change-Id: I0ab95980f8f869b3171f9cd5f9197dcee5464e06
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2555
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 18:07:08 +00:00
Jérôme Duval
86ff706f30 tcp: set is_connected flag on our socket without parent too.
a client non-blocking socket would otherwise looks non connected.

Change-Id: I077c0b61a5dbaa8df350185c8a9259fd81dab342
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2553
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 18:06:56 +00:00
Adrien Destugues
96240a75f1 FirstBootPrompt: fix a typo 2020-05-02 12:36:49 +02:00
Autocomitter
13cb3249a7 Update translations from Pootle 2020-05-02 08:57:54 +00:00
Adrien Destugues
5c1b8016d3 FirstBootPrompt: smarter keyboard layout selection
Change-Id: I6501f8a697039c4c4d600d544e0ce6659d2b5dfe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2539
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 00:54:48 +00:00
Adrien Destugues
5c2709cdd5 Firstbootprompt: remove flags from languages.
http://www.flagsarenotlanguages.com

Add some other icons to make the window a bit more spicy as suggested by
Axel.

Change-Id: I859cefc7f5cb99f9a5465902c9d471f0b9857b71
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2527
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 00:53:01 +00:00
Jérôme Duval
a03ed4fa08 udp: set is_connected flag on our socket once connected.
Change-Id: Ie5fcc5152af813d74d33c20ed7c3e81f9e828518
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2548
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 00:52:20 +00:00
Jérôme Duval
0424248dcb kernel/fs: allow sendto to be called with a NULL address
POSIX says: If the socket is connection-mode, dest_addr shall be ignored.

Change-Id: Ic75de473173e3795066beeac9a9f2404418d94da
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2547
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 00:52:20 +00:00
Jérôme Duval
bf9a85cb01 udp: fix trace build on x86_64.
add current thread id.

Change-Id: I275dcee5ae27e357c8733a1aab9310e9dbc7a839
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2546
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-02 00:52:20 +00:00
Adrien Destugues
e6aa214527 libbe.so catalogs are not included in image
Media Kit catalog was incorrectly using "libbe.so" as a catalog name
and overwriting the catalogs for libbe.

Fixes #15904

Change-Id: Ib56045bbcf127c23ac5229981ce92d298ffd6fe5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2536
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2020-05-01 13:49:49 +00:00
Andrew Lindesay
5ad0160882 HaikuDepot: Disable System Pkg Updates
HaikuDepot reacts to changes in packages installed in the
running system, but is currently reloading everything
which is too slow with the quantity of data involved.
Short term; disable this function in this commit so the
application can be used and then come back to it later
with a better solution.

Relates to #15879

Change-Id: I96a17c01e8b1ae1443fb6242a5b53a22b1e44416
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2483
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-01 10:44:25 +00:00
Humdinger
ea3b792b82 Update copyrights of package_infos to 2020
Fixes first part of #15932

Change-Id: Ie3fd1ceeae9a7648039a87f2f72d6b48cf17b8a9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2541
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-01 07:40:54 +00:00
Jérôme Duval
7c640ecc39 nfs: gcc2 build fix 2020-04-30 16:41:33 +02:00
Jérôme Duval
a00a3d62f2 HaikuImage: add wmi driver and smbios generic module
Change-Id: I76a0642285a33f9a0de930c4af0e207b54f33247
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2537
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-04-30 14:06:10 +00:00
Kyle Ambroff-Kao
e1b7c1c7ac storage/SymLink: Fix Be API regression in ReadLink
After this patch, "UnitTester BSymLink" passes.

BSymLink::ReadLink() in BeOS would always return the length of the
link unless an error occurred. Before this patch, Haiku instead seemed
to emulate posix readlink() behavior, returning the number of bytes
copied into the output buffer.

BeOS also did not guarantee that the string written into the output
buffer is NULL terminated if the output buffer cannot contain the
entire link contents, but the Haiku implementation does since it is is
a basic safety issue.

This patch fixes this and updates the Haiku API docs to describe the
behavior explicitly.

Fixing this required changing behavior in bfs_read_link, which
required changes in many more places.

docs/user/storage/SymLink.dox:
src/kits/storage/SymLink.cpp:
* Don't return B_BUFFER_OVERFLOW if the provided buffer is not large
  enough to hold the link contents.
* Update documentation to clearly describe behavior.

src/add-ons/kernel/file_systems/bfs/kernel_interface.cpp:
* Change bfs_read_link() to always return the link length. This is
  called by common_read_link in the VFS, which is called by
  _kern_read_link().

src/add-ons/kernel/file_systems/btrfs/kernel_interface.cpp:
src/add-ons/kernel/file_systems/exfat/kernel_interface.cpp:
src/add-ons/kernel/file_systems/ext2/kernel_interface.cpp:
src/add-ons/kernel/file_systems/iso9660/kernel_interface.cpp:
src/add-ons/kernel/file_systems/netfs/client/netfs.cpp:
src/add-ons/kernel/file_systems/nfs/nfs_add_on.c:
src/add-ons/kernel/file_systems/ramfs/kernel_interface.cpp:
src/add-ons/kernel/file_systems/reiserfs/Iterators.cpp:
src/add-ons/kernel/file_systems/reiserfs/Iterators.h:
src/add-ons/kernel/file_systems/reiserfs/Volume.cpp:
src/add-ons/kernel/file_systems/reiserfs/Volume.h:
* Update the implementation of read_link for these filesystems. Some
  of them were incorrect, and some had just copied the posix behavior of
  bfs from before this patch.
* Use user_memcpy in ext2_read_link()
* Use user_memcpy in nfs fs_read_link()
* Use user_memcpy in reiserfs StreamReader::_ReadIndirectItem and
  StreamReader::_ReadDirectItem
* Remove unused method Volume::ReadObject in reiserfs.

src/add-ons/kernel/file_systems/packagefs/nodes/UnpackingLeafNode.cpp:
src/add-ons/kernel/file_systems/packagefs/package_links/PackageLinkSymlink.cpp:
* Update UnpackingLeafNode::ReadSymlink and
  PackageSymLink::ReadSymLink() to set the bufferSize out parameter to
  the symlink length. Both of these are called by
  packagefs_read_symlink.
* Use user_memcpy

src/add-ons/kernel/file_systems/netfs/client/netfs.cpp:
* netfs seems mostly unimplemented. Added a FIXME note for future
  implementers so that they know to implement the correct behavior.

src/system/libroot/posix/unistd/link.c:
* readlinkat() was just wrapping _kern_read_link() because before this
  patch it had expected posix behavior. But now it does not, so we
  need to return the number of bytes written to the output
  buffer.

src/build/libroot/fs.cpp:
* Update _kern_read_link() in the compatibility code to emulate the
  Haiku behavior on the host system. This is done by using an
  intermediate buffer that is guaranteed to fit the link contents and
  returning its length. The intermediate buffer is copied into the
  output buffer until there is no more room.

src/tests/kits/storage/SymLinkTest.cpp:
* This patch also resolves some test failures similar to those
  resolved in ee8cf35f0 which fixed tests for BNode. The tests were
  failing because Haiku's error checking is just better.

  BeOS allowed constructing a BSymLink with BSymLink(BDirectory*,
  const char*) with the entry name of "". The same is true of the
  equivilant SetTo() method. The BSymLink object will appear valid
  until you attempt to use it by, for example, calling the ReadLink
  method, which will return B_BAD_VALUE.

  Haiku does a more appropriate thing and returns B_ENTRY_NOT_FOUND,
  for this constructor and the equivilant SetTo(BDirectory*, const
  char*) method. This patch fixes these test assertions to match Haiku
  behavior.

docs/develop/file_systems/overview.txt:
* Add notes for future filesystem driver implementers to call this
  mistake when implementing fs_vnode_ops::read_symlink.

docs/user/drivers/fs_interface.dox:
* Fix documentation for fs_vnode_ops::read_symlink

Change-Id: I8bcb8b2a0c9333059c84ace15844c32d4efeed9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2502
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-04-30 10:13:41 +00:00
waddlesplash
4835a173bd Revert "net_socket: getpeername now only works on connected socket"
This reverts commit 04fac889f7.

Reason for revert: Breaks Qt, the behavior is incorrect it seems.

Change-Id: I09d35c214c899d0c06d7780b13db795fb2a3393a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2538
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-29 13:50:20 +00:00
Adrien Destugues
af6ecfa5a2 Pulse: remove ugly border around main view.
Probably a leftover from when the window used B_NO_BORDER?

Change-Id: Ie266b0374b6983747d842165b602a199d6685662
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2526
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-28 17:17:35 +00:00
Humdinger
e304f35430 Fix URL in install-wifi-firmwares.sh
Fixes #15916
2020-04-28 17:44:57 +02:00
Adrien Destugues
06aba24416 Do not always regenerate keymap name headers
Depends on all the keymap files instead. If one is added, the header is
then re-generated.

Change-Id: I0adf37065d7c708e94c933a2044ceb56b1fd48fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2525
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-28 14:22:30 +00:00
Augustin Cavalier
18e9c8885f nvme_disk: Use DMAResource for bouncing.
This is a "best of both worlds" approach: if nvme_disk
determines the I/O can be done with no bouncing at all,
it will do so; otherwise, the I/O is done by the _bounce
method that uses DMAResource.

Thanks to mmlr for helping investigate some of the DMAResource
crashes and other oddities.

Fixes #15818 and #15123.
2020-04-27 23:37:01 -04:00
Augustin Cavalier
1b3ccbc50b nvme_disk: Overhaul to use physical-buffer-based I/O.
This fixes the virtual/physical mixup problems that plagued
the driver until now.

This is rather inefficent, though, as it does its own page-based
bouncing instead of using DMAResource. That will come in the
next commit.
2020-04-27 22:49:51 -04:00
Augustin Cavalier
c1c239fefb kernel: Add mechanism in IOBuffer & IORequest to clamp the last iovec.
This is needed by CreateSubRequest, which creates a sub-request
using some subset of the passed IO vectors. In the case that the
last vector will not be fully used, we need to clamp its size
in the sub-request to the remaining length.

do_iterative_fd_io, used by vfs_read_pages (which is in turn
used by the file cache) used this to split up requests
into their constituent block-run requests. So, previously,
the invalid IO requests created by this could, under one possible
interpretation, overwrite valid file data and cause disk corruption.

It is slightly unfortunate that generic_size_t has no unsigned
equivalent, so we are left with 0 as the magic number here,
instead of -1. However, the passed "length" remains unchanged,
so any callers that pass the wrong value for lastVecSize
will be trapped by the assert added in the previous commit

Fixes #15912 (the assert added in the previous commit),
and potentially disk corruption caused by this.
2020-04-27 22:30:50 -04:00
Augustin Cavalier
d939cacf6b kernel: Add assert in IOBuffer::SetVecs() that the passed length is the actual length.
These are, at present, triggered on rare invocations of vfs_read_pages.

See #15912.
2020-04-27 22:30:50 -04:00
X512
8ff2f81f6b test_app_server: add RemoteHWInterface
Change-Id: I67473c9df4a81aab42d2bb92f93078abc3d7b6d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2512
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-28 00:45:19 +00:00
X512
f569b97029 test_app_server: add multiple screen support
Change-Id: I89fb30936160615d28aebb36c8b1f84690007de7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2511
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-28 00:45:19 +00:00
Leorize
04fac889f7 net_socket: getpeername now only works on connected socket
Per POSIX.1-2008, getpeername() shall fails if the socket is not
connected.

With this change, it's no longer possible to retrieve the peer from
connectionless protocols such as UDP, even if a peer is assigned to them
via connect(). The same behavior can be replicated among
POSIX-compatible operating systems such as Linux.

Fixes #15081

Change-Id: Ia5631971200959a3d3815332ff1969c4b4dd289b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2421
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-28 00:44:24 +00:00
bitigchi
a67bbcb799 Display localised application/preference names by default
By default, Haiku does not provide localised names for applications and
preference names. This commit changes the default setting to 'true',
for displaying the localised variants.

This is generally bad UX, especially for the preference preflets,
since the user will have no idea where to go if he/she does not
speak English (even will not be able to find this setting presumably).

Change-Id: I17dea9428541be50e27227ba15f9afcde21a99d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2002
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-28 00:44:07 +00:00
Michael Lotz
943383c889 DMAResource: Remove incorrect early unlock.
When bounce buffers were changed from fixed to dynamic in hrev27185, the
early unlock in case of physical vectors was not removed. This would
lead to an unprotected fBounceBuffers list and the possibility for
multiple operations to share the same bounce buffer vecs, leading to
disk corruption. This would not happen when used purely under the
IOScheduler as all translations are done from a single thread there.
With the nvme_disk driver that runs requests in parallel, this was
however easy to trigger.

Change-Id: I46bd55cd5d86174523d3f745b6c8800dae02babc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2524
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-28 00:43:31 +00:00
Adrien Destugues
5fd6feed3e Tracker: fix checkbox positions in InfoWindow.
Fixes #15914.
2020-04-27 20:17:51 +02:00
CruxBox
eab542ef03 xfs: Init AG Free Space Management
Currently need to make the B+Tree for AG Free Space Management.
The functions or the code for this task isn't complete. Sharing for
reference.

Change-Id: I1e29832b9645bd527962128a8c85b7ca24c7fd50
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2378
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-27 10:28:49 +00:00
Jérôme Duval
03f4263ea5 acpi_als: driver for ALS ACPI devices
Change-Id: I24068c7b3e1c5863d39d0a805a32acfeb93ad422
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2505
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-04-27 07:38:40 +00:00
Jérôme Duval
ceb94d0080 wmi: some ASUS laptops need have ALS forced enabled
Change-Id: Ie0752419b1e60d78cdfe60e5b35303a09db10400
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2504
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-04-27 07:38:40 +00:00
Jérôme Duval
97f2b91169 smbios: add module to match SMBios vendor and product
Change-Id: Ib7848da1c22c42a1a9030891159f4e852c6c1ecd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2503
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-04-27 07:38:40 +00:00
X512
bd3b700484 screenmode: fix MIME signature
Change-Id: Id7f1ffea799b4843076abe4e791d949dcb2f0339
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2518
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-26 17:37:18 +00:00
José Manuel Ferrer Ortiz
ffbe5ecde2 Time: Fix flattening of countries with one subitem and no timezone on the parent.
Fixes #15907.

Change-Id: I10d81ca92539b3430607c10ebaa9fe7f1080ef0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2517
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-26 17:35:26 +00:00
Kyle Ambroff-Kao
6f9f7e02a8 tests/HttpTest: Fix build on x86_gcc2
* std::istreambuf_iterator<T> template isn't available until C++11.
* std::vector<T>::cbegin() is not available
* Add missing include of errno.h

Change-Id: Ice344f6b0f93bf72d9120674607878c4c3e8ef54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2515
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-26 16:53:07 +00:00
Paradoxon
a688d43f35 HaikuDepot: Add a version column.
Makes it easier to find the latest version of a app.

Fixes #15668.

Change-Id: I26e939cd7ac4c590d856a2b093cc52098fa14301
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2488
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-25 18:58:14 +00:00
Autocomitter
dc0bc42494 Update translations from Pootle 2020-04-25 09:02:45 +00:00
X512
eeff891b9d Message screensaver: style fixes
Change-Id: Ifd910a517411e888eaee0efda2fa18838a1023d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2513
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-24 23:51:12 +00:00
X512
3ed66cafba Message screensaver: fix array delete[] problem on clang, style fixes
Change-Id: Ic0182e81e9267c69b92ed60a85026eb45cda3a2d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2407
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-24 22:34:07 +00:00
X512
6d31c23459 test_app_server: fix build
Change-Id: I5fa78adf04bf4380e340d470eb98377e574d3801
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2510
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-24 22:30:15 +00:00
Niels Sascha Reedijk
5365cf366b SoftwareUpdater: show localized name in Deskbar
Reported by bitigchi in #15554. Thanks!
2020-04-24 17:40:54 +01:00
Niels Sascha Reedijk
f766999fae Network preference: show localized name in Deskbar
Switch to B_TRANSLATE_SYSTEM_NAME to use translations in Deskbar.

Reported by victordomingos, thanks!

Change-Id: Ie841b5b19009858ac20f789fc99551df177fbff4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2508
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-24 15:25:56 +00:00
Augustin Cavalier
d26bbf4c90 build: Remove perl from the Development set.
This caused the nightly builds to fail, because perl is apparently
a dependency of something in the base set already.
2020-04-23 21:26:43 -04:00
Jérôme Duval
19692eed95 OptionalPackages: add missing dependencies
for Development: automake and autoconf require perl
for DevelopmentMin: makefile_engine requires make and mkdepend

Change-Id: Ica2bace17a233e2e589e139208e468870b1cc84e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2507
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-23 15:43:08 +00:00
Augustin Cavalier
5332b1ce28 freebsd_network: Remove bogus KASSERT.
As pointed out by halamix, root_size is set to > 0 during
radix_bitmap creation, and never changed after that. So
this is a bogus check.

Fixes #14941.
2020-04-23 01:05:33 -04:00
Augustin Cavalier
ccb11fb4f2 libnvme_haiku: Name mutexes after the function they are allocated in. 2020-04-23 01:02:36 -04:00
Augustin Cavalier
9f703d301c libnvme: Unset ctrlr on teardown.
This way we do not attempt to tear down more than once,
which triggers an assert in mutex destruction.
2020-04-23 01:02:17 -04:00
Augustin Cavalier
9a3a70f437 libnvme: Add better asserts in SGL-to-PRP request conversion.
Taken from upstream (SPDK).
2020-04-23 01:01:47 -04:00