* File locks created by flock should only apply for the file descriptor
that was used to lock the file. Another fd on the same file should then
be denied access (calling flock should fail).
* fcntl based locks, however, are in a separate namespace and are global
to a team.
* This issue was found when running webkitpy test suite, and should close
ticket #13795.
* Don't use session or team as comparison in release_advisory_lock(), as
that information might not be available anymore (e.g. when called from
Team::~Team()). This fixes#14121.
Change-Id: I9efb96cfcefe7e72b0060220c635a665e7e643cc
Co-authored-by: Axel Dörfler <axeld@pinc-software.de>
Replace strncpy() with strlcpy() since destination size equals
maximum number of characters to copy.
Change-Id: I7d540c60c9915324c2271abaee8b7134bf0c3814
* GCC6+ will warn when you truncate potentally "too much data"
Volume name 255. fName is 32.
* We don't think we care enough to enlarge fName?
Change-Id: I6f453ee62c856481605594b2ae5ff9ab41244bd1
* This gives us a solid automatic entry point to u-boot
* A uEnv.txt specifies the fdt file name
* This should work on any modern u-boot for most architectures
* Non-mmc targets will likely need some work
Change-Id: I9a00316a213a15e85d3f2e18574d64920d9bdb76
* x86_64_signal_handler_compat is a dump of x86 x86_signal_frame_function().
* the x86 compiler should be used to produce this code, which ends up in the
commpage.
Change-Id: I03da02c376f67ff83dbaba9bcb144da726463996
* x86 uses a commpage with 32-bit addresses, incompatible with the one used for
x86_64. For this reason, a compatibility commpage is needed to support a 32-bit
userland on x86_64.
* define ADDRESS_TYPE as a macro for addr_t (default) or uint32 (for the 32-bit
commpage).
* team_create_thread_start_internal() will use clone_commpage_area() with
KERNEL_USER_DATA_BASE or clone_commpage_compat_area() with
KERNEL_USER32_DATA_BASE, to setup the correct commpage.
* real_time_clock (in compatibility mode) also updates the compatibility
commpage with real time data.
Change-Id: I61605077ce0beabab4439ef54edd1eae26f26fd2
Handled as a 1-button mouse. We didn't really support this since the old
Macintosh ADB mouses, so let's see if that code aged well!
Change-Id: Ibed2423023e821ae4ce608f0ddbc5ac32bfbd8f7
On some Thinkpads, the extra buttons are used for the trackpoint, so
they should be reported as "main" buttons, not extended ones. An
(undocumented) information query was added to the firmware to report
when this is the case, however it is not advertised as supported by the
firmware itself by the usual mechanism.
What we do is (just as the Linux driver) detect that the tocuhpad has a
PS/2 passthrough (likely used to daisy-chain a trackpoint on the same
PS/2 port) and also advertises extra buttons (an unlikely case, it is
already uncommon to even get a middle button these days...) and assume
that the information query is available then.
When the query is available and reports the quirk, the extended buttons
are reported as 0, 1, 2 (left, right, middle), instead of extra buttons
the userland would have no idea what to do with.
Change-Id: Iad5a9e140b6e49c298dcc901f4e331a4a847d7b2
* define ELF32_COMPAT to enable ELF32 macros.
* add a flag ELF_LOAD_USER_IMAGE_TEST_EXECUTABLE to only check the format.
It will be used by load_image_internal() to check which mode to use when
loading an image.
* in arch_elf_relocate_rel(), switch to elf_addr instead of addr_t, which
would be the wrong size for elf32 on x86_64.
* the ELF compat loader reuses the relevant parts of elf.cpp and arch_elf.cpp,
excluding for instance load_kernel_add_on() or dump functions.
Change-Id: Ifa47334e5adefd45405a823a3accbd12eee5b116
* only for Intel sysenter/sysexit.
* the entry function processes stack arguments as follows:
we look up the syscall in the table, find the number of arguments.
reserve place on the stack for the arguments.
copy arguments on the stack
pop register arguments
call the syscall function
place the return value in ax and dx registers.
* TODO: we need to store the arguments somewhere for the post-syscall tracing.
* the thread exit stub is 32-bit, for the time being use hexadecimal instructions.
Change-Id: Ie5c502eb596d4fa7613d238de80643566bc19ed8
* also adjust BOOT_GDT_SEGMENT_COUNT for x86, the definition is used by the
boot loader.
* add some 32-bit definitions.
* add a UserTLSDescriptor class, this will be used by 32-bit threads.
Change-Id: I5b1d978969a1ce97091a16c9ec2ad7c0ca831656
It is possible to get up to 8 extra buttons on synaptics touchpads.
On some Thinkpad models, these are used to implement the trackpoint
buttons (reported as buttons 4, 5 and 6). Since the touchpad itself has
no buttons (it is a clickpad), we may at least try to handle these
properly.
Change-Id: I5d4021e36fb3ac86ecf213c5666f9b6ddd3e2bca
the x86_64 compat syscall entry needs size and offset of parameters to
handle them correctly to the syscall function. struct extended_syscall_info
and struct syscall_parameter_info provide parameter count, size and offsets.
Change-Id: I7e5c7b6e19e757b28b43c3b3419b7071fae321f8
* This makes mounting volumes more stable; ie. you can put your
drive in another slot, or boot your native system in emulation, and
it will still find the drives to mount.
* The old method is still left there in order to achieve a smooth
transition.
The Flatten and Unflatten method should check the size according to the
matching FlattenedSize method, not a possibly overriden version.
May also fix#14128 since we avoid use of the vtable by doing this.
the size of BAffineTransform is architecture dependent, so we transmit
its contents in a standard array instead.
Change-Id: I907110742168846a869a48bb2d116cc5292ec7d0
use x86 as default sSearchPathSubDir in compatibility mode.
use the generic memset/memcpy when x86_64 is the primary arch.
Change-Id: Ib464c308ff97f7ae2482ef4c037de1b1bb2bf61b
the standard x86 implementation uses the commpage, which is difficult to setup. we could
also use the C++11 version instead.
Change-Id: I4be7e3466082ff2c91bc32bef377a664ce65f3fc
my.justenergy.com allows only RSA, so we can't connect there without
this. Other websites may have a similar problem.
Also improve the handling of the error, as it was giving a generic
"general system error" to the user.
Fixes#13975.
* A Node/Partition cannot be member of two lists at once. This
resolves an issue where a partition cannot be found later
due to corruption of a NodeList.
* how-to for qemu: command line option: -balloon virtio
* in the monitor view
- to switch the vm size to 500MB: balloon 500
- to display balloon info: info balloon
We were #defining DEBUG here, which leads to some system-wide debugging
macros being always enabled as well (PRINT_OBJECT and the like). This
should be managed only using SetConfigVar in UserBuildConfig.
Remove the unused UNIMPLEMENTED and BROKEN macros because everything is
implemented, and nothing is currently known to be broken :)
This was done using macros before, which isn't the way we have things set up.
In theory that method should work, however if not all consumers include the
libroot_build headers properly, then it breaks in subtle but confusing ways,
which is not what we want at all.
Thanks to Jessica for advice.
Change-Id: Idd45df5547daecf8239932957088da03ddfccf87
* use so many buffers as the queue can contain.
* queue receive requests as soon as possible.
* don't wait for transmit completion.
* interface can now be brought down and up.
* add locking around access to lists and virtio queues.
* iperf results: guest->host 400MBits/sec.
Change-Id: I6423e4afcb59f280d702893cc8d22a9ef908113a
* free interrupts, free queues, return to init state.
* this will be used by virtio_net on interface uninit.
Change-Id: I7c1e6facc37cf6bfe19628576fdf2c0bac9e5c38
* enable to iterate on available entries in one interrupt call.
* negociate -> negotiate, (void *) -> (void* ), thanks axel and philippe!
Change-Id: Ie2d290797abcbf4c0f3cb5bfff71d091bb800fa6
* The kernel's advisory locking implemenation must not be used if the
file system has its own (ie. network file systems).
* Added ASSERT to free_vnode() that assures there is no locking left;
I recently had a lot of them around.
Removed workaround for already fixed bug 4217 and removed the call
to SetExplicitPreferredSize(), since the layout system was always able
to calculate good values for PreferredSize.
So for me the call seems to be superfluous.
Fixes#13353
1: Changed CPPUNIT_ASSERT -> CPPUNIT_ASSERT_EQUAL
2: Fixed coding style: Added two lines after including libraries, maintained 80 characters(MAX) in each line and space at comment start
3: Fixed the failure for "BString::Search" test "i != 0 by chaning the testing method(StartsWith->IStartsWith) and changed the string to be searched(sT->st)
Change-Id: I1237d1f2d0e3af7757963cc940bae929f487f088
Since wait_for_objects can wait on sems, threads and ports in addition
to FDs, limiting to RLIMIT_NOFILES as in the select/poll case does not
work. Since space is allocated for the wait objects in kernel memory,
limiting their number to a valid range is still desireable.
The limit is now placed at the sum of max sem, thread and port count
plus RLIMIT_NOFILES.
This also fixes a signed vs. unsigned comparison warning in
check_max_fds introduced in hrev51866.
The debug build of the packagefs kernel addon failed because user_memcpy had no type.
Using the correct headers for user_memcpy and IS_USER_ADDRESS fixed the issue.
because it needs extra space for storing data, and flexible array member o
doesn't do this.
I thought it was...
Change-Id: If64c06827809a4e021581c6adf8e0f198cf47450
It was limited to a uint32 and could for example be overflown by the
slab MemoryManager that uses size_t on a 64 bit system.
This aligns the signature with create_area() that already uses size_t
for the size argument.
Note that the function is currently private, so the impact should be
limited.
A new install should start with an empty syslog. Adding
the syslog path to the set of ignored paths will prevent
an existing syslog file from being copied into the new
install.
Fixes#8373
Change-Id: I79ecf95773a34360185d38ee4ef0c8337b062e7a
Inode::_FindPath() always deletes the inode it uses regardless
the source, including when it's from the HashtableInodeSource.
But the later returned the inode object directly from the hashtable
when it's inside, so it gets deleted bu _FindPath… then reused later on
when searching the hashtable again.
I'm not sure it's the correct solution but at least malloc_debug doesn't
complain anymore.
There is a problem primarily manifesting itself in
the x86_64 build where the packages' names from the
solver are not correlating with the names of the
as-configured depots. There was also a problem
with a local variable being the same name as a function
parameter. This does not fix the underlying problem,
but avoids further anomalies in the HaikuDepot UI.
Possibly related trac #11317, #11674, #13940.
Change-Id: Ic140f114bbe38e59c78760213843bf492ff7a270
DwarfImageDebugInfo:
- In some, but not all cases, gcc5 generates type information where the DIEType
is a child of a namespace rather than of its containing compilation unit.
This needs to be taken into account when building our name lookup table, as
we'll otherwise not find the full definition of such types when attempting to
locate them for corresponding variables. Fixes an issue reported by Axel.
* Show old page table location and provide more feedback
* 16 int32 * 0x10000000 > sizeof(int32), fix to uint32
Change-Id: Ib68c34f5d3c6bfa1da53241e6586c07e4e494750
* calling TRoster::GetShutdownApps() multiple times with the same lists
leads to problems because the lists aren't emptied first.
* instead we watch the user app launches, add them in the fUserApps list,
and let _QuitApps() iterates through the fUserApps list until it is empty.
John's revert of my removal commit dragged back a bunch of cygwin/sunos
cruft, as well as re-adding RegExp.cpp to the host libshared, that we don't
need.
Instead, remove this and add libgnuregex_build to just the tools/keymap
link alongside the FreeBSD gnuregex case.
User can now launch applications in USER_APP_TERMINATION_PHASE
(like when there is a dialog to save an open document). Fixes
Change-Id: I3126e6ab8d2fd76016becb6ce0f726f82ecb7f3b
When the application is starting, it will load in bulk data. As it
does so, it may issue some change notifications to listeners. For
each small change in packages' data, there is a notification. The
system was built to accommodate coalesced changes. This commit will
coalesce those changes during the bulk load for cases where there
are listeners present.
Change-Id: I1cc6668f61917c0068d5559b2bf338ea75d453da
As discussed at #13860.
* Moved "Show only featured packages" from the "Show" menu to a
checkbox in the filter view.
* Moved "Repositories" popup menu into the menu bar.
* Removed the "Featured packages" title.
* Entering a search term doesn't override the "Only featured"
filter anymore (used to disable the "Only featured" filter).
* At this point we want to avoid the user calling the callbacks
in the form of BMediaConnection. Instead we force to use the
BMediaInput and BMediaOutput versions.
The server side has the ability to reject client
requests where the client is no longer supported
because it is presumably too old. This change
will inform the user when this happens and will
prevent the client from attempting further server
communications within this execution of the
application.
While installing packages through pkgman, it will inform if specific
package is already installed. Fixes#12447 : [pkgman] inform if a
package is already installed.
Change-Id: I194bc849c42ba52a696a6cb52d87aebaff530f35
Output-only events (B_EVENT_ERROR, B_EVENT_DISCONNECTED and
B_EVENT_INVALID, with B_EVENT_INVALID masked out before passing down
events) are used to indicate error, so they should not be notified if
the vnode does not have select().
Bug: 13965
Output-only events (B_EVENT_ERROR, B_EVENT_DISCONNECTED and
B_EVENT_INVALID, with B_EVENT_INVALID masked out before passing down
events) are used to indicate error, so they should not be notified if
the device does not have Select().
Bug: 13965
Output-only events (B_EVENT_ERROR, B_EVENT_DISCONNECTED and
B_EVENT_INVALID, with B_EVENT_INVALID masked out before passing down
events) are used to indicate error, so they should not be notified if
the filesystem does not explicitly provide an fd_select() override.
Bug: 13965
also check buffer addresses passed through structures. For transfers, first compute
the direction of the transfer, to copy before or after the actual transfer.
TypeHandler:
- Add name field for presentation purposes. Adapt subclasses accordingly.
TypeHandlerRoster:
- Add methods to count and retrieve all type handlers for a given type,
and adjust CreateValueNode to allow for passing in an explicit handler.
Adjust callers accordingly.
VariablesViewState:
- Add helpers to store an explicitly chosen type handler for a node.
TypeHandlerMenuItem:
- ActionMenuItem subclass that takes care of reference management
for its contained type handler.
VariablesView:
- Add context menu for choosing type handlers if applicable. Implement
support for invoking said type handlers in a similar manner to explicit
typecasts.
- Adjust saving/restoring the view state so that hidden nodes are taken
into account as well. This is necessary since it may be the case that
the handler had to be applied to the hidden child rather than the visible
node (i.e. the BMessage handler when applied to a pointer to a BMessage).
All together, these changes allow choosing to switch between views of a type
when the Debugger has multiple handlers for it. For example, for BMessages
this allows switching between displaying the raw underlying structure vs
the decoded message content.
* use MergeObject even if we don't need the merged object: the rule does what
is needed and is standardly used for instance in libroot.so.
* add a grist to source files for the bootstrap glue.
SMAP will generated page faults when the kernel tries to access user pages unless overriden.
If SMAP is enabled, the override instructions are written where needed in memory with
binary "altcodepatches".
Support is enabled by default, might be disabled per safemode setting.
Change-Id: Ife26cd765056aeaf65b2ffa3cadd0dcf4e273a96
This change re-instates the change-log function (TRAC#13827) that was
dropped in earlier changes. Also now-disused API handling logic is
removed. A small code-style fix is made and the version of the
application has been incremented so that this version's logic can later
be detected by the HDS application server.
gcc does re-align the stack in the main() function prologue, however,
we still need to set the right alignment for other cases: thread entry,
.init and .fini code that is executed before main() is called or after
it has returned, and signal handlers which may use a separate stack.
Part of #10509