Re: [PATCH] staging: fbtft: fix unaligned vmem writes when txbuf is byte-offset
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-fbdev,dev.linux.lists.linux-staging,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Thu, Jun 25, 2026 at 07:02:37PM +0800, suryasaimadhu wrote: > fbtft_write_vmem16_bus8() and fb_ra8875's write_vmem16_bus8() offset > txbuf16 by one byte for a command/start prefix, then store 16-bit pixel > data via txbuf16[i]. On strict-alignment architectures this can fault > the same way as the write_reg path fixed in the previous patch. .write_reg() Can you provide a real world example of the failure? > Use put_unaligned() for these stores. Sounds like a fix without Fixes tag. > Signed-off-by: suryasaimadhu <[email protected]> Use your name in accordance with your official documents. ... > +++ b/drivers/staging/fbtft/fb_ra8875.c > @@ -10,6 +10,7 @@ > #include <linux/delay.h> > You should move this blank line to be... > #include <linux/gpio/consumer.h> > +#include <linux/unaligned.h> ...here. > #include "fbtft.h" ... > #define DRVNAME "fb_ra8875" Are other drivers also being affected? ... > +++ b/drivers/staging/fbtft/fbtft-bus.c Also needs linux/unaligned.h. > + put_unaligned(cpu_to_be16(vmem16[i]), &txbuf16[i]); -- With Best Regards, Andy Shevchenko