History log of /haiku/src/add-ons/kernel/file_systems/userlandfs/private/RequestAllocator.cpp
Revision Date Author Comments
# dbc23cdf 30-Jan-2024 Augustin Cavalier <waddlesplash@gmail.com>

userlandfs: Allocate requests in-kernel as kernel-only.

Things still seem to work, and may fix some SMAP
violations.


# 8a0c9d52 10-Aug-2019 Augustin Cavalier <waddlesplash@gmail.com>

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.)


# cf6760f2 30-Nov-2018 Jérôme Duval <jerome.duval@gmail.com>

userlandfs: Read()/Write() with user_memcpy().

Change-Id: I8be72d5fb18228c0ee0394a3f906f7a50113d7ea
Reviewed-on: https://review.haiku-os.org/741
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 041a1f36 17-Nov-2018 Augustin Cavalier <waddlesplash@gmail.com>

userlandfs: Only add kernel flags in RequestAllocator in _KERNEL_MODE.

Otherwise, create_area fails with "Invalid Argument." Should fix the
"empty directory in userlandfs mount" bug that has been appearing
since the cloneable-area fixes.

Change-Id: I26e73539a9f345e76b22a34a68fe4b49c63683c2
Reviewed-on: https://review.haiku-os.org/707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# fdb25884 25-Sep-2018 Augustin Cavalier <waddlesplash@gmail.com>

userlandfs: Make the "request data" area user-cloneable.

Fixes #14497. Thanks to leorize for helping debug!


# eebdc855 18-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

userlandfs: Fix 64 bit debug build.


# 96944cbb 07-Apr-2012 Pawel Dziepak <pdziepak@quarnos.org>

Fix #4125: NULL device is translated to '//'

The problem appeared to be on the request creating side (i.e. in the
kernel add-on) which did not support NULL pointers properly.

Relocation of addresses in request when it is received translates
offset = 0, size = 0 to pointer NULL so that no change in that part
of code was required.

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>


# b19ee1e1 16-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Port:
- Send() now also gets the message to send as parameter.
- Added methods to reserve and unreserve space in the buffer.
* RequestAllocator: Uses the port buffer reservation methods now. This allows
to let more than one RequestAllocator use a Port in a stack-like manner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29565 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60f4376e 16-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the unused Port::SendAndReceive().
* Change Port::Receive() semantics. It does no longer use the buffer associated
with the object. Instead it allocates heap memory for the caller. Since
there's only one caller who clones the message anyway, we save one copy this
way (though we have an additional syscall in userland) and don't overwrite
a request being prepared for sending.
* Changed RequestAllocator::ReadRequest() to also read the request from the
port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29563 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6aeea78c6 04-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Made the UserlandFS code gcc4 friendly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83812f67 23-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Copied userlandfs code from the test tree to the haiku source tree,
where it will be ported to Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20216 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eebdc855b82519c7fec6f58255784ace21267b2a 18-Apr-2015 Michael Lotz <mmlr@mlotz.ch>

userlandfs: Fix 64 bit debug build.


# 96944cbb3c2efbfa54c3c279c64758389ded0fdc 07-Apr-2012 Pawel Dziepak <pdziepak@quarnos.org>

Fix #4125: NULL device is translated to '//'

The problem appeared to be on the request creating side (i.e. in the
kernel add-on) which did not support NULL pointers properly.

Relocation of addresses in request when it is received translates
offset = 0, size = 0 to pointer NULL so that no change in that part
of code was required.

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>


# b19ee1e164ffad53dff3600cdac7e9781c636581 16-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Port:
- Send() now also gets the message to send as parameter.
- Added methods to reserve and unreserve space in the buffer.
* RequestAllocator: Uses the port buffer reservation methods now. This allows
to let more than one RequestAllocator use a Port in a stack-like manner.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29565 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 60f4376e26566eea7e6e61751ec60976e1b7a0e0 16-Mar-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the unused Port::SendAndReceive().
* Change Port::Receive() semantics. It does no longer use the buffer associated
with the object. Instead it allocates heap memory for the caller. Since
there's only one caller who clones the message anyway, we save one copy this
way (though we have an additional syscall in userland) and don't overwrite
a request being prepared for sending.
* Changed RequestAllocator::ReadRequest() to also read the request from the
port.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29563 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6aeea78c6e84f6f415b8de776135ccf5b5676bd1 04-Mar-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Made the UserlandFS code gcc4 friendly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20322 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 83812f67529c88d4fb4b942162a9f21142e683fa 23-Feb-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

Copied userlandfs code from the test tree to the haiku source tree,
where it will be ported to Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20216 a95241bf-73f2-0310-859d-f6bbb57e9c96