Commit Graph

45292 Commits

Author SHA1 Message Date
Pawel Dziepak b3e4c67739 vm: implement B_RANDOMIZED_ANY_ADDRESS address specification
Randomized equivalent of B_ANY_ADDRESS. When a free space is found (as in
B_ANY_ADDRESS) the base adress is then randomized using _RandomizeAddress
pretty much like it is done in B_RANDOMIZED_BASE_ADDRESS.
2013-04-04 15:16:21 +02:00
Pawel Dziepak f9bab525f6 vm: implement B_RANDOMIZED_BASE_ADDRESS address specification
B_RAND_BASE_ADDRESS is basically B_BASE_ADDRESS with non-deterministic created
area's base address.

Initial start address is randomized and then the algorithm looks for a large
enough free space in the interval [randomized start, end]. If it fails then
the search is repeated in the interval [original start, randomized start]. In
case it also fails the algorithm falls back to B_ANY_ADDRESS
(B_RANDOMIZED_ANY_ADDRESS when it is implemented) just like B_BASE_ADDRESS does.

Randomization range is limited by kMaxRandomize and kMaxInitialRandomize.
2013-04-04 15:16:21 +02:00
Pawel Dziepak 3b4269ecf5 arch: randomize initial user stack pointer
Inside the page randomization of initial user stack pointer is not only a part
of ASLR implementation but also a performance improvement that helps
eliminating aligned 64 kB data access.

Minimal user stack size is increased to 8 kB in order to ensure that regardless
of initial stack pointer value there is still enough space on stack.
2013-04-04 15:16:20 +02:00
Ingo Weinhold a37c845e52 FS interface API doc: More details for unmount() 2013-04-04 12:00:08 +02:00
Axel Dörfler 4f96ace6d5 app_server: detach client allocator on quit.
* This prevents sending out notification to applications that are already
  gone, and should thus fix #9116 according to John.
2013-04-02 23:38:43 +02:00
Michael Lotz a9abcc37cd Rework initial auto joining and add big TODOs.
* If we have a configured network, then we always try to connect to it
  as soon as the interface has been brought up.
* If we don't have a configured network and are auto configuring, we
  use the AutoconfigLooper to also do initial auto joins.
* Before issuing auto joins we need to wait for scan results to come
  in, so we watch for corresponding messages.

For now auto joining is a one shot attempt as the infrastructure to
properly tell reasons for scans apart is not yet there.
2013-04-02 04:59:44 +02:00
Michael Lotz e484cc5098 Store the active flag if there is an initial link.
This ensures that we don't spuriously re-detect a link if we have a
race between starting to watch for link state changes and detecting the
initial link.
2013-04-02 03:16:06 +02:00
Michael Lotz 274b8be6c4 Don't try to auto-configure network interfaces with no link.
We already start watching for link state changes, so as soon as a link
is established the configuration will be triggered.
2013-04-02 02:57:14 +02:00
Michael Lotz 1b3dd41a35 Never join a network if not explicitly configured.
The scanning still occurs so that the network list is populated. But if
no SSID has been explicitly configured, we now always set the
IEEE80211_SCAN_NOJOIN flag that prevents automatically joining open
networks at the end of the scan.
2013-04-02 02:33:21 +02:00
Michael Lotz 6e77a76ef9 Use the SSID supplied in the MLME request not the desired SSID.
The wpa_supplicant (rightfully) supplies the SSID with this request.
However, with the code that is in place it gets ignored and the desired
SSID, as set by IEEE80211_IOC_SSID is used instead. This still works if
the wpa_supplicant is the only client in use and IEEE80211_IOC_SSID
is never used, as then the mlme.im_macaddr is used as the only
identifying element. If we used IEEE80211_IOC_SSID before though, for
example because we joined an open network from the net_server directly,
there will always be a mismatch between the desired SSID and the one
the wpa_supplicant tries to associate with using this MLME request.
No association is then possible. As there is no obvious reason why the
request supplied SSID shouldn't be used, we simply do so.
2013-04-02 01:18:09 +02:00
Michael Lotz 50944289c6 Use the wpa_supplicant to join open networks if it is running.
We need to make sure that the wpa_supplicant knows about our intention
even when joining an open network, as it otherwise might interfere.
Since leaving a network is not synchronous and the wpa_supplicant is
already running in that case anyway, this seems easier and more
reliable.

If the wpa_supplicant is not already running we still join ourselves.
2013-04-02 01:18:07 +02:00
Michael Lotz 0ef15eb6b9 Rename _ConfigureInterfaces() to *FromSettings().
This makes it more obvious what the function does.
2013-04-02 01:18:04 +02:00
Michael Lotz 2ac5770dc7 Don't automatically join a network if we already have a link.
The _ConfigureInterface() method is used as a backend for all
configuration tasks. That includes setting addresses manually or by
DHCP and changing flags, mtu or metric. Therefore we can't join
networks every time it is invoked. Instead we check for an existing
link first and only try to join if there is none yet.
2013-04-02 01:18:01 +02:00
Michael Lotz 8163a8e0ef Use a BMessenger to check for wpa_supplicant availabiltiy.
* Only launch it on join requests if it isn't yet valid anyway.
* Don't do any work on leave requests if it isn't running at all.
2013-04-02 01:17:58 +02:00
Michael Lotz 4e66f871e5 Launch the keystore_server on demand from BKeyStore.
This allows leaving the keystore_server closed as long as it isn't
used and still avoids having to launch it manually.
2013-04-02 01:15:29 +02:00
Michael Lotz 6de478363e Add BMessenger::SetTo() to reinitialize a BMessenger.
This allows to reuse BMessenger objects for different targets, or to
recheck validity after initial creation. With that one can use the same
BMessenger after launching an application that was previously not found
valid for example.
2013-03-31 20:16:04 +02:00
Michael Lotz 32057ce922 If a keyring is empty, store a no data flag instead of failing.
Any fully empty keyring (no keys and no applications) would fail to add
the empty flat buffer and thus prevent the whole keystore database from
being stored. This could easily happen when you used separate keyrings
but the master keyring was left unused for example.

Adding a flag that tells that there is no data allows us to distinguish
between a case where the stored data is missing due to a problem versus
an actually empty buffer.
2013-03-31 18:30:39 +02:00
Michael Lotz fa21184f24 Implement leaving networks on the net_server side.
We always try to reach the wpa_supplicant first. If it isn't running
we check if this might have been a network we've connected directly
and then just disassociate using an MLME disassociation request.
2013-03-31 03:22:21 +02:00
Michael Lotz 93c2c2aa6b Update wpa_supplicant to version 2.0 and bring in improvements.
* Updated to version 2.0 of vendor code.
* Reliability improvements in controlling the underlying devices.
* Implement leaving networks.
* Better timeout handling.
* Usability enhancements like cancel on escape, ok button being the
  default and the password field having focus on start.
* Storing of the password using BKeyStore.
2013-03-31 03:01:08 +02:00
Michael Lotz f848907875 Implement storing persistent network configurations.
The API to add persistent networks was added back in r42807 and
r42816 but storing them was still missing.
2013-03-31 00:43:32 +01:00
Michael Lotz a3a541eebd Make a copy of the network config message and store that one.
Using the original message and storing that into the settings resulted
in a not yet fully understood deadlock. Presumably related to missing
and/or stray replies.
2013-03-30 20:17:39 +01:00
Niels Sascha Reedijk 4e4c94e314 Update translations from Pootle 2013-03-30 06:26:39 +01:00
Rene Gollent 88e692e89f Ignore calls whose purpose is to calculate the GOT address.
- Fixes several false positives where we'd show a return value for the
  current function.
2013-03-29 22:33:51 -04:00
John Scipione d5c2d47e5d Update NetworkSetup preflet and Interfaces add-on.
Many updates including:
* Add translation strings
* MAC address in Interface Settings Window
* Lots of layout kit improvements, works font sizes 8pt to 18pt.
* Add right-click context menu to interfaces list view.
* Make the Interfaces list view size a bit bigger.
* Wired/Wireless settings use BStringViews instead of BTextViews
  since they aren't editable.
* First interface is selected by default
2013-03-29 21:38:45 -04:00
Rene Gollent 2c6fab1de6 Handle return value CPU states.
- DwarfStackFrameDebugInfo::CreateReturnValue() now takes a cpu state
  parameter. This is attached to the associated Variable object.

- ResolveValueNodeJob() now checks if the value node child it's dealing
  with is that of a variable. If so it pulls that CpuState for the
  ValueLoader's purposes rather than the current state. This gets return
  values for multiple function calls in the same statement working.
2013-03-29 21:11:22 -04:00
Rene Gollent 47ffc32bc0 Minor refactoring.
- Factor out a _HasExitedFrame() function.
- Reorder how/where return values are added a bit.
2013-03-29 21:11:21 -04:00
Rene Gollent c07e2b1fe4 Add optional cpu state to Variable.
- Used to preserve the CPU state for variables representing return
  values, since they may potentially be retrieved from registers,
  and these might be overwritten later in the same statement.
2013-03-29 21:11:20 -04:00
Michael Lotz 4e186e6a31 Add IEEE80211_IOC_HAIKU_COMPAT_WLAN_{UP|DOWN} compat requests.
They can be supplied as request type codes to SIOCS80211 are added to
allow overcoming a difference between how Haiku and FreeBSD handle
network drivers.

In FreeBSD a device can be set into the down state but is still fully
configurable using the ioctl interface. The Haiku network stack on the
other hand opens and closes the driver on the transition form up to
down and vice versa. This difference can become problematic with ported
software that depends on the original behaviour.

Therefore IEEE80211_IOC_HAIKU_COMPAT_WLAN_{UP|DOWN} provide a way to
achieve the behaviour of setting and clearing IFF_UP without opening
or closing the driver itself.

The wpa_supplicant will use this in its BSD driver instead of actually
setting the interface down and then failing all other ioctls.
2013-03-29 23:58:48 +01:00
Michael Lotz 18004d3ac0 Avoid trying to set the media to Ethernet for WLAN devices.
It didn't really harm, but would always try to find a corresponding
media, fail and print an error.
2013-03-29 23:58:47 +01:00
Siarzhuk Zharski 15aa771390 Keep color control enabled after color scheme change
Fixes #9532
2013-03-29 16:26:32 +01:00
Siarzhuk Zharski 19bfeaa786 Support %e (cur.encoding) for Terminal titles
Optional parameter %e to indicate current tab view encoding in the
window title. It is not shown in case tab view encoding is default
UTF-8. Inspired by Sergei Reznikov. Thanks.
2013-03-29 16:26:00 +01:00
Siarzhuk Zharski e0fcd62916 Code style fixes. No functional changes.
Fix for some code style issues pointed out by Axel. Thanks.
2013-03-29 14:10:46 +01:00
John Scipione e13f5676a0 Cache app icons in BarInfo to make them load faster.
This turns an IO bound problem into a CPU bound problem. In my testing this
speeds up icon resizing dramatically although the CPU is quickly pegged at
100% trying to redraw the Deskbar if you whip the icon size slider back and
forth with a dozen or so apps open and soon the CPU can't keep up and Deskbar
lags behind.
2013-03-28 20:56:06 -04:00
Rene Gollent c844f6e030 Style fixes. 2013-03-28 20:54:33 -04:00
Rene Gollent 8557931349 Add sanity check.
- The info list can in fact be NULL so we need to guard against that. This
  wouldn't currently get hit though, since the cases where the list isn't
  passed in are those where we only want a minimal frame anyways, so
  variable/return value creation wouldn't even be attempted.
2013-03-27 23:38:27 -04:00
Rene Gollent 4bc52e9f78 Remove no longer needed member. 2013-03-27 23:34:44 -04:00
Rene Gollent 76ed6d72a5 Refactoring to handle multiple return values.
- Replace use of address + CpuState pair in Thread,
  SpecificImageDebugInfo::CreateStackTrace() with a ReturnValueInfoList.
  Adjust all implementing subclasses and callers accordingly.

- DwarfImageDebugInfo::CreateReturnValue() -> CreateReturnValues().
  Now processes a list of return value information structures rather
  than just a single one. This means we can now handle multiple return
  values in a single statement. This still isn't entirely correct though,
  since, e.g. for functions whose return types fit in a register we need
  to either retrieve them immediately after function return, or store the
  CPU state at that point in time for later use in value retrieval,
  otherwise the return values will all be those of the last called function.
2013-03-27 23:27:49 -04:00
Rene Gollent 3fa429781c Add ReturnValueInfo class for storing function return information. 2013-03-27 23:27:48 -04:00
Matt Madia 5a6b854033 Add Cc: text field to mails shown when it's not empty.
Patch by Sean Healy 'jalopeura'. Fixes #2446.
2013-03-27 18:32:33 -04:00
Murai Takashi 2c74d7a458 Printserver: Add JIS B5 paper size
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2013-03-27 18:12:42 -04:00
Dancsó Róbert 043f96686e Fix translation for "Scroll bar:" on Look and Feel panel.
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2013-03-27 18:04:35 -04:00
Murai Takashi 37cdde518c Fix signature duplication of printer drivers
Signed-off-by: Matt Madia <mattmadia@gmail.com>
2013-03-27 17:51:56 -04:00
Matt Madia 7e1e5bb6ca Whitespace cleanup. No functional change. 2013-03-27 17:47:27 -04:00
Matt Madia cf2f912782 Implement rule AddDirectoryToHaikuImage in installoptionalpackage.
Fixes #9584.
2013-03-27 17:45:03 -04:00
Rene Gollent 2b41b37891 Build fix. 2013-03-26 23:30:35 -04:00
Rene Gollent 1efa0a42f6 Fix return value handling.
- In the case of position independent code, the initial call isn't to
  the function we want, but rather to a PLT slot which resolves the
  function's location. As such, find that slot and use it to determine
  the corresponding GOT offset for the function's real location.

Still need some further refactoring of return value handling to properly
handle the case of stepping over a single line that makes multiple calls,
but this fixes the basic case at least.
2013-03-26 18:50:45 -04:00
Rene Gollent 029fcc4ad6 Add CPU state at time of function call to Thread.
- When we detect that we're stepping over a function call, also store
  the CPU state at the time it occurred. This information is needed
  in order to correctly reconstruct target addresses later since some
  operands may be register-based.

- Add the aforementioned CPU state to CreateFrame()'s arguments and
  adjust implementations and callers accordingly.
2013-03-26 18:50:44 -04:00
Rene Gollent 04c919f9d6 Fix incorrect target address calculation for memory operands. 2013-03-26 18:50:44 -04:00
Pawel Dziepak 469f13fdfe nfs4: support hard links properly
The main purpose of this patch is to prevent VFS from removing a vnode to early
what might have happened if the NFS client knew it had more than one name but
then one of them was deleted. Moreover, all discovered and still valid names
are stored what may be useful in proper file handle recovery when they are
volatile.

This patch fixes both #9558 and #9561.
2013-03-26 20:51:37 +01:00
Pawel Dziepak efc29cc57a nfs4: update vnode objects and cached data when rename overrides a file
* this patch also fixes unnecessary cache invalidation when a file is renamed
   without changing its parent directory
2013-03-26 02:45:48 +01:00