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]
Message-ID: <205eb69f-9c1c-5391-7145-6cb15a670649@deltatee.com>
Date:   Fri, 8 Dec 2017 17:02:07 -0700
From:   Logan Gunthorpe <logang@...tatee.com>
To:     linux-ntb@...glegroups.com, linux-kernel@...r.kernel.org
Cc:     Jon Mason <jdmason@...zu.us>, Dave Jiang <dave.jiang@...el.com>,
        Allen Hubbe <Allen.Hubbe@....com>
Subject: Re: [PATCH] ntb_transport: fix qp count bug

Sorry, ignore this. I sent an old patch.

Logan

On 08/12/17 05:01 PM, Logan Gunthorpe wrote:
> In cases where there are more mw's than spads/2-2, the mw count gets
> reduced to match the limitation. ntb_transport also tries to ensure that
> there are fewer qps than mws but uses the full mw count instead of
> the reduced one. When this happens, the math in
> 'ntb_transport_setup_qp_mw' will get confused and result in a kernel
> paging request bug.
> 
> This patch fixes the bug by reducing qp_count to the reduced mw count
> instead of the full mw count.
> 
> Signed-off-by: Logan Gunthorpe <logang@...tatee.com>
> Cc: Jon Mason <jdmason@...zu.us>
> Cc: Dave Jiang <dave.jiang@...el.com>
> Cc: Allen Hubbe <Allen.Hubbe@....com>
> ---
>   drivers/ntb/ntb_transport.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
> index 02ca45fdd892..0a778d2cab94 100644
> --- a/drivers/ntb/ntb_transport.c
> +++ b/drivers/ntb/ntb_transport.c
> @@ -1128,8 +1128,8 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
>   	qp_count = ilog2(qp_bitmap);
>   	if (max_num_clients && max_num_clients < qp_count)
>   		qp_count = max_num_clients;
> -	else if (mw_count < qp_count)
> -		qp_count = mw_count;
> +	else if (nt->mw_count < qp_count)
> +		qp_count = nt->mw_count;
>   
>   	qp_bitmap &= BIT_ULL(qp_count) - 1;
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ