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: <20220530142725.GU2168@kadam>
Date:   Mon, 30 May 2022 17:27:25 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Eugenio Perez Martin <eperezma@...hat.com>
Cc:     Stefano Garzarella <sgarzare@...hat.com>,
        "Dawar, Gautam" <gautam.dawar@....com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        Jason Wang <jasowang@...hat.com>,
        Zhu Lingshan <lingshan.zhu@...el.com>,
        "martinh@...inx.com" <martinh@...inx.com>,
        "ecree.xilinx@...il.com" <ecree.xilinx@...il.com>,
        Eli Cohen <elic@...dia.com>, Parav Pandit <parav@...dia.com>,
        Wu Zongyong <wuzongyong@...ux.alibaba.com>,
        "dinang@...inx.com" <dinang@...inx.com>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Xie Yongji <xieyongji@...edance.com>,
        "lulu@...hat.com" <lulu@...hat.com>,
        "martinpo@...inx.com" <martinpo@...inx.com>,
        "pabloc@...inx.com" <pabloc@...inx.com>,
        Longpeng <longpeng2@...wei.com>,
        "Piotr.Uminski@...el.com" <Piotr.Uminski@...el.com>,
        "Kamde, Tanuj" <tanuj.kamde@....com>,
        Si-Wei Liu <si-wei.liu@...cle.com>,
        "habetsm.xilinx@...il.com" <habetsm.xilinx@...il.com>,
        "lvivier@...hat.com" <lvivier@...hat.com>,
        Zhang Min <zhang.min9@....com.cn>,
        "hanand@...inx.com" <hanand@...inx.com>
Subject: Re: [PATCH v3 2/4] vhost-vdpa: introduce STOP backend feature bit

On Fri, May 27, 2022 at 10:36:55AM +0300, Dan Carpenter wrote:
> static void match_pointer(struct expression *ret_value)
> {
>         struct symbol *type;
>         char *name;
> 
>         type = cur_func_return_type();
>         if (!type || sval_type_max(type).value != 1)
>                 return;
> 
>         if (!is_pointer(ret_value))
>                 return;
> 
>         name = expr_to_str(ret_value);
>         sm_msg("'%s' return pointer cast to bool", name);
>         free_string(name);
> }

I found a bug in Smatch with this check.  With the Smatch bug fixed then
there is only only place which does a legitimate implied pointer to bool
cast.  A different function returns NULL on error instead of false.

drivers/gpu/drm/i915/display/intel_dmc.c:249 intel_dmc_has_payload() 'i915->dmc.dmc_info[0]->payload' return pointer cast to bool
drivers/net/wireless/rndis_wlan.c:1980 rndis_bss_info_update() '(0)' return pointer cast to bool
drivers/net/wireless/rndis_wlan.c:1989 rndis_bss_info_update() '(0)' return pointer cast to bool
drivers/net/wireless/rndis_wlan.c:1995 rndis_bss_info_update() '(0)' return pointer cast to bool

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ