freebsd-dev/sys/kern
Maxim Sobolev 4b1783363f In linux emulation layer try to detect attempt to use linux_clone() to
create kernel threads and call rfork(2) with RFTHREAD flag set in this case,
which puts parent and child into the same threading group. As a result
all threads that belong to the same program end up in the same threading
group.

This is similar to what linuxthreads port does, though in this case we don't
have a luxury of having access to the source code and there is no definite
way to differentiate linux_clone() called for threading purposes from other
uses, so that we have to resort to heuristics.

Allow SIGTHR to be delivered between all processes in the same threading
group previously it has been blocked for s[ug]id processes.

This also should improve locking of the same file descriptor from different
threads in programs running under linux compat layer.

PR:			kern/72922
Reported by:		Andriy Gapon <avg@icyb.net.ua>
Idea suggested by:	rwatson
2005-03-03 16:57:55 +00:00
..
bus_if.m /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
clock_if.m /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
cpufreq_if.m Introduce a new method, cpufreq_drv_type(), that returns the type of the 2005-02-18 00:23:36 +00:00
device_if.m /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
genassym.sh
imgact_aout.c o Split out kernel part of execve(2) syscall into two parts: one that 2005-01-29 23:12:00 +00:00
imgact_elf32.c
imgact_elf64.c
imgact_elf.c o Split out kernel part of execve(2) syscall into two parts: one that 2005-01-29 23:12:00 +00:00
imgact_gzip.c o Split out kernel part of execve(2) syscall into two parts: one that 2005-01-29 23:12:00 +00:00
imgact_shell.c o Replace two while {} do loops with more appropriate do {} while loops. This 2005-02-25 10:17:53 +00:00
inflate.c
init_main.c Add /rescue/init to the default init_path, before /stand/sysinstall. 2005-02-17 10:00:10 +00:00
init_sysent.c regen 2005-03-01 17:44:34 +00:00
kern_acct.c When mac_check_system_acct() fails, make sure to unlock as well as close 2005-03-01 08:56:13 +00:00
kern_acl.c Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This is 2004-07-26 07:24:04 +00:00
kern_alq.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_clock.c - Define KTR points for KTR_SCHED. 2004-12-26 00:14:21 +00:00
kern_condvar.c Refine the turnstile and sleep queue interfaces just a bit: 2004-10-12 18:36:20 +00:00
kern_conf.c Also handle d_maj hints from cloning drivers correctly. 2005-02-27 22:57:32 +00:00
kern_context.c
kern_cpu.c Add locking to handle multiple threads getting/setting frequencies at the 2005-02-27 01:34:08 +00:00
kern_descrip.c Make some file/filedesc related functions static 2005-02-10 12:27:58 +00:00
kern_environment.c Make a bunch of malloc types static. 2005-02-10 12:02:37 +00:00
kern_event.c Use kern_kevent instead of the stackgap for 32bit syscall wrapping. 2005-03-01 17:45:55 +00:00
kern_exec.c Welcome to the 21st century: increase MAXSHELLCMDLEN from 128 bytes to 2005-02-25 11:49:42 +00:00
kern_exit.c In 1.276 of kern/subr_trap.c I introduced a mechanism for delaying 2005-01-29 14:03:41 +00:00
kern_fork.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_idle.c Set the scheduling class of the idle threads to PRI_IDLE. 2005-02-04 06:16:05 +00:00
kern_intr.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_jail.c Add a new sysctl, "security.jail.chflags_allowed", which controls the 2005-02-08 21:31:11 +00:00
kern_kse.c Drop bzero and shove the responsibility of zeroing the kse upcall 2005-02-24 00:05:50 +00:00
kern_kthread.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_ktr.c - Change the ddb paging "support" to use a variable (db_lines_per_page) to 2004-11-01 22:15:15 +00:00
kern_ktrace.c Make a SYSCTL_NODE static 2005-02-10 12:23:29 +00:00
kern_linker.c When trying each linker class in turn with a preloaded module, exit 2004-08-27 01:20:26 +00:00
kern_lock.c - Include LK_INTERLOCK in LK_EXTFLG_MASK so that it makes its way into 2005-01-25 16:06:05 +00:00
kern_lockf.c - Make lf_print static and move its prototype into kern_lockf.c 2005-01-25 10:15:26 +00:00
kern_mac.c Bump MAC Framework version to 2 in preparation for the upcoming API/ABI 2004-11-09 11:28:40 +00:00
kern_malloc.c Bring in MemGuard, a very simple and small replacement allocator 2005-01-21 18:09:17 +00:00
kern_mbuf.c Well, it seems that I pre-maturely removed the "All rights reserved" 2005-02-16 21:45:59 +00:00
kern_mib.c Add a sysctl that records the amount of physical memory in the machine. 2005-02-28 21:42:56 +00:00
kern_module.c Swap the arguments for CP so we copy the correct source and 2005-02-18 22:14:40 +00:00
kern_mtxpool.c Make a bunch of malloc types static. 2005-02-10 12:02:37 +00:00
kern_mutex.c Rework the optimization for spinlocks on UP to be slightly less drastic and 2005-01-05 21:13:27 +00:00
kern_ntptime.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_physio.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_poll.c Remove recently added note about DEVICE_POLLING not working with SMP. 2005-02-25 22:07:51 +00:00
kern_proc.c Make a bunch of SYSCTL_NODEs static. 2005-02-10 12:15:49 +00:00
kern_prot.c In linux emulation layer try to detect attempt to use linux_clone() to 2005-03-03 16:57:55 +00:00
kern_resource.c Stop explicitly touching td_base_pri outside of the scheduler and simply 2004-12-30 20:29:58 +00:00
kern_sema.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_shutdown.c Replace a printf with a KASSERT that we are indeed running on the BSP. 2004-11-30 06:21:38 +00:00
kern_sig.c In kern_sigtimedwait, remove waitset bits for td_sigmask before 2005-03-02 13:43:51 +00:00
kern_subr.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_switch.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_sx.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_synch.c Stop explicitly touching td_base_pri outside of the scheduler and simply 2004-12-30 20:29:58 +00:00
kern_syscalls.c Do a pass over all modules in the kernel and make them return EOPNOTSUPP 2004-07-15 08:26:07 +00:00
kern_sysctl.c Make another bunch of SYSCTL_NODEs static 2005-02-10 12:16:08 +00:00
kern_tc.c Put on my peril sensitive sunglasses and add a flags field to the internal 2004-10-11 22:04:16 +00:00
kern_thr.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_thread.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_time.c If the pointer to the new itimerval is NULL in kern_setitimer(), just 2005-02-07 21:45:48 +00:00
kern_timeout.c When processing a timeout() callout and returning it to the free 2005-02-11 00:14:00 +00:00
kern_umtx.c Revert my previous errno hack, that is certainly an issue, 2005-01-18 13:53:10 +00:00
kern_uuid.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
kern_xxx.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
ksched.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
link_elf_obj.c Add support for completing the installation of ELF relocatable 2004-08-29 01:21:51 +00:00
link_elf.c Normalize the VM wiring done with SPARSE_MAPPING: check for errors, and 2004-08-09 18:46:13 +00:00
linker_if.m /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
Make.tags.inc
Makefile
makesyscalls.sh
md4c.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
md5c.c MD5Pad() should never have been exposed. 2005-02-10 12:20:42 +00:00
p1003_1b.c /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
posix4_mib.c Back when VOP_* was introduced, we did not have new-style struct 2004-12-01 23:16:38 +00:00
sched_4bsd.c Rework the interface between priority propagation (lending) and the 2004-12-30 20:52:44 +00:00
sched_ule.c - A test in sched_switch() is no longer necessary and it is incorrect 2005-02-23 00:50:26 +00:00
subr_acl_posix1e.c Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This is 2004-07-26 07:24:04 +00:00
subr_autoconf.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_blist.c Move the definitions of SWAPBLK_NONE and SWAPBLK_MASK from vm_page.h to 2004-06-04 04:03:26 +00:00
subr_bus.c Use dynamic major number allocation. 2005-02-27 22:00:45 +00:00
subr_clist.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_clock.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_devstat.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_disk.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_eventhandler.c eliminate potential null deref 2005-02-23 19:32:29 +00:00
subr_hints.c
subr_kdb.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_kobj.c
subr_log.c Use dynamic major number allocation. 2005-02-27 22:02:03 +00:00
subr_mbpool.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_mchain.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_module.c
subr_msgbuf.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_param.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_pcpu.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_power.c
subr_prf.c Update for the KDB framework: 2004-07-10 21:43:23 +00:00
subr_prof.c netchild's mega-patch to isolate compiler dependencies into a central 2005-03-02 21:33:29 +00:00
subr_rman.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_rtc.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_sbuf.c Make a bunch of malloc types static. 2005-02-10 12:02:37 +00:00
subr_scanf.c
subr_sleepqueue.c Make a bunch of malloc types static. 2005-02-10 12:02:37 +00:00
subr_smp.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_taskqueue.c Add taskqueue_drain. This waits for the specified task to finish, if 2004-10-05 04:16:01 +00:00
subr_trap.c Whitespace fix. 2004-12-30 20:30:58 +00:00
subr_turnstile.c Make a bunch of malloc types static. 2005-02-10 12:02:37 +00:00
subr_unit.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
subr_witness.c When DDB is not defined, don't implement witness_thread_has_locks() and 2005-01-22 21:14:21 +00:00
sys_generic.c Declare "cnt" (a number of bytes to read or write) as an "ssize_t", not 2005-02-10 20:19:17 +00:00
sys_pipe.c Rearrange the kninit calls for both directions of a pipe so that 2005-01-17 07:56:28 +00:00
sys_process.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
sys_socket.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
syscalls.c regen 2005-03-01 17:44:34 +00:00
syscalls.master Change the prototype of kevent to remove the const from the changelist. 2005-03-01 17:43:08 +00:00
sysv_ipc.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
sysv_msg.c Add much needed descriptions for a number of the IPC related sysctl OIDs. 2005-02-12 01:22:39 +00:00
sysv_sem.c Add much needed descriptions for a number of the IPC related sysctl OIDs. 2005-02-12 01:22:39 +00:00
sysv_shm.c Add much needed descriptions for a number of the IPC related sysctl OIDs. 2005-02-12 01:22:39 +00:00
tty_compat.c Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES. 2004-06-21 22:57:16 +00:00
tty_conf.c Preparation commit for the tty cleanups that will follow in the near 2004-07-15 20:47:41 +00:00
tty_cons.c Use dynamic major number allocation for /dev/console, there is no 2005-02-27 21:52:42 +00:00
tty_pty.c Use dynamic major number allocation. 2005-02-27 22:02:03 +00:00
tty_subr.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
tty_tty.c Use dynamic major number allocation. 2005-02-27 22:02:03 +00:00
tty.c Call tty_close() at the very end of ttyclose() since otherwise NULL 2004-12-30 19:24:49 +00:00
uipc_accf.c Re-style do_setopt_accept_filter() to match uipc_accf.c style, and fix 2005-02-18 19:01:22 +00:00
uipc_cow.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
uipc_domain.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 23:35:40 +00:00
uipc_mbuf2.c Make a bunch of malloc types static. 2005-02-10 12:02:37 +00:00
uipc_mbuf.c Insert volatile cast to discourage gcc from optimizing the read outside 2005-03-03 02:41:37 +00:00
uipc_proto.c
uipc_sem.c Insert missing increment of (i) when walking the temporary semaphore 2005-02-25 21:00:14 +00:00
uipc_sockbuf.c Prefer NULL to returning 0 cast to a pointer type. 2005-02-20 15:56:13 +00:00
uipc_socket2.c Prefer NULL to returning 0 cast to a pointer type. 2005-02-20 15:56:13 +00:00
uipc_socket.c In the current world order, solisten() implements the state transition of 2005-02-21 21:58:17 +00:00
uipc_syscalls.c Remove now unused 'int s' from spl(). 2005-02-18 21:39:55 +00:00
uipc_usrreq.c In the current world order, solisten() implements the state transition of 2005-02-21 21:58:17 +00:00
vfs_acl.c Rename suser_cred()'s PRISON_ROOT flag to SUSER_ALLOWJAIL. This is 2004-07-26 07:24:04 +00:00
vfs_aio.c Make a SYSCTL_NODE static 2005-02-10 12:23:29 +00:00
vfs_bio.c Make various vnode related functions static 2005-02-10 12:28:58 +00:00
vfs_cache.c Make a SYSCTL_NODE and a mutex static 2005-02-10 12:16:42 +00:00
vfs_cluster.c make cluster_callback() static 2005-02-10 12:17:48 +00:00
vfs_default.c Remove VFS_START(). Its original purpose involved the mfs filesystem, 2005-02-20 23:02:20 +00:00
vfs_export.c Make various mountpoint related functions static. 2005-02-10 12:25:38 +00:00
vfs_extattr.c Drag another softupdates tentacle back into FFS: Now that FFS's 2005-02-08 18:09:11 +00:00
vfs_init.c Remove VFS_START(). Its original purpose involved the mfs filesystem, 2005-02-20 23:02:20 +00:00
vfs_lookup.c - Tweak kern_msgctl() to return a copy of the requested message queue id 2005-02-07 18:44:55 +00:00
vfs_mount.c Remove VFS_START(). Its original purpose involved the mfs filesystem, 2005-02-20 23:02:20 +00:00
vfs_subr.c - Enable SMP VFS by default on current. More users are needed to turn up 2005-02-23 10:05:43 +00:00
vfs_syscalls.c Drag another softupdates tentacle back into FFS: Now that FFS's 2005-02-08 18:09:11 +00:00
vfs_vnops.c Add locking assertions into vn_extattr_set, vn_extattr_get and 2005-02-24 00:13:16 +00:00
vnode_if.src VOP_DESTROYVOBJECT() is no more. 2005-02-07 09:26:58 +00:00