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-next>] [day] [month] [year] [list]
Message-ID: <BYAPR18MB2679726F785B910EA9325ADCC5C40@BYAPR18MB2679.namprd18.prod.outlook.com>
Date:   Thu, 17 Dec 2020 05:24:34 +0000
From:   George Cherian <gcherian@...vell.com>
To:     Colin King <colin.king@...onical.com>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Linu Cherian <lcherian@...vell.com>,
        "Geethasowjanya Akula" <gakula@...vell.com>,
        Jerin Jacob Kollanukkaran <jerinj@...vell.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH][next] octeontx2-af: Fix undetected unmap PF error check



> -----Original Message-----
> From: Colin King <colin.king@...onical.com>
> Sent: Wednesday, December 16, 2020 6:06 PM
> To: Sunil Kovvuri Goutham <sgoutham@...vell.com>; Linu Cherian
> <lcherian@...vell.com>; Geethasowjanya Akula <gakula@...vell.com>;
> Jerin Jacob Kollanukkaran <jerinj@...vell.com>; David S . Miller
> <davem@...emloft.net>; Jakub Kicinski <kuba@...nel.org>; George
> Cherian <gcherian@...vell.com>; netdev@...r.kernel.org
> Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH][next] octeontx2-af: Fix undetected unmap PF error
> check
> 
> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently the check for an unmap PF error is always going to be false because
> intr_val is a 32 bit int and is being bit-mask checked against 1ULL << 32.  Fix
> this by making intr_val a u64 to match the type at it is copied from, namely
> npa_event_context->npa_af_rvu_ge.
> 
> Addresses-Coverity: ("Operands don't affect result")
> Fixes: f1168d1e207c ("octeontx2-af: Add devlink health reporters for NPA")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
Acked-by: George Cherian <george.cherian@...vell.com>

> ---
>  drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
> b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
> index 3f9d0ab6d5ae..bc0e4113370e 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
> @@ -275,7 +275,8 @@ static int rvu_npa_report_show(struct devlink_fmsg
> *fmsg, void *ctx,
>  			       enum npa_af_rvu_health health_reporter)  {
>  	struct rvu_npa_event_ctx *npa_event_context;
> -	unsigned int intr_val, alloc_dis, free_dis;
> +	unsigned int alloc_dis, free_dis;
> +	u64 intr_val;
>  	int err;
> 
>  	npa_event_context = ctx;
> --
> 2.29.2

Regards,
-George

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ