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: <20160228.004340.1152028301149683990.davem@davemloft.net>
Date:	Sun, 28 Feb 2016 00:43:40 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	saeedm@...lanox.com
Cc:	netdev@...r.kernel.org, ogerlitz@...lanox.com, talal@...lanox.com,
	eranbe@...lanox.com, moshel@...lanox.com
Subject: Re: [PATCH net-next 09/10] net/mlx5: Fix global UAR mapping

From: Saeed Mahameed <saeedm@...lanox.com>
Date: Thu, 25 Feb 2016 18:33:19 +0200

> @@ -246,11 +246,11 @@ int mlx5_alloc_map_uar(struct mlx5_core_dev *mdev, struct mlx5_uar *uar)
>  		err = -ENOMEM;
>  		goto err_free_uar;
>  	}
> -
> -	if (mdev->priv.bf_mapping)
> -		uar->bf_map = io_mapping_map_wc(mdev->priv.bf_mapping,
> -						uar->index << PAGE_SHIFT);
> -
> +#ifdef ARCH_HAS_IOREMAP_WC
> +	uar->bf_map = ioremap_wc(pfn << PAGE_SHIFT, PAGE_SIZE);
> +	if (!uar->bf_map)
> +		mlx5_core_warn(mdev, "ioremap_wc() failed\n");
> +#endif

Sorry, this looks very wrong to me.

It makes no sense to only map this resource if ARCH_HAS_IOREMAP_WC
defined.

The interface _always_ exists, and ARCH_HAS_IOREMAP_WC is an internal
symbol that include/asm-generic/iomap.h uses to determine whether to
provide a generic implementation of the interface or not.

I'm not applying this series until you either fix or explain what
you are doing here in the commit message.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ