Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2026 23:54:05 +0300
From:      Konstantin Belousov <kib@freebsd.org>
To:        "Simon J. Gerraty" <sjg@juniper.net>
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:  <afpY7bTsLmaycqkM@kib.kiev.ua>
In-Reply-To: <85671.1778011697@kaos.jnpr.net>
References:  <69fa2928.33b54.5ad14de3@gitrepo.freebsd.org> <afo0uRvFFl9OlrSb@kib.kiev.ua> <85671.1778011697@kaos.jnpr.net>

index | next in thread | previous in thread | raw e-mail

On Tue, May 05, 2026 at 01:08:17PM -0700, Simon J. Gerraty wrote:
> Konstantin Belousov <kostikbel@gmail.com> 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.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?afpY7bTsLmaycqkM>