[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200526072007.GB29047@toerring.de>
Date: Tue, 26 May 2020 09:20:07 +0200
From: Jens Thoms Toerring <jt@...rring.de>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regmap: fix alignment issues
On Tue, May 26, 2020 at 01:42:36AM +0300, Andy Shevchenko wrote:
> On Tuesday, May 26, 2020, Jens Thoms Toerring <jt@...rring.de> wrote:
>
> > The assembly and disassembly of data to be sent to or received from a
> > device invoke functions (regmap_format_XXX() and regmap_parse_XXX())
> > that extract or insert data items into a buffer. In some cases these
> > functions are invoked with buffer pointers with odd addresses but try
> > to directly assign from or to those address. On architectures with
> > strict alignment requirements this leads to kernel crashes for u16 and
> > u32 values. The assignments have are replaced by memcpy() calls.
> >
> >
> Don't we have put_/get_unaligned_b/leXX() for this?
Nice, didn't know about them, thank you. Will amend the patch.
--
\ Jens Thoms Toerring ________ jt@...rring.de
\_______________________________ http://toerring.de
Powered by blists - more mailing lists