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: <20160108082114.GC32138@lst.de>
Date:	Fri, 8 Jan 2016 09:21:15 +0100
From:	Christoph Hellwig <hch@....de>
To:	"Nicholas A. Bellinger" <nab@...erainc.com>
Cc:	target-devel <target-devel@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	Sagi Grimberg <sagig@...lanox.com>,
	Christoph Hellwig <hch@....de>, Hannes Reinecke <hare@...e.de>,
	Andy Grover <agrover@...hat.com>,
	Vasu Dev <vasu.dev@...ux.intel.com>, Vu Pham <vu@...lanox.com>,
	Nicholas Bellinger <nab@...ux-iscsi.org>
Subject: Re: [PATCH 3/4] tcm_fc: Convert acl lookup to modern
	get_initiator_node_acl usage

On Fri, Jan 08, 2016 at 07:15:47AM +0000, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@...ux-iscsi.org>
> 
> This patch does a simple conversion of tcm_fc code to use
> proper modern core_tpg_get_initiator_node_acl() lookup using
> se_node_acl->acl_kref, and drops the legacy list walk from
> ft_acl_get().
> 
> Note the original lookup also took node_name into account,
> but since ft_init_nodeacl() only ever sets port_name for
> se_node_acl->acl_group within configfs, this is purely
> a mechanical change.
> 
> Cc: Vasu Dev <vasu.dev@...ux.intel.com>
> Cc: Sagi Grimberg <sagig@...lanox.com>
> Cc: Christoph Hellwig <hch@....de>
> Cc: Hannes Reinecke <hare@...e.de>
> Cc: Andy Grover <agrover@...hat.com>
> Signed-off-by: Nicholas Bellinger <nab@...ux-iscsi.org>
> ---
>  drivers/target/tcm_fc/tfc_conf.c | 26 ++++++++------------------
>  drivers/target/tcm_fc/tfc_sess.c | 18 +++++++++++-------
>  2 files changed, 19 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/target/tcm_fc/tfc_conf.c b/drivers/target/tcm_fc/tfc_conf.c
> index 9cdb2ac..9389ba3 100644
> --- a/drivers/target/tcm_fc/tfc_conf.c
> +++ b/drivers/target/tcm_fc/tfc_conf.c
> @@ -222,27 +222,17 @@ static int ft_init_nodeacl(struct se_node_acl *nacl, const char *name)
>  
>  struct ft_node_acl *ft_acl_get(struct ft_tpg *tpg, struct fc_rport_priv *rdata)
>  {
>  	struct se_portal_group *se_tpg = &tpg->se_tpg;
>  	struct se_node_acl *se_acl;
> +	unsigned char initiatorname[TRANSPORT_IQN_LEN];
>  
> +	ft_format_wwn(&initiatorname[0], TRANSPORT_IQN_LEN, rdata->ids.port_name);
> +
> +	se_acl = core_tpg_get_initiator_node_acl(se_tpg, &initiatorname[0]);
> +	if (!se_acl)
> +		return NULL;
> +
> +	return container_of(se_acl, struct ft_node_acl, se_node_acl);

I'd say kill this function and opencode it in ft_sess_create.  It
shouldn't be used elsewhere, and ft_sess_create really wants the
se_node_acl and not the ft_node_acl anyway.

Btw, who is dropping the reference we're acuiring through
core_tpg_get_initiator_node_acl?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ