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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVGN+Z1L8qPQg2uB@shikoro>
Date:   Mon, 27 Sep 2021 11:25:13 +0200
From:   'Wolfram Sang' <wsa@...nel.org>
To:     Andrew Gabbasov <andrew_gabbasov@...tor.com>
Cc:     linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Sergei Shtylyov <sergei.shtylyov@...il.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH] memory: renesas-rpc-if: Avoid unaligned bus access for
 HyperFlash

Hi Andrew,

> It could make sense if "from" would not change along the function.

Yes. And using a pointer to unsigned long would neither make the code a
lot more readable, I am afraid.

> I don't like #ifdef's inside the function body too, but the problem is that
> "__raw_readq" is defined in arch/arm64/include/asm/io.h unconditionally,
> but in include/asm-generic/io.h under "#ifdef CONFIG_64BIT" only.

I see. Bad luck then :(

> I looked through the whole kernel code too, and unfortunately didn't find
> any similar code that could be re-used or had some parts, extractable as
> a common helper. That's why I ended up with a local custom function,
> at least so far, until it could be found useful by somebody else ;)

Thanks for confirming you also had a look.

Okay, the function is not exactly pretty, but my comments have been
addressed and it fixes a serious bug, so:

Reviewed-by: Wolfram Sang <wsa+renesas@...g-engineering.com>

Still, if someone has ideas how to make the function more readable, we
could incrementally improve it.

Kind regards,

   Wolfram


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ