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: <3946038.VbkgOjgKu3@wuerfel>
Date:	Thu, 28 Apr 2016 11:52:40 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Sagar Dharia <sdharia@...eaurora.org>
Cc:	gregkh@...uxfoundation.org, bp@...e.de, poeschel@...onage.de,
	treding@...dia.com, broonie@...nel.org, gong.chen@...ux.intel.com,
	andreas.noever@...il.com, alan@...ux.intel.com,
	mathieu.poirier@...aro.org, daniel@...ll.ch, jkosina@...e.cz,
	sharon.dvir1@...l.huji.ac.il, joe@...ches.com, davem@...emloft.net,
	james.hogan@...tec.com, michael.opdenacker@...e-electrons.com,
	daniel.thompson@...aro.org, robh+dt@...nel.org, pawel.moll@....com,
	mark.rutland@....com, ijc+devicetree@...lion.org.uk,
	galak@...eaurora.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, kheitke@...ience.com,
	mlocke@...eaurora.org, agross@...eaurora.org,
	sheetal.tigadoli@...il.com, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH V5 3/6] slimbus: Add messaging APIs to slimbus framework

On Wednesday 27 April 2016 17:58:06 Sagar Dharia wrote:

> +	ctrl->tx.base = dma_alloc_coherent(ctrl->dev.parent,
> +					   (ctrl->tx.sl_sz * ctrl->tx.n),
> +					   &ctrl->tx.phy, GFP_KERNEL);
> +	if (!ctrl->tx.base) {
> +		ret = -ENOMEM;
> +		goto tx_alloc_failed;
> +	}

This looks controller specific, and hints that some parts of the "common"
framework should actually be part of the controller driver instead.

In particular, the use of "ctrl->dev.parent" suggests that this should
have been allocated by the controller.

> @@ -162,6 +279,15 @@ struct slim_controller {
>  	struct slim_addrt	*addrt;
>  	u8			num_dev;
>  	struct workqueue_struct *wq;
> +	struct slim_val_inf	*tid_tbl[SLIM_MAX_TIDS];
> +	u8			last_tid;
> +	spinlock_t		txn_lock;
> +	struct slim_ctrl_buf	tx;
> +	struct slim_ctrl_buf	rx;
> +	struct slim_pending	*pending_wr;
> +	struct semaphore	tx_sem;

Please try to avoid the use of semaphores in new code.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ