#
e372ec1e |
|
09-Feb-2022 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel: Use KernelReferenceable for the supplementary_groups array. Instead of the malloc_referenced system. Makes for some cleaner code, and the malloc_referenced system was only used here, so it can now be dropped altogether.
|
#
057fe191 |
|
01-Sep-2021 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel: Break thread-related AutoLockers into a separate header. Including thread.h brings a massive array of things with it from the kernel thread arch headers, team and thread definitions, hash tables, linked lists, Referenceable, etc. that the vast majority of AutoLock.h consumers neither want nor need. So, put these in a separate header, and adjust all consumers of these lockers to include the new file. This change exposes the fact that a lot of files were inadvertently making use of headers included indirectly through thread.h. Those will be fixed in the next commit.
|
#
58c99ce4 |
|
21-Apr-2018 |
Fredrik Holmqvist <fredrik.holmqvist@gmail.com> |
malloc_referenced adds +1 to int32 pointer so use its release
|
#
d54a9e0a |
|
29-Oct-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Do not use gSchedulerLock when accesing UID and GID Reads and writes to uid_t and gid_t are atomic anyway. The only real problem that may happen here is inconsistent state of triples effective_{u, g}id, saved_set_{u, g}id, real_{u, g}id, but team locks protect us against that.
|
#
021ccbd1 |
|
22-May-2012 |
Pawel Dziepak <pdziepak@quarnos.org> |
Fix #8596: common_getgroups copies too little data common_getgroups, when called from within the kernel, copies actualCount bytes instead of actualCount * sizeof(gid_t) bytes.
|
#
24df6592 |
|
11-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged signals-merge branch into trunk with the following changes: * Reorganized the kernel locking related to threads and teams. * We now discriminate correctly between process and thread signals. Signal handlers have been moved to teams. Fixes #5679. * Implemented real-time signal support, including signal queuing, SA_SIGINFO support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition of the real-time signal range. Closes #1935 and #2695. * Gave SIGBUS a separate signal number. Fixes #6704. * Implemented <time.h> clock and timer support, and fixed/completed alarm() and [set]itimer(). Closes #5682. * Implemented support for thread cancellation. Closes #5686. * Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554. * Lots over smaller more or less related changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4535495d |
|
10-Jan-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged the signals branch into trunk, with these changes: * The team and thread kernel structures have been renamed to Team and Thread respectively and moved into the new BKernel namespace. * Several (kernel add-on) sources have been converted from C to C++ since private kernel headers are included that are no longer C compatible. Changes after merging: * Fixed gcc 2 build (warnings mainly in the scary firewire bus manager). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5ecc4b37 |
|
01-Mar-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced ref-counting for the I/O contexts. * The I/O context related vfs_*() functions have io_context* instead of void* parameters/return values, now. * vfs_new_io_context(): Lock the parent I/O context before getting its table size. Otherwise the table size could change until we do. * vfs_resize_fd_table(): Fixed use of MutexLocker. We created only a temporary object, not one with function scope. * Renamed load_image_etc() to load_image_internal() and added a parameter for specifying the parent team of the one to create. * Introduced a kernel private load_image_etc() with a few more arguments than load_image(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29375 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
15374c5d |
|
02-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed thread_spinlock and team_spinlock to gThreadSpinlock and gTeamSpinlock. * Renamed the static global variables in smp.c to match our style guide. * Minor other cleanup. * Removed superfluous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26730 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5b53519c |
|
15-Apr-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Some setre{g,u}id() tweaking. What happens to the saved set-{g,u}id is not specified by the standard, but other systems set it as well in most cases. We set it to real {g,u}uid now, if that changes. OpenSSH (sshd) seems to be agreeable with that solution. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24974 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9fe0705b |
|
30-Mar-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
My previous change to getgroups() broke the getgroups(0) special case, which e.g. "awk" didn't like. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24691 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
290946ce |
|
29-Mar-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Implemented some basics for supplementary groups support: - The kernel stores the group IDs in the team structure. They are correctly inherited on fork() and load_image_etc(). - Implemented getgroups() for real, i.e. it retrieves the groups associated with the process. - Implemented setgroups(), initgroups() and (the BSDish) getgrouplist(). The latter two read the group information from the "group database" /etc/group (if existing). - Change the BIND port config, since we do have getgrouplist() now. * The set-uid feature was broken when the path to the executable was relative, since we used stat(), which, in the kernel, uses the kernel IO context. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24669 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4eb35609 |
|
11-Mar-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added real, effective and saved set- user and group IDs to the team structure. They are properly inherited and updated on fork(), load_image(), and exec(). * Implemented the get[e]{u,g}id(), set[[r]e]{u,g}id() family for real. * getgroups() also calls the kernel now, but only returns the effective group ID. Supplementary groups support is still missing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24359 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d54a9e0a4194f6843406bc67f68045f59f9a190d |
|
29-Oct-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Do not use gSchedulerLock when accesing UID and GID Reads and writes to uid_t and gid_t are atomic anyway. The only real problem that may happen here is inconsistent state of triples effective_{u, g}id, saved_set_{u, g}id, real_{u, g}id, but team locks protect us against that.
|
#
021ccbd18f13a354359087e5b797cac792471679 |
|
22-May-2012 |
Pawel Dziepak <pdziepak@quarnos.org> |
Fix #8596: common_getgroups copies too little data common_getgroups, when called from within the kernel, copies actualCount bytes instead of actualCount * sizeof(gid_t) bytes.
|
#
24df65921befcd0ad0c5c7866118f922da61cb96 |
|
11-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged signals-merge branch into trunk with the following changes: * Reorganized the kernel locking related to threads and teams. * We now discriminate correctly between process and thread signals. Signal handlers have been moved to teams. Fixes #5679. * Implemented real-time signal support, including signal queuing, SA_SIGINFO support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition of the real-time signal range. Closes #1935 and #2695. * Gave SIGBUS a separate signal number. Fixes #6704. * Implemented <time.h> clock and timer support, and fixed/completed alarm() and [set]itimer(). Closes #5682. * Implemented support for thread cancellation. Closes #5686. * Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554. * Lots over smaller more or less related changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4535495d80c86e19e2610e7444a4fcefe3e0f8e6 |
|
10-Jan-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged the signals branch into trunk, with these changes: * The team and thread kernel structures have been renamed to Team and Thread respectively and moved into the new BKernel namespace. * Several (kernel add-on) sources have been converted from C to C++ since private kernel headers are included that are no longer C compatible. Changes after merging: * Fixed gcc 2 build (warnings mainly in the scary firewire bus manager). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5ecc4b37752beba35afeb7ef446f07c3c6d01971 |
|
01-Mar-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced ref-counting for the I/O contexts. * The I/O context related vfs_*() functions have io_context* instead of void* parameters/return values, now. * vfs_new_io_context(): Lock the parent I/O context before getting its table size. Otherwise the table size could change until we do. * vfs_resize_fd_table(): Fixed use of MutexLocker. We created only a temporary object, not one with function scope. * Renamed load_image_etc() to load_image_internal() and added a parameter for specifying the parent team of the one to create. * Introduced a kernel private load_image_etc() with a few more arguments than load_image(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29375 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
15374c5dbdb2c6b700bb2191887cadad7ef9eb73 |
|
02-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed thread_spinlock and team_spinlock to gThreadSpinlock and gTeamSpinlock. * Renamed the static global variables in smp.c to match our style guide. * Minor other cleanup. * Removed superfluous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26730 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5b53519c63d0537c5a7543d001bcfef046b70bf4 |
|
15-Apr-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Some setre{g,u}id() tweaking. What happens to the saved set-{g,u}id is not specified by the standard, but other systems set it as well in most cases. We set it to real {g,u}uid now, if that changes. OpenSSH (sshd) seems to be agreeable with that solution. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24974 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9fe0705beef8646e4a86e8aeb27b817acf098479 |
|
30-Mar-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
My previous change to getgroups() broke the getgroups(0) special case, which e.g. "awk" didn't like. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24691 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
290946ce80e8bf8e7a8e8a8593ea88f3465f5a3f |
|
29-Mar-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Implemented some basics for supplementary groups support: - The kernel stores the group IDs in the team structure. They are correctly inherited on fork() and load_image_etc(). - Implemented getgroups() for real, i.e. it retrieves the groups associated with the process. - Implemented setgroups(), initgroups() and (the BSDish) getgrouplist(). The latter two read the group information from the "group database" /etc/group (if existing). - Change the BIND port config, since we do have getgrouplist() now. * The set-uid feature was broken when the path to the executable was relative, since we used stat(), which, in the kernel, uses the kernel IO context. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24669 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4eb3560949b15e7492c8055eb512e5dd68b2da32 |
|
11-Mar-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added real, effective and saved set- user and group IDs to the team structure. They are properly inherited and updated on fork(), load_image(), and exec(). * Implemented the get[e]{u,g}id(), set[[r]e]{u,g}id() family for real. * getgroups() also calls the kernel now, but only returns the effective group ID. Supplementary groups support is still missing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24359 a95241bf-73f2-0310-859d-f6bbb57e9c96
|