Re: git: b517edb8deed - main - CHERI: declare copy{in,out}ptr{,_nofault}

From: Brooks Davis <brooks_at_freebsd.org>
Date: Mon, 29 Jun 2026 13:56:46 UTC
On Mon, Jun 29, 2026 at 01:01:39PM +0000, Brooks Davis wrote:
> The branch main has been updated by brooks:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=b517edb8deed23b8c616f0ad4453e4dee7b0ac0f
> 
> commit b517edb8deed23b8c616f0ad4453e4dee7b0ac0f
> Author:     Brooks Davis <brooks@FreeBSD.org>
> AuthorDate: 2026-06-29 12:58:52 +0000
> Commit:     Brooks Davis <brooks@FreeBSD.org>
> CommitDate: 2026-06-29 12:59:29 +0000
> 
>     CHERI: declare copy{in,out}ptr{,_nofault}
>     
>     These provenance-preserving functions are to be used when copying
>     objects that are expected to contain pointers.  Data buffers which do
>     not contain pointers should be copied by the traditional copyin/copyout
>     functions which *do not* preserve pointer provenance (on CHERI they
>     clear validity tags).
>     
>     NOTE: Going forward, this requires changes when adding new syscalls or
>     ioctl that take pointers to objects containing pointers.  Fortunately,
>     the vast majority (>90%) of copyin and copyout statements do not copy
>     pointers and require no change.  Failure to make the chance will have no
>     effect on non-CHERI architectures.

Note to devlopers: don't stress about copy{in,out}ptr for now.  I'll be
adding them where needed as I pull in futher CHERI patches and code that
needs them doesn't typically change all that fast so some ways it's less
work for me if you don't start making changes.

-- Brooks