Commit Graph

60487 Commits

Author SHA1 Message Date
Alexander von Gluck IV
890224c31c scripts/find_triplet: Fix shell, requires bash not sh
Change-Id: Ie8219230810856c2a5f1c99bb6f3162eeff0964e
2019-08-19 09:05:52 -05:00
Augustin Cavalier
f70930539e rpmalloc: Add missing NULL checks to the allocation paths.
Fixes #15258.
2019-08-17 12:29:20 -04:00
Murai Takashi
cc7e844c12 drivers/graphics/radeon: Fix -Wformat=
Change-Id: I1bfb70b9fb492140621d4d936ae8c29985f78d64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1544
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-17 16:09:29 +00:00
Murai Takashi
77fb9ca3e6 Keymap: Localize keyboard layout menu.
and modify keyboard_layouts/Jamfile to remove "<keyboard-layout>"
from KeyboardLayoutNames.h.

Change-Id: Ibd68bfa165089e77cfeb6ade17f6135ac5608b46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1719
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-17 16:07:37 +00:00
Ryan Leavengood
472d26a3c0 Media Kit: Delete the PortPool in a more deliberate way
Letting it get deleted statically can cause segfaults since it is needed for
some final quit messages.

This mimic changes Axel made for the DormantNodeManager and
TimeSourceObjectManager.

I also pulled PortPool into its own file and header.

Fixes #15135.

Change-Id: Ie64753e1876d58b52f7cb95536c6be3df2e6d40c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1721
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-16 23:55:07 +00:00
Adrien Destugues
b5be469eee app_server: some missing std::nothrow and error checks.
I had app_server crash on me because of an uncaught allocation
exception. I don't know if this will fix it but it's better to try to
survive even if it may result in some UI glitches.

Change-Id: I09dd2a7e6ff63d52f51389d7418d1a1d1810af00
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1720
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-16 04:25:44 +00:00
Ryan Leavengood
fe08f0b3d0 Media Kit: Clear the BufferCache of buffers for disconnected clients
Without this, the BufferCache keeps a reference to these buffers inside the
media_addon_server until the media_addon_server quits, which is pretty much
never.

Should fix #4954 and #14755, and possibly #13614 and #14047, though I think
they may be something else.

Switched from std::map to our HashMap to get something which works in gcc2 and
gcc8.

Change-Id: I26463899724b9d1520d97fec785e435f536eaf3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1717
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-16 03:56:27 +00:00
Augustin Cavalier
72b37d9ffc kernel: Turn the clone-area-attempt panic into a dprintf. 2019-08-14 20:13:36 -04:00
Augustin Cavalier
2c4232b853 BMediaRoster: Mark publishing areas as cloneable. 2019-08-14 20:06:30 -04:00
Augustin Cavalier
8e84b39646 kernel: Reinstate the USER_ADDRESS check in ioctl (sort of).
Thinking over this carefully, I realized that adding checks to
every ioctl implementation in every driver would be very prohibitive,
because there, one has to check is_called_via_syscall() in addition
to IS_USER_ADDRESS(), and this would have to be done in every case.
So that would take a massive amount of work, and it would be
very easy to miss a case.

Instead, we can take advantage of the fact that all we really care
about is the buffer not existing within the kernel address space.
This should allow using constants in the umappable range between
0x0 and the beginning of the user address space, too.

Change-Id: I2eeb46e806a5aac32e152c72076a042aa847be0d
2019-08-14 19:06:43 -04:00
Augustin Cavalier
925cb64e3c AboutSystem: Move leavengood from past to current maintainers.
Once again, welcome back :)
2019-08-14 18:04:56 -04:00
Augustin Cavalier
84f6e2d39f kernel/x86_64: Always lfence after swapgs.
This works around "yet another" Intel CPU bug. AMD is unaffected.
Linux chose to use an altcodepatch for Intel only; FreeBSD did
a bunch of benchmarks and determined the effect this had (if any)
was so far out in the decimal places that just adding it unconditionally
was the easier and simplest solution.

(FreeBSD commit: https://github.com/freebsd/freebsd/commit/f4038696064b86260)

Fixes #15236.
2019-08-14 17:54:40 -04:00
Augustin Cavalier
8c6b1519a2 kernel/daemon: Sleep as long as possible between runs.
Avoids waking up every 100ms to do nothing.

Change-Id: I48c7be41f6102a76b7e770ea45c665ab991c79f0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1700
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-14 21:28:20 +00:00
Alexander G. M. Smith
31d70c106b package kit: Skip over future package attributes.
Ignore unknown fields (also called attributes) which are from a package
file with a different minor version number.  Previously it would halt
with an error when encountering such a field, even though it can safely
be skipped over (if it was unsafe, we would have incremented the major
version number).

The use case is a future package attribute for pre-uninstall scripts.
If they're not run, that just leaves some debris after uninstalling
(like symbolic link desktop icons).

* Use the B_NOT_SUPPORTED error code when reading unknown package
  attributes.  Don't treat it as an error if the package is a
  different minor version, just skip it.
* Print unknown package attribute index numbers rather than stopping,
  since they may be from future package file formats and can be safely
  skipped otherwise.  Mention the relevant enum so you can find it in
  the source code.  It's a pity that the previous abstraction layer
  isn't present, since it tells us what data type the attribute is
  (string, number, etc), so we could have printed its value too.

First step of two for enhancement #13427

See https://review.haiku-os.org/c/haiku/+/1504 to generate packages
with a different minor version number (second step of the enhancement).

Change-Id: I6db1897824a1713b3d5fab6fdfb990ee5923cd52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-14 02:08:35 +00:00
Ryan Leavengood
7893e1249e boot_loader: Init state to NULL before iterating
Should fix a gcc2 build error, plus is more correct.

It is a crime that C and C++ do not initialize things. Go and Rust fixed that.
2019-08-13 17:22:21 -04:00
Simon South
5f255c64dc DefaultBuildProfiles: Add OpenSSL to minimum profile
This makes pkgman functional in minimum-profile images.

Change-Id: I3578886743fecbf76779ac1b4b76762d8ce1be3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1715
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-13 19:38:23 +00:00
Ryan Leavengood
c1c99c5c00 boot_loader: Only load old package states in the boot menu
Normal boots should not be slowed down by old package states.

Should fix #12498.

Later I will fix the package kit to merge old states so they don't build up
indefinitely.

Change-Id: I6830dd4ed65a3a659c0a68590238be0dcefff451
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1703
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2019-08-13 13:43:57 +00:00
Simon South
6e5ca42d21 build: Make Debugger usable in minimum profiles
Add a missing dependency (libedit) that prevented Debugger from
starting, and include Debugger in the Applications menu in the Taskbar.

Change-Id: I43c69fe969e51a3a59d1f2d9aa65c00b20848b87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1713
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-13 03:28:11 +00:00
Augustin Cavalier
91af5aa6b6 media_server: Fix fetching the team_id from the SOME_APP_QUIT message.
Now the buffers of crashed teams will actually be removed from the
media_server. (Was this code just never tested?!)
2019-08-12 20:26:42 -04:00
Augustin Cavalier
ec2d11c47c rpmalloc: Update to 1.4.0.
This synchronizes us to upstream commit 4da8b88f53b545e0695e5a90ee.

This version is a pretty significant refactor with some important
performance optimizations to cross-thread deallocations, so it
probably will have a noticeable performance gain on Haiku.

On most applications, there appears to be either no change or a
slight (1-3MB) increase in the amount of used memory, likely because
of the changes to the default "map more memory" flag. We can revert
this if it proves to be a problem, but I don't think it will be.
2019-08-12 19:07:42 -04:00
Axel Dörfler
20a31c45b9 netstat: Added family, protocol, and state filter options
* Uses the same option names as net-tools's netstat.

Change-Id: I3363a091dfa1bcf09065f77d3fdc9c9bf27cbcaf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1701
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-08-12 22:09:34 +00:00
Augustin Cavalier
96e64e6e14 Application Kit: Add B_CLONEABLE_AREA permission to cloned server areas.
The Media Kit needs this for overlays.
2019-08-11 15:27:51 -04:00
Augustin Cavalier
c8e11499cc XHCI: Force an event ring poll if a first timeout occurs on commands.
FreeBSD does something similar here. May help with some of the
stranger event ring lockups.
2019-08-10 23:45:15 -04:00
Augustin Cavalier
8bfe3d25f4 XHCI: Rename ERST_EHB to ERDP_BUSY for clarity's sake.
No functional change intended.
2019-08-10 23:02:20 -04:00
Augustin Cavalier
a614ac8101 XHCI: Remove unused and unnecessary data structure definitions. 2019-08-10 22:48:01 -04:00
Augustin Cavalier
da73ed96dd kernel/vm: Enable area-cloning protection for userland areas, too.
We allow teams to clone areas within themselves, but I'm not sure
exactly what use that has. The kernel can of course clone anything
it wants to, still.

Hopefully this will prove substantially less disruptive than the
reverse change last year, as the preceding commits are likely the
only major consumers of this API, rather than a variety of drivers
that need to be individually tested.
2019-08-10 19:49:24 -04:00
Augustin Cavalier
126d639908 libroot: Set B_CLONEABLE_AREA under BeOS ABI.
As you can see, we already did the same for B_EXECUTE_AREA.
2019-08-10 19:47:56 -04:00
Augustin Cavalier
329866d1d0 kernel/vm: Set CLONEABLE_AREA before cloning areas for transfer. 2019-08-10 19:45:57 -04:00
Augustin Cavalier
40b0fbbb5d runtime_loader: Set B_CLONEABLE_AREA on the debug area.
The debug_server uses it for symbol lookup.
2019-08-10 17:55:47 -04:00
Augustin Cavalier
964cab4615 media: Set B_CLONEABLE_AREA where applicable.
Cloning cloned buffers seems especially strange, but
apparently it is actually done. The buffer management
code really needs to be cleaned up...
2019-08-10 17:55:27 -04:00
Augustin Cavalier
23121bac3b app_server: Set B_CLONEABLE_AREA where applicable.
This is all that is needed to boot a minimum image with userland
area cloning protections enabled (media_server is not included
in such builds.)
2019-08-10 16:13:28 -04:00
Augustin Cavalier
8a0c9d52c6 OS: Rename B_USER_CLONEABLE_AREA to B_CLONEABLE_AREA.
It now lives in OS.h. The idea is that this will now be
accessible to userland applications, so userland memory
is protected from access by other processes, just as
kernel memory is.

No functional change (the constants are still the same,
though I've changed some to use shifts to make clear
which bits are allocated are which are unused.)
2019-08-10 15:51:41 -04:00
Augustin Cavalier
e4d335404f package_infos: Set system_package flag for x86_64. 2019-08-10 14:36:25 -04:00
Augustin Cavalier
3198a0af7f package_infos: "haiku" no longer provides compress/tput. 2019-08-10 14:36:13 -04:00
PulkoMandy
d5cd4a9d51 openfirmware: adjust for 64bit
Sparcv9 runs Openboot in 64 bit mode, which means the cell size is
64bit. Use intptr_t where appropriate to make the open firmware calls
work.

Beware, some values are still 32bit, this matters for example for
of_getprop, if you get 32bits into a 64bit variables it will be in the
MSB of it (big endian only weakness...) and confuse things. See for
example in console.cpp, where the input and output handles are retrieved
as 32bit values. It seems wise to check the expected size when using
of_getprop in these cases, instead of just checking for errors.

Change-Id: Ie72ebc4afe7c6d7602a47478f0bfb6b8247004b8
Reviewed-on: https://review.haiku-os.org/c/1369
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-10 17:59:04 +00:00
Adrien Destugues
bb6e4f5d94 Boot menu: clarify variable usage
The video mode hook gets passed a menu and an item, but is actually
interested in the submenu pointed by the item and the items inside that.

Don't reuse the passed parameters and instead declare new local
variables.

Change-Id: Id17adde552fac2c248afa78380ff299fb21bc968
Reviewed-on: https://review.haiku-os.org/c/1693
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-10 17:58:09 +00:00
Adrien Destugues
95901dc145 Bluetooth replicant: fix memory leak.
Change-Id: I4587fc9c0d981bafd38e0f517f6ef60a8cae7fec
Reviewed-on: https://review.haiku-os.org/c/1696
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-08-10 17:57:28 +00:00
CodeforEvolution
6a739773fc CodyCam: Style Fixes, Make Resource File Verbose
No functional change intended, added some copyrights
in the process.

Change-Id: Ic6ebe276bb939c425d65aff1b3b07c7c2e27a33a
Reviewed-on: https://review.haiku-os.org/c/1698
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-10 17:57:03 +00:00
Ryan Leavengood
f5953f6155 Package Kit: Purposely ignore an error getting package cache
Fixes #15230.

The comment pretty much explains it. I think needing this means this code could
be redesigned, but I don't know enough yet to make that fix.

It also feels like this whole job system and Command pattern is overly
complicated when good old functions would be fine, certainly for pkgman. But
maybe this is used more heavily in HaikuDepot.
2019-08-09 23:13:52 -04:00
Augustin Cavalier
6a23120503 kernel/fs: Fix another instance of free() being called on a FD.
Fixes the second panic in #15213.
2019-08-08 23:34:40 -04:00
Ryan Leavengood
b711002d34 HaikuDepot: Set package state when loading single package
Without this, even installed packages still get an "Install" button.

Fixes #14821.

This was implemented by adding BPackageRoster::IsPackageActive. I decided to
have this take a location since GetActivePackages also did, but as noted in my
TODO comment, I think this is awkward.

It would also be nice to show the user they have a different version of a
particular package, but that would require some changes to IsPackageActive.

Change-Id: Iab0d35eb6b671a17711b0214b15164d296927e5a
Reviewed-on: https://review.haiku-os.org/c/1694
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-08 07:09:35 +00:00
Augustin Cavalier
925c3a133b kernel/thread: Check the proper field to determine if the thread is blocked.
Fixes #15234.
2019-08-07 23:52:03 -04:00
Alexander von Gluck IV
b18e88a384 preferences/network: Add modem icon for dial-up 2019-08-07 09:44:03 -05:00
Alexander von Gluck IV
e27cfa1b9f preferences/network: Ungroup VPN and Dialup
* After a bunch of trials, the groupings for VPN and Dial-up
  connections look too busy.  By putting the "connections"
  at the same level as the interfaces things get a bit clearer
  and a little more modern.
* Lots of work to do still for "adding / removing" connections.
2019-08-07 08:18:17 -05:00
Alexander von Gluck IV
7424792a9f preferences/network: Fix status labels for stateful connections 2019-08-07 08:13:59 -05:00
Alexander von Gluck IV
f932d9902f preferences/network: Add dedicated VPN icon 2019-08-06 19:32:18 -05:00
Alexander von Gluck IV
68378c326e network_settings/vpn: Make add-on more generic. 2019-08-06 18:07:10 -05:00
Adrien Destugues
87bdc2b02b fix dumping semaphores by name
There was no check for strtoul success or failure (it returns 0 on
failure but that is also a valid conversion result). Detect if endptr
has been advanced instead (meaning there were some parsed characters in
strtoul so the argument at least starts with a number)

Change-Id: Ieefbd57a250ddcdb9362094389151c2a432e4c73
Reviewed-on: https://review.haiku-os.org/c/1683
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-08-06 19:20:39 +00:00
Adrien Destugues
58d16d9fe2 rt2860: fix off-by-two access
To be upstreamed to FreeBSD?

Change-Id: Ia4389f4964429f80025003f97792b1ecd1097193
Reviewed-on: https://review.haiku-os.org/c/1681
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-08-06 19:20:39 +00:00
Adrien Destugues
639bb82701 AboutSystem: remove NetBSD credits
We don't ship ftp anymore, and our tput comes from ncurses now.

Change-Id: I80e99b72f5bb16147a234d6d72a277a5035b6e00
Reviewed-on: https://review.haiku-os.org/c/1680
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-08-06 19:20:39 +00:00