| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check for privilege PRIV_SCHED_SETPOLICY instead of PRIV_SCHED_SET, to
at least make it coherent with what is done at thread creation when
a realtime policy is requested, and have users authorized by
mac_priority(4) pass it.
This change is good enough in practice since it only allows 'root' (as
before) and mac_priority(4)'s authorized users in (the point of this
change), without other side effects. More changes in this area, to
generally ensure that all privilege checks are consistent, are going to
come as olce's priority revamp project lands.
(olce: Expanded the explanations.)
PR: 276962
Reported by: jbeich
Reviewed by: olce
Approved by: emaste (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D43835
(cherry picked from commit 2198221bd9df0ceb69945120bc477309a5729241)
Approved by: emaste (mentor)
Approved by: re (cperciva)
|
|
|
|
|
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
Similar commit in current:
(cherry picked from commit 685dc743dc3b)
|
|
|
|
|
|
|
|
| |
Where appropriate hide sysent.h under proper condition.
MFC after: 2 weeks
(cherry picked from commit 31d1b816fe139f46083f8609c34b7d129a6e2ee0)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
Initially, only tag files that use BSD 4-Clause "Original" license.
RelNotes: yes
Differential Revision: https://reviews.freebsd.org/D13133
Notes:
svn path=/head/; revision=325966
|
|
|
|
|
|
|
| |
No functional changes.
Notes:
svn path=/head/; revision=325733
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
threads split sys_sched_getparam(), sys_sched_setparam(),
sys_sched_getscheduler(), sys_sched_setscheduler() to their kern_*
counterparts and add targettd parameter to allow specify the target
thread directly by callee.
Differential Revision: https://reviews.freebsd.org/D1034
Reviewed by: trasz
Notes:
svn path=/head/; revision=283377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
threads refactor kern_sched_rr_get_interval() and sys_sched_rr_get_interval().
Add a kern_sched_rr_get_interval() counterpart which takes a targettd
parameter to allow specify target thread directly by callee (new Linuxulator).
Linuxulator temporarily uses first thread in proc.
Move linux_sched_rr_get_interval() to the MI part.
Differential Revision: https://reviews.freebsd.org/D1032
Reviewed by: trasz
Notes:
svn path=/head/; revision=283374
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
patch modifies makesyscalls.sh to prefix all of the non-compatibility
calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel
entry points and all places in the code that use them. It also
fixes an additional name space collision between the kernel function
psignal and the libc function of the same name by renaming the kernel
psignal kern_psignal(). By introducing this change now we will ease future
MFCs that change syscalls.
Reviewed by: rwatson
Approved by: re (bz)
Notes:
svn path=/head/; revision=225617
|
|
|
|
|
|
|
|
|
|
| |
supported rather than 1. They are supposed to return a suitable value
for sysconf(3). While here, make the fsync sysctl match <unistd.h>.
MFC after: 1 week
Notes:
svn path=/head/; revision=215540
|
|
|
|
|
|
|
|
|
|
| |
target process.
- eliminate a goto.
MFC after: 1 week
Notes:
svn path=/head/; revision=213258
|
|
|
|
|
|
|
|
|
|
|
| |
While the KSE project was quite successful in bringing threading to
FreeBSD, the M:N approach taken by the kse library was never developed
to its full potential. Backwards compatibility will be provided via
libmap.conf for dynamically linked binaries and static binaries will
be broken.
Notes:
svn path=/head/; revision=177091
|
|
|
|
|
|
|
|
|
| |
opposed to what process. Since threads by default have teh name of the
process unless over-written with more useful information, just print the
thread name instead.
Notes:
svn path=/head/; revision=173600
|
|
|
|
|
|
|
|
|
|
|
|
| |
to simply switch rather than lowering priority and switching. This allows
threads of equal priority to run but not lesser priority.
Discussed with: davidxu
Reported by: NIIMI Satoshi <sa2c@sa2c.net>
Approved by: re
Notes:
svn path=/head/; revision=172483
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove also "MP SAFE" after prior "MPSAFE" pass. (suggested by bde)
- Remove extra blank lines in some cases.
- Add extra blank lines in some cases.
- Remove no-op comments consisting solely of the function name, the word
"syscall", or the system call name.
- Add punctuation.
- Re-wrap some comments.
Notes:
svn path=/head/; revision=167232
|
|
|
|
|
|
|
|
|
|
|
| |
system calls now enter without Giant held, and then in some cases, acquire
Giant explicitly.
Remove a number of other MPSAFE annotations in the credential code and
tweak one or two other adjacent comments.
Notes:
svn path=/head/; revision=167211
|
|
|
|
| |
Notes:
svn path=/head/; revision=164183
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specific privilege names to a broad range of privileges. These may
require some future tweaking.
Sponsored by: nCircle Network Security, Inc.
Obtained from: TrustedBSD Project
Discussed on: arch@
Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri,
Alex Lyashkov <umka at sevcity dot net>,
Skip Ford <skip dot ford at verizon dot net>,
Antoine Brodin <antoine dot brodin at laposte dot net>
Notes:
svn path=/head/; revision=164033
|
|
|
|
|
|
|
|
|
| |
don't want to mix process and thread scheduling options together in these
functions, now the thread scheduling option is implemented in new thr
syscalls.
Notes:
svn path=/head/; revision=160322
|
|
|
|
| |
Notes:
svn path=/head/; revision=160258
|
|
|
|
|
|
|
|
|
| |
done this in ptrace syscall, when a pid is large than PID_MAX, the syscall
will search a thread in current process. It permits 1:1 thread library to
get and set a thread's scheduler attributes.
Notes:
svn path=/head/; revision=160257
|
|
|
|
|
|
|
|
|
| |
be a local DOS.
Submitted by: Diane Bruce at db at db.net
Notes:
svn path=/head/; revision=158778
|
|
|
|
|
|
|
| |
Submitted by: Diane Bruce < db at db dot net >
Notes:
svn path=/head/; revision=158745
|
|
|
|
|
|
|
| |
protect thread list.
Notes:
svn path=/head/; revision=157623
|
|
|
|
| |
Notes:
svn path=/head/; revision=144447
|
|
|
|
| |
Notes:
svn path=/head/; revision=139825
|
|
|
|
| |
Notes:
svn path=/head/; revision=116192
|
|
|
|
|
|
|
|
| |
Submittted by: pho
MFC After: 2 days
Notes:
svn path=/head/; revision=108896
|
|
|
|
|
|
|
| |
remove it from the header and add it to the files that require it.
Notes:
svn path=/head/; revision=106969
|
|
|
|
|
|
|
|
|
|
| |
pointer instead of a proc pointer and require the process pointed to
by the second argument to be locked. We now use the thread ucred reference
for the credential checks in p_can*() as a result. p_canfoo() should now
no longer need Giant.
Notes:
svn path=/head/; revision=96886
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this is a low-functionality change that changes the kernel to access the main
thread of a process via the linked list of threads rather than
assuming that it is embedded in the process. It IS still embeded there
but remove all teh code that assumes that in preparation for the next commit
which will actually move it out.
Reviewed by: peter@freebsd.org, gallatin@cs.duke.edu, benno rice,
Notes:
svn path=/head/; revision=90361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Notes:
svn path=/head/; revision=83366
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sched_setparam()
sched_getparam()
sched_setscheduler()
sched_getscheduler()
sched_yield()
sched_get_priority_max()
sched_get_priority_min()
sched_rr_get_interval()
Notes:
svn path=/head/; revision=82701
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The p_can(...) construct was a premature (and, it turns out,
awkward) abstraction. The individual calls to p_canxxx() better
reflect differences between the inter-process authorization checks,
such as differing checks based on the type of signal. This has
a side effect of improving code readability.
o Replace direct credential authorization checks in ktrace() with
invocation of p_candebug(), while maintaining the special case
check of KTR_ROOT. This allows ktrace() to "play more nicely"
with new mandatory access control schemes, as well as making its
authorization checks consistent with other "debugging class"
checks.
o Eliminate "privused" construct for p_can*() calls which allowed the
caller to determine if privilege was required for successful
evaluation of the access control check. This primitive is currently
unused, and as such, serves only to complicate the API.
Approved by: ({procfs,linprocfs} changes) des
Obtained from: TrustedBSD Project
Notes:
svn path=/head/; revision=79335
|
|
|
|
|
|
|
|
|
|
|
|
| |
allow call-specific authorization.
o Modify the authorization model so that p_can() is used to check
scheduling get/set events, using P_CAN_SEE for gets, and P_CAN_SCHED
for sets. This brings the checks in line with get/setpriority().
Obtained from: TrustedBSD Project
Notes:
svn path=/head/; revision=79020
|
|
|
|
|
|
|
|
|
| |
passed 'p' argument. No functional change.
Obtained from: USENIX Emporium, Cheap Tricks Department
Notes:
svn path=/head/; revision=79004
|
|
|
|
|
|
|
|
|
|
|
| |
conditional clauses in the following way:
(0 || a || b);
No functional change.
Notes:
svn path=/head/; revision=78944
|
|
|
|
| |
Notes:
svn path=/head/; revision=78943
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
real uid, saved uid, real gid, and saved gid to ucred, as well as the
pcred->pc_uidinfo, which was associated with the real uid, only rename
it to cr_ruidinfo so as not to conflict with cr_uidinfo, which
corresponds to the effective uid.
o Remove p_cred from struct proc; add p_ucred to struct proc, replacing
original macro that pointed.
p->p_ucred to p->p_cred->pc_ucred.
o Universally update code so that it makes use of ucred instead of pcred,
p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo,
cr_{r,sv}{u,g}id instead of p_*, etc.
o Remove pcred0 and its initialization from init_main.c; initialize
cr_ruidinfo there.
o Restruction many credential modification chunks to always crdup while
we figure out locking and optimizations; generally speaking, this
means moving to a structure like this:
newcred = crdup(oldcred);
...
p->p_ucred = newcred;
crfree(oldcred);
It's not race-free, but better than nothing. There are also races
in sys_process.c, all inter-process authorization, fork, exec, and
exit.
o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid;
remove comments indicating that the old arrangement was a problem.
o Restructure exec1() a little to use newcred/oldcred arrangement, and
use improved uid management primitives.
o Clean up exit1() so as to do less work in credential cleanup due to
pcred removal.
o Clean up fork1() so as to do less work in credential cleanup and
allocation.
o Clean up ktrcanset() to take into account changes, and move to using
suser_xxx() instead of performing a direct uid==0 comparision.
o Improve commenting in various kern_prot.c credential modification
calls to better document current behavior. In a couple of places,
current behavior is a little questionable and we need to check
POSIX.1 to make sure it's "right". More commenting work still
remains to be done.
o Update credential management calls, such as crfree(), to take into
account new ruidinfo reference.
o Modify or add the following uid and gid helper routines:
change_euid()
change_egid()
change_ruid()
change_rgid()
change_svuid()
change_svgid()
In each case, the call now acts on a credential not a process, and as
such no longer requires more complicated process locking/etc. They
now assume the caller will do any necessary allocation of an
exclusive credential reference. Each is commented to document its
reference requirements.
o CANSIGIO() is simplified to require only credentials, not processes
and pcreds.
o Remove lots of (p_pcred==NULL) checks.
o Add an XXX to authorization code in nfs_lock.c, since it's
questionable, and needs to be considered carefully.
o Simplify posix4 authorization code to require only credentials, not
processes and pcreds. Note that this authorization, as well as
CANSIGIO(), needs to be updated to use the p_cansignal() and
p_cansched() centralized authorization routines, as they currently
do not take into account some desirable restrictions that are handled
by the centralized routines, as well as being inconsistent with other
similar authorization instances.
o Update libkvm to take these changes into account.
Obtained from: TrustedBSD Project
Reviewed by: green, bde, jhb, freebsd-arch, freebsd-audit
Notes:
svn path=/head/; revision=77183
|
|
|
|
|
|
|
|
|
|
|
|
| |
implementation. Move from direct uid 0 comparision to using suser_xxx()
call with the same semantics. Simplify CAN_AFFECT() macro as passed
pcred was redundant. The checks here still aren't "right", but they
are probably "better".
Obtained from: TrustedBSD Project
Notes:
svn path=/head/; revision=76316
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
other "system" header files.
Also help the deprecation of lockmgr.h by making it a sub-include of
sys/lock.h and removing sys/lockmgr.h form kernel .c files.
Sort sys/*.h includes where possible in affected files.
OK'ed by: bde (with reservations)
Notes:
svn path=/head/; revision=76166
|
|
|
|
|
|
|
|
|
| |
find before releasing the allproc lock and returning.
Reviewed by: -smp, dfr, jake
Notes:
svn path=/head/; revision=75893
|
|
|
|
| |
Notes:
svn path=/head/; revision=59874
|
|
|
|
|
|
|
| |
for LKM's..
Notes:
svn path=/head/; revision=45739
|
|
|
|
| |
Notes:
svn path=/head/; revision=36578
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
end up being the same, but it doesn't look like you're comparing
apples and oranges.
2. Use need_resched instead of reset_priority. This isn't right
either, since for example you'll round-robin against equal priority FIFO
processes when lowering the priority of another process,
but this works better and a real fix needs to be in kern_synch and
not out here.
3. This is not a device driver: copyin/copyout the structure.
Notes:
svn path=/head/; revision=36218
|
|
|
|
|
|
|
|
|
| |
system calls - return ENOSYS per the spec.
2. Fix interface stub to set priority properly.
Notes:
svn path=/head/; revision=36155
|
|
_KPOSIX_PRIORITY_SCHEDULING options to work. Changes:
Change all "posix4" to "p1003_1b". Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;
Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;
Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;
Add options to LINT;
Minor fixes to P1003_1B code during testing.
Notes:
svn path=/head/; revision=34925
|