All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: target-devel@vger.kernel.org
Subject: Re: [RFC PATCH] target: sanitize ALUA and PR state file paths before use
Date: Mon, 10 Dec 2018 19:19:59 +0000	[thread overview]
Message-ID: <1544469599.185366.374.camel@acm.org> (raw)
In-Reply-To: <20181122133800.1251-1-ddiss@suse.de>

On Mon, 2018-12-10 at 14:36 +-0100, David Disseldorp wrote:
+AD4 Ping - any feedback on this change?
+AD4 
+AD4 On Thu, 22 Nov 2018 14:38:00 +-0100, David Disseldorp wrote:
+AD4 
+AD4 +AD4 Block ALUA and PR state storage if any of the dynamic subdirectory
+AD4 +AD4 components include a path separator.
+AD4 +AD4 
+AD4 +AD4 Fixes: c66ac9db8d4a (+ACIAWw-SCSI+AF0 target: Add LIO target core v4.0.0-rc6+ACI)
+AD4 +AD4 Signed-off-by: David Disseldorp +ADw-ddiss+AEA-suse.de+AD4
+AD4 +AD4 Signed-off-by: Lee Duncan +ADw-lduncan+AEA-suse.com+AD4
+AD4 +AD4 ---
+AD4 +AD4 Note:
+AD4 +AD4 Submitted as an RFC, as I've not properly tested the alua code path.
+AD4 +AD4 I'm also not sure whether it's reasonable to break existing setups
+AD4 +AD4 with a '/' in the configured unit+AF8-serial. Where +ACI-break+ACI means fail
+AD4 +AD4 APTPL PR requests+ADs ALUA state-save failures are ignored internally.
+AD4 
+AD4 I'd also be happy with any pointers on properly testing ALUA.

Embedding SCSI properties like the unit serial number in a file system path
seems wrong to me. I think the path in which these properties are stored
should be derived from configfs item names configured by the user. These
names are guaranteed to be ASCII strings. If you want to see an example of
alternative approach you are welcome to have a look at scst+AF8-pr+AF8-set+AF8-file+AF8-name()
and scst+AF8-pr+AF8-sync+AF8-device+AF8-file() in the SCST source code.

Regarding testing ALUA code: I use sg+AF8-rtpg and sg+AF8-stpg to test SCSI target
ALUA code.

Bart.

  parent reply	other threads:[~2018-12-10 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 13:38 [RFC PATCH] target: sanitize ALUA and PR state file paths before use David Disseldorp
2018-12-10 13:36 ` David Disseldorp
2018-12-10 19:19 ` Bart Van Assche [this message]
2018-12-10 19:35 ` David Disseldorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1544469599.185366.374.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.