Date: Thu, 18 Nov 2021 00:04:42 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Brooks Davis <brooks@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b7fd86118fb5 - main - syscalls: sprinkle in const values Message-ID: <YZV8euPb043EMws9@kib.kiev.ua> In-Reply-To: <202111172022.1AHKM3IJ059209@gitrepo.freebsd.org> References: <202111172022.1AHKM3IJ059209@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 17, 2021 at 08:22:03PM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b7fd86118fb5d41f61fdfa003d11e9367770ff0a > > commit b7fd86118fb5d41f61fdfa003d11e9367770ff0a > Author: Brooks Davis <brooks@FreeBSD.org> > AuthorDate: 2021-11-17 20:12:21 +0000 > Commit: Brooks Davis <brooks@FreeBSD.org> > CommitDate: 2021-11-17 20:12:21 +0000 > > syscalls: sprinkle in const values > > Add missing const qualifiers to a number of syscall arguments. > > Obtained from: CheriBSD > > Reviewed by: kevans > --- > sys/kern/syscalls.master | 32 ++++++++++++------------ > sys/kern/systrace_args.c | 64 ++++++++++++++++++++++++------------------------ > sys/kern/vfs_syscalls.c | 10 ++++---- > sys/sys/syscallsubr.h | 13 +++++----- > sys/sys/sysproto.h | 32 ++++++++++++------------ :( > @@ -501,7 +501,7 @@ > } > 74 AUE_MPROTECT STD|CAPENABLED { > int mprotect( > - _In_ void *addr, > + _In_ const void *addr, > size_t len, > int prot > ); You did not marked addr for munmap(2) as const, but did this for mprotect(2). I believe that this is the right interpretation for munmap, but not for mprotect due to PROT_NONE. Or at least it should be consistent WRT allowed side effects on access.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YZV8euPb043EMws9>