Re: git: adad6862228d - main - mac_veriexec_priv_check block proc_write_*regs*

From: Konstantin Belousov <kib_at_freebsd.org>
Date: Tue, 05 May 2026 20:54:05 UTC
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.