Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sys/dev/virtio/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@
req = TAILQ_FIRST(&sc->vtblk_req_free);
if (req != NULL) {
TAILQ_REMOVE(&sc->vtblk_req_free, req, vbr_link);
bzero(&req->vbr_hdr, sizeof(struct vtblk_request) -
bzero(__unbounded_addressof(req->vbr_hdr), sizeof(struct vtblk_request) -

Check warning on line 904 in sys/dev/virtio/block/virtio_blk.c

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
offsetof(struct vtblk_request, vbr_hdr));
}

Expand Down
5 changes: 3 additions & 2 deletions sys/kern/kern_kthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,10 @@ kthread_add1(void (*func)(void *), void *arg, struct proc *p,
if (newtdp != NULL)
*newtdp = newtd;

bzero(&newtd->td_startzero,
bzero(__unbounded_addressof(newtd->td_startzero),
__rangeof(struct thread, td_startzero, td_endzero));
bcopy(&oldtd->td_startcopy, &newtd->td_startcopy,
bcopy(__unbounded_addressof(oldtd->td_startcopy),
__unbounded_addressof(newtd->td_startcopy),
__rangeof(struct thread, td_startcopy, td_endcopy));

/* set up arg0 for 'ps', et al */
Expand Down
2 changes: 1 addition & 1 deletion sys/kern/kern_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ void
pstats_fork(struct pstats *src, struct pstats *dst)
{

bzero(&dst->pstat_startzero,
bzero(__unbounded_addressof(dst->pstat_startzero),
__rangeof(struct pstats, pstat_startzero, pstat_endzero));
bcopy(&src->pstat_startcopy, &dst->pstat_startcopy,
__rangeof(struct pstats, pstat_startcopy, pstat_endcopy));
Expand Down
3 changes: 2 additions & 1 deletion sys/kern/kern_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,8 @@ void
crcopy(struct ucred *dest, struct ucred *src)
{

bcopy(&src->cr_startcopy, &dest->cr_startcopy,
bcopy(__unbounded_addressof(src->cr_startcopy),
__unbounded_addressof(dest->cr_startcopy),
(unsigned)((caddr_t)&src->cr_endcopy -
(caddr_t)&src->cr_startcopy));
dest->cr_flags = src->cr_flags;
Expand Down
5 changes: 3 additions & 2 deletions sys/kern/kern_thr.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,10 @@ thread_create(struct thread *td, struct rtprio *rtp,
if (error)
goto fail;

bzero(&newtd->td_startzero,
bzero(__unbounded_addressof(newtd->td_startzero),
__rangeof(struct thread, td_startzero, td_endzero));
bcopy(&td->td_startcopy, &newtd->td_startcopy,
bcopy(__unbounded_addressof(td->td_startcopy),
__unbounded_addressof(newtd->td_startcopy),
__rangeof(struct thread, td_startcopy, td_endcopy));
newtd->td_proc = td->td_proc;
newtd->td_rb_list = newtd->td_rbp_list = newtd->td_rb_inact = 0;
Expand Down
3 changes: 2 additions & 1 deletion sys/kern/subr_uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ cloneuio(struct uio *uiop)
int iovlen;

uio = allocuio(uiop->uio_iovcnt);
bcopy(&uiop->uio_startcopy, &uio->uio_startcopy,
bcopy(__unbounded_addressof(uiop->uio_startcopy),
__unbounded_addressof(uio->uio_startcopy),
__rangeof(struct uio, uio_startcopy, uio_endcopy));
iovlen = uiop->uio_iovcnt * sizeof(struct iovec);
bcopy(uiop->uio_iov, uio->uio_iov, iovlen);
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet/in_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo)
inp = uma_zalloc_smr(pcbinfo->ipi_zone, M_NOWAIT);
if (inp == NULL)
return (ENOBUFS);
bzero(&inp->inp_start_zero, inp_zero_size);
bzero(__unbounded_addressof(inp->inp_start_zero), inp_zero_size);
#ifdef NUMA
inp->inp_numa_domain = M_NODOM;
#endif
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet/tcp_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2215,7 +2215,7 @@ tcp_newtcpcb(struct inpcb *inp, struct tcpcb *listening_tcb)
* code that rely on that. For now take safe approach and zero whole
* tcpcb. This definitely can be optimized.
*/
bzero(&tp->t_start_zero, t_zero_size);
bzero(__unbounded_addressof(tp->t_start_zero), t_zero_size);

/* Initialise cc_var struct for this tcpcb. */
tp->t_ccv.tp = tp;
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet/udp_usrreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ udp_attach(struct socket *so, int proto, struct thread *td)
inp->inp_flowid = atomic_fetchadd_int(&udp_flowid, 1);
inp->inp_flowtype = M_HASHTYPE_OPAQUE;
up = intoudpcb(inp);
bzero(&up->u_start_zero, u_zero_size);
bzero(__unbounded_addressof(up->u_start_zero), u_zero_size);
INP_WUNLOCK(inp);

return (0);
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet6/udp6_usrreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ udp6_attach(struct socket *so, int proto, struct thread *td)
*/
inp->inp_ip_ttl = V_ip_defttl;
up = intoudpcb(inp);
bzero(&up->u_start_zero, u_zero_size);
bzero(__unbounded_addressof(up->u_start_zero), u_zero_size);
INP_WUNLOCK(inp);
return (0);
}
Expand Down
2 changes: 1 addition & 1 deletion sys/netlink/netlink_message_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
errmsg = nlmsg_reserve_data(nw, payload_len, struct nlmsgerr);
errmsg->error = error;
/* In case of error copy the whole message, else just the header */
memcpy(&errmsg->msg, hdr, cap_ack ? sizeof(*hdr) : hdr->nlmsg_len);
memcpy(__unbounded_addressof(errmsg->msg), hdr, cap_ack ? sizeof(*hdr) : hdr->nlmsg_len);

Check warning on line 301 in sys/netlink/netlink_message_writer.c

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters

if (npt->err_msg != NULL && nlp->nl_flags & NLF_EXT_ACK)
nlattr_add_string(nw, NLMSGERR_ATTR_MSG, npt->err_msg);
Expand Down
Loading