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] [day] [month] [year] [list]
Date:   Mon, 19 Mar 2018 14:38:04 -0600
From:   Logan Gunthorpe <logang@...tatee.com>
To:     Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc:     linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        linux-ntb@...glegroups.com, linux-crypto@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Horia Geantă <horia.geanta@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Kate Stewart <kstewart@...uxfoundation.org>
Subject: Re: [PATCH v12 1/9] iomap: Fix sparse endian check warnings

Hi Luc,

Thanks for the feedback. I'll try to address your points in a v13 shortly.

Logan


On 18/03/18 10:13 AM, Luc Van Oostenryck wrote:
> it looks correct but if you should explain why the warning
> is not a valid one. Once done, you can then explain what problem
> you have fixed instead of saying you suppressed a warning.
> 
>> Also, it looks like the wrong conversion function was used in
> 
> I would suggest to split the patch in two since it does two
> different things which should have their own explanation.
> 
>> diff --git a/lib/iomap.c b/lib/iomap.c
>> index 541d926da95e..a05d9fa21794 100644
>> --- a/lib/iomap.c
>> +++ b/lib/iomap.c
>> @@ -106,8 +106,10 @@ EXPORT_SYMBOL(ioread32be);
>>  #endif
>>  
>>  #ifndef mmio_write16be
>> -#define mmio_write16be(val,port) __raw_writew(be16_to_cpu(val),port)
>> -#define mmio_write32be(val,port) __raw_writel(be32_to_cpu(val),port)
>> +#define mmio_write16be(val, port) \
>> +	__raw_writew((u16 __force)cpu_to_be16(val), port)
>> +#define mmio_write32be(val, port) \
>> +	__raw_writel((u32 __force)cpu_to_be32(val), port)
>>  #endif
> 
> I think that in this sort of replacement, it's better to not split
> the lines (even if larger than 80, that's it).
> 
> -- Luc Van Oostenryck
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ