summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2025-12-19 15:59:08 +0000
committerBrooks Davis <brooks@FreeBSD.org>2025-12-19 15:59:08 +0000
commita79e2278c58e1c59e12fbf39b5b3bf36629bfc87 (patch)
treeb48edf5c652b6afcb400d0ad5864c1550e9c3aea /sbin
parentdf6861d755c8f72380ae7fb8df535b27eba8c0be (diff)
ipf: copy{in,out}ptr -> ipf_copy{in,out}_indirect
These functions take the source or destintation address indirectly from a potentially missaligned buffer. Rename them to refect this and to free up the copy{in,out}ptr names. Some of the code in question is dead code and doesn't or won't compile, but I've changed it all for consistency. NB: If the pointers are actually stored under aligned then this code is broken with CHERI. Reviewed by: cy Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D54232
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipf/ipftest/ip_fil.c4
-rw-r--r--sbin/ipf/libipf/interror.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ipf/ipftest/ip_fil.c b/sbin/ipf/ipftest/ip_fil.c
index 6df3bed8224e..72816a73327e 100644
--- a/sbin/ipf/ipftest/ip_fil.c
+++ b/sbin/ipf/ipftest/ip_fil.c
@@ -619,7 +619,7 @@ ipf_checkv6sum(fin)
* See above for description, except that all addressing is in user space.
*/
int
-copyoutptr(softc, src, dst, size)
+ipf_copyout_indirect(softc, src, dst, size)
void *src, *dst;
size_t size;
{
@@ -635,7 +635,7 @@ copyoutptr(softc, src, dst, size)
* See above for description, except that all addressing is in user space.
*/
int
-copyinptr(src, dst, size)
+ipf_copyin_indirect(src, dst, size)
void *src, *dst;
size_t size;
{
diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c
index a7e6f4a5e431..98f550b5e3ff 100644
--- a/sbin/ipf/libipf/interror.c
+++ b/sbin/ipf/libipf/interror.c
@@ -28,8 +28,8 @@ static ipf_error_entry_t *find_error(int);
static ipf_error_entry_t ipf_errors[] = {
{ 1, "auth table locked/full" },
{ 2, "" },
- { 3, "copyinptr received bad address" },
- { 4, "copyoutptr received bad address" },
+ { 3, "ipf_copyin_indirect received bad address" },
+ { 4, "ipf_copyout_indirect received bad address" },
{ 5, "" },
{ 6, "cannot load a rule with FR_T_BUILTIN flag set" },
{ 7, "internal rule without FR_T_BUILDINT flag set" },