From nobody Tue May 05 20:54: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 4g99k25Jl7z6cNBD; Tue, 05 May 2026 20:54:34 +0000 (UTC) (envelope-from kib@freebsd.org) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4g99k22Brsz3kn1; Tue, 05 May 2026 20:54:34 +0000 (UTC) (envelope-from kib@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 645Ks52x080790; Tue, 5 May 2026 23:54:08 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 645Ks52x080790 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 645Ks53w080789; Tue, 5 May 2026 23:54:05 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Tue, 5 May 2026 23:54:05 +0300 From: Konstantin Belousov To: "Simon J. Gerraty" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: adad6862228d - main - mac_veriexec_priv_check block proc_write_*regs* Message-ID: References: <69fa2928.33b54.5ad14de3@gitrepo.freebsd.org> <85671.1778011697@kaos.jnpr.net> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <85671.1778011697@kaos.jnpr.net> X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4g99k22Brsz3kn1 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Tue, May 05, 2026 at 01:08:17PM -0700, Simon J. Gerraty wrote: > Konstantin Belousov wrote: > > > +#define PROC_PRIV_CHECK(priv) do { \ > > > + int _error; \ > > > + _error = priv_check(currthread, priv); \ > > What is currthread? > > fat fingers, sorry, fixing I must admit that I highly dislike this macro. It hides the non-local flow control (exit from the containing function) without any hints about it. Why not explicitly call priv_check() and return error ? It would be both cleaner, no potential local redefinition, and explicit.