lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 15 Jan 2013 16:14:19 +0100 From: Sjur BRENDELAND <sjur.brandeland@...ricsson.com> To: Ido Yariv <ido@...ery.com> Cc: Ohad Ben-Cohen <ohad@...ery.com>, Linus Walleij <linus.walleij@...aro.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Sjur Brændeland <sjur@...ndeland.net> Subject: RE: [RFCv2 11/11] remoteproc: Support virtio config space. Hi Ido, > > +void rproc_virtio_get(struct virtio_device *vdev, unsigned offset, > > + void *buf, unsigned > len) > > +{ > > + struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); > > + void *cfg = &rvdev->rsc->vring[rvdev->rsc->num_of_vrings]; > > + memcpy(buf, cfg + offset, len); > > +} > > + > > +void rproc_virtio_set(struct virtio_device *vdev, unsigned offset, > > + const void *buf, unsigned len) > > +{ > > + struct rproc_vdev *rvdev = vdev_to_rvdev(vdev); > > + void *cfg = &rvdev->rsc->vring[rvdev->rsc->num_of_vrings]; > > + memcpy(cfg + offset, buf, len); > > } > > Perhaps verify the offset and length to avoid overwriting memory? OK, I'll add checks on size of the config space. Regards, Sjur -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists