The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e72e16c55df48194c354e82bd31415529c7a92a9

commit e72e16c55df48194c354e82bd31415529c7a92a9
Author:     Mateusz Guzik <[email protected]>
AuthorDate: 2021-08-23 16:20:53 +0000
Commit:     Mateusz Guzik <[email protected]>
CommitDate: 2021-08-23 18:38:05 +0000

    Remove bzero declaration
    
    The kernel was migrated to memset in ba96f37758412151 ("Use __builtin
    for various mem* and b* (e.g. bzero) routines.") and there are no
    remaining architectures using the file.
    
    malloc is augmented to prevent KMSAN from breaking.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/sys/malloc.h | 2 +-
 sys/sys/systm.h  | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h
index 3d88460a751e..b83d78a18444 100644
--- a/sys/sys/malloc.h
+++ b/sys/sys/malloc.h
@@ -233,7 +233,7 @@ void        *malloc(size_t size, struct malloc_type *type, 
int flags) __malloc_like
                _malloc_item = malloc(_size, type, (flags) &~ M_ZERO);  \
                if (((flags) & M_WAITOK) != 0 ||                        \
                    __predict_true(_malloc_item != NULL))               \
-                       bzero(_malloc_item, _size);                     \
+                       memset(_malloc_item, 0, _size);                 \
        } else {                                                        \
                _malloc_item = malloc(_size, type, flags);              \
        }                                                               \
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 1be8f1ac49be..17d1e8933997 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -342,7 +342,6 @@ void        hexdump(const void *ptr, int length, const char 
*hdr, int flags);
 
 #define ovbcopy(f, t, l) bcopy((f), (t), (l))
 void   bcopy(const void * _Nonnull from, void * _Nonnull to, size_t len);
-void   bzero(void * _Nonnull buf, size_t len);
 void   explicit_bzero(void * _Nonnull, size_t);
 
 void   *memset(void * _Nonnull buf, int c, size_t len);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to