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)
Thu, Dec 12, 2:51 PM
Unknown Object (File)
Tue, Dec 10, 11:57 AM
Unknown Object (File)
Nov 25 2024, 1:38 AM
Unknown Object (File)
Nov 20 2024, 1:07 PM
Unknown Object (File)
Nov 17 2024, 5:36 PM
Unknown Object (File)
Oct 3 2024, 6:13 AM
Unknown Object (File)
Sep 29 2024, 9:45 PM
Unknown Object (File)
Sep 26 2024, 11:08 PM
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.