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:   Thu, 21 Nov 2019 11:08:23 +0100
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Joel Stanley <joel@....id.au>
Cc:     Andrew Jeffery <andrew@...id.au>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Robert Lippert <rlippert@...gle.com>,
        Patrick Venture <venture@...gle.com>,
        linux-aspeed <linux-aspeed@...ts.ozlabs.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] aspeed: fix snoop_file_poll()'s return type

On Thu, Nov 21, 2019 at 02:52:39AM +0000, Joel Stanley wrote:
> On Wed, 20 Nov 2019 at 05:42, Andrew Jeffery <andrew@...id.au> wrote:
> >
> > Looks fine to me as POLLIN and EPOLLIN evaluate to the same value despite
> > the type difference.
> 
> I assume Luc was using sparse to check:
> 
> CHECK   ../drivers/soc/aspeed/aspeed-lpc-snoop.c
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:112:19: warning: incorrect
> type in initializer (different base types)
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:112:19:    expected
> restricted __poll_t ( *poll )( ... )
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:112:19:    got unsigned int (
> * )( ... )
> 
> If you fix the return type:
> 
>   CHECK   ../drivers/soc/aspeed/aspeed-lpc-snoop.c
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:106:45: warning: incorrect
> type in return expression (different base types)
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:106:45:    expected restricted __poll_t
> ../drivers/soc/aspeed/aspeed-lpc-snoop.c:106:45:    got int

Yes, but with the change s/POLLIN/EPOLLIN/ this last warning
is not issued.
 
Cheers,
-- Luc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ