From nobody Tue Nov 10 12:33:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jP5fB06gcz6yMSM for ; Tue, 10 Nov 2026 12:33:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jP5f94lplz4sQP for ; Tue, 10 Nov 2026 12:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794313985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8oxt2zYB+3JdL/i3gVh9uFRRMVJxodz6tO30qJ/Kj80=; b=Ru1AEU/dAckEzYuk6qjhe1LjXwrw3wLXwf69hqbVD0cnvUTJEtScepAD3qeMBAFnzcxCFZ ea+Aysb2/o1lA/ADvKrbSlsYNwMHtlbh/JHWCloywMGLkcSq9klzcv7pfUyIMnkTrIKg8p B5DR8I8UsrOidAhi6TjMUrhbFR3ndDGV9wKkkYZtOQew0wjgtpDhCErSvg+t8nWLPDQbnF F6Y7+2p3Fohxk2rzlkqiM5kinB1r0Fic+TJj/YLrivaR95g/+wqPOHadPT3kyP77XzOlZs 1/UcMifyvrzq7gLnWFgmoPcQzpKbv6eLPBaIKnW7R3ie8sUgu5YPfXuObAuWXQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794313985; b=vg9/Yoz3Tsc5zeolmSQMYD1MeO2KzVnrzakCF2rcWVv8z7zt/hb7um4um5RM622F3q3ks4 mjaGWU3DPZreNuBtxAqDGOV6AIpgfxD/gqLqs4FgPN1IQKRh1okN/vC6Ladzae+2VOjl09 TJwpIzh0NqU9Ww/7xds42GcCspnzHrb9q8iCMlXp970bfSRbadpFEQvDFEPy2gEfdSGacl dbxkwnB2lFK1SS2BAuR2i8NR5MLXxbbOzmMwGWQCF0pquTPkwqomeSMPTCZPVFlIm5BpnN 2ccdXipUUBmz13UJjxfSAGAOr0hoiECS5WsLsaF4vnq2oSzuZHIlv1frX5vnvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794313985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8oxt2zYB+3JdL/i3gVh9uFRRMVJxodz6tO30qJ/Kj80=; b=YlndHaLVgglSL4UscaT8Jj4vMaw+264v1b6BL/djSytbrTQFOzFbjTG1g8qSwPn6y59WhD 2zcDk2T7Ji87MuY0hpuxRNBbCRwO+gBftEcClXesKbmlaucafcEIWRPqtL4OURY4WkSYLg w8MfqTueLcRSdBlQx6ypJr029Jbkb0a/28ukTrFEKhc6CeQVkkNsICbglx5zLqTlBCZuCs 2tOc2KojoqaEBRL4cVG2tEaVXXzfh/+Kf51JE7d+NPKkS87pR+4wYSWncb+0W9B/uEt4Iz +NsB4Oho4qaK9vRP4UlFw8jZaXDbC0J3pmReAQeRUahUGo4N7736eLnAj/Ij0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jP5f93f1MzRXd for ; Tue, 10 Nov 2026 12:33:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 14eab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 10 Nov 2026 12:33:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e3bdb45e811f - main - getrlimitusage(2): add user_ implementation List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3bdb45e811fe9577fc187f45654d5003b970350 Auto-Submitted: auto-generated Date: Tue, 10 Nov 2026 12:33:05 +0000 Message-Id: <6af30f01.14eab.1d6f225c@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e3bdb45e811fe9577fc187f45654d5003b970350 commit e3bdb45e811fe9577fc187f45654d5003b970350 Author: Brooks Davis AuthorDate: 2026-11-10 11:49:21 +0000 Commit: Brooks Davis CommitDate: 2026-11-10 11:49:21 +0000 getrlimitusage(2): add user_ implementation Effort: CHERI upstreaming Sponsored by: Innovate UK Pull Request: https://github.com/freebsd/freebsd-src/pull/2284 --- sys/kern/kern_resource.c | 13 +++++++++---- sys/sys/syscallsubr.h | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index f7f07d4253d5..cd3929ac8ea4 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -938,18 +938,23 @@ getrlimitusage_one(struct proc *p, struct vmspace *vm, u_int which, int flags, int sys_getrlimitusage(struct thread *td, struct getrlimitusage_args *uap) +{ + return (user_getrlimitusage(td, uap->which, uap->flags, uap->res)); +} + +int +user_getrlimitusage(struct thread *td, u_int which, int flags, rlim_t *ures) { struct proc *p; rlim_t res; int error; - if ((uap->flags & ~(GETRLIMITUSAGE_EUID)) != 0) + if ((flags & ~(GETRLIMITUSAGE_EUID)) != 0) return (EINVAL); p = curproc; - error = getrlimitusage_one(p, p->p_vmspace, uap->which, uap->flags, - &res); + error = getrlimitusage_one(p, p->p_vmspace, which, flags, &res); if (error == 0) - error = copyout(&res, uap->res, sizeof(res)); + error = copyout(&res, ures, sizeof(res)); return (error); } diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 95e563ccbca8..4ecdc70fd3ba 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -529,6 +529,8 @@ int user_cpuset_setaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *maskp, const struct cpuset_copy_cb *cb); int user_fstat(struct thread *td, int fd, struct stat *sb); +int user_getrlimitusage(struct thread *td, u_int which, int flags, + rlim_t *ures); int user_jail_get(struct thread *td, struct iovec *iovp, unsigned int iovcnt, int flags, copyinuio_t *copyinuio_f, updateiov_t *updateiov_f);