Re: [PATCH] staging: vme_user: bound slave windows to DMA buffers

From: Yousef Alhouseen

Date: Thu Jun 25 2026 - 09:57:08 EST


Hi Dan, Greg,

Thanks for going through it. Agreed, this version mixes separate fixes
and the helper is the wrong shape. Please drop it.

I found it while reading the vme_user ioctl and read/write paths.
Testing was only git diff --check and checkpatch; I don't have VME
hardware.

I'll rework from the core/bridge side and split out anything that
still holds up.

Thanks,
Yousef

On Thu, 25 Jun 2026 14:58:14 +0300, Dan Carpenter <error27@xxxxxxxxx> wrote:
> On Thu, Jun 25, 2026 at 02:51:55PM +0300, Dan Carpenter wrote:
> > There are two bug fixes in this patch:
> >
> > 1) The driver allows you to set any value for size.
> > 2) The vme_get_size() function returns zero on error but nothing
> > checks for error.
> >
> > There is a third bug as well which is not addressed.
> >
> > 3) The slave.vme_addr is not checked and it allows you to read/write
> > to any memory.
> >
> > It sort of looks like bugs 1 and 2 only affect
> > drivers/staging/vme_user/vme_fake.c.
>
> Actually, no. The bugs seem to affect drivers/staging/vme_user/vme_tsi148.c
> but the variables are stored to registers instead of variables so it
> was a little more convoluted.
>
> regards,
> dan carpenter