Page MenuHomeFreeBSD

hvsock: Use zfree(9) instead of non-standard bzero(3)
AcceptedPublic

Authored by freebsd_igalic.co on Mar 26 2024, 10:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 6:56 PM
Unknown Object (File)
Mar 28 2024, 2:06 AM
Subscribers

Details

Reviewers
glebius
whu
Summary

bzero(3) is a non-standard function.
instead of bzero(3)+free(9), use our equally non-standard zfree(9),
which does this in one go.

Sponsored by: FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 56796
Build 53684: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 27 2024, 12:16 AM

P.S. It is worth documenting why do we want to zero it. What's special about info in this socket's pcb? Any idea?

zlei added inline comments.
sys/dev/hyperv/hvsock/hv_sock.c
387

I think the bzero() can be safely removed.
CC the author @whu .

sys/dev/hyperv/hvsock/hv_sock.c
387

Unless the pcb contains some sensitive information, e.g., private key, user credential, entropy etc.