summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task_sched.go
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2019-04-08 16:31:06 -0700
committerShentubot <shentubot@google.com>2019-04-08 16:32:11 -0700
commit9471c013483b0709479c51d470ac840621ae7d46 (patch)
tree651bfe7529c28e69320dbe1c9540250e103ba5db /pkg/sentry/kernel/task_sched.go
parent218a7b54494b263001ed791ca13857c12d37ded6 (diff)
Export kernel.SignalInfoPriv.
Also add kernel.SignalInfoNoInfo, and use it in RLIMIT_FSIZE checks. PiperOrigin-RevId: 242562428 Change-Id: I4887c0e1c8f5fddcabfe6d4281bf76d2f2eafe90
Diffstat (limited to 'pkg/sentry/kernel/task_sched.go')
-rw-r--r--pkg/sentry/kernel/task_sched.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/kernel/task_sched.go b/pkg/sentry/kernel/task_sched.go
index 3b3cdc24a..3d654bf93 100644
--- a/pkg/sentry/kernel/task_sched.go
+++ b/pkg/sentry/kernel/task_sched.go
@@ -394,7 +394,7 @@ func (ticker *kernelCPUClockTicker) Notify(exp uint64) {
newItimerVirtSetting, exp := tg.itimerVirtSetting.At(tgVirtNow)
tg.itimerVirtSetting = newItimerVirtSetting
if exp != 0 {
- virtReceiver.sendSignalLocked(sigPriv(linux.SIGVTALRM), true)
+ virtReceiver.sendSignalLocked(SignalInfoPriv(linux.SIGVTALRM), true)
}
}
if profReceiver != nil {
@@ -402,18 +402,18 @@ func (ticker *kernelCPUClockTicker) Notify(exp uint64) {
newItimerProfSetting, exp := tg.itimerProfSetting.At(tgProfNow)
tg.itimerProfSetting = newItimerProfSetting
if exp != 0 {
- profReceiver.sendSignalLocked(sigPriv(linux.SIGPROF), true)
+ profReceiver.sendSignalLocked(SignalInfoPriv(linux.SIGPROF), true)
}
// RLIMIT_CPU soft limit
newRlimitCPUSoftSetting, exp := tg.rlimitCPUSoftSetting.At(tgProfNow)
tg.rlimitCPUSoftSetting = newRlimitCPUSoftSetting
if exp != 0 {
- profReceiver.sendSignalLocked(sigPriv(linux.SIGXCPU), true)
+ profReceiver.sendSignalLocked(SignalInfoPriv(linux.SIGXCPU), true)
}
// RLIMIT_CPU hard limit
rlimitCPUMax := tg.limits.Get(limits.CPU).Max
if rlimitCPUMax != limits.Infinity && !tgProfNow.Before(ktime.FromSeconds(int64(rlimitCPUMax))) {
- profReceiver.sendSignalLocked(sigPriv(linux.SIGKILL), true)
+ profReceiver.sendSignalLocked(SignalInfoPriv(linux.SIGKILL), true)
}
}
tg.signalHandlers.mu.Unlock()
@@ -471,7 +471,7 @@ func (t *Task) NotifyRlimitCPUUpdated() {
tgcpu := t.tg.cpuStatsAtLocked(t.k.CPUClockNow())
tgProfNow := ktime.FromNanoseconds((tgcpu.UserTime + tgcpu.SysTime).Nanoseconds())
if !tgProfNow.Before(ktime.FromSeconds(int64(rlimitCPU.Max))) {
- t.sendSignalLocked(sigPriv(linux.SIGKILL), true)
+ t.sendSignalLocked(SignalInfoPriv(linux.SIGKILL), true)
}
}
t.tg.updateCPUTimersEnabledLocked()