From: Cornelia Huck <cohuck@redhat.com>
To: Stefan Haberland <sth@linux.ibm.com>
Cc: axboe@kernel.dk, linux-block@vger.kernel.org,
hoeppner@linux.ibm.com, linux-s390@vger.kernel.org,
heiko.carstens@de.ibm.com, gor@linux.ibm.com,
borntraeger@de.ibm.com
Subject: Re: [PATCH 01/10] s390/cio: Export information about Endpoint-Security Capability
Date: Tue, 6 Oct 2020 11:46:56 +0200 [thread overview]
Message-ID: <20201006114656.6b1a97b1.cohuck@redhat.com> (raw)
In-Reply-To: <20201002193940.24012-2-sth@linux.ibm.com>
On Fri, 2 Oct 2020 21:39:31 +0200
Stefan Haberland <sth@linux.ibm.com> wrote:
> From: Sebastian Ott <sebott@linux.ibm.com>
>
> Add a new sysfs attribute 'esc' per chpid. This new attribute exports
> the Endpoint-Security-Capability byte of channel-path description block,
> which could be 0-None, 1-Authentication, 2 and 3-Encryption.
>
> For example:
> $ cat /sys/devices/css0/chp0.34/esc
> 0
>
> Reference-ID: IO1812
> Signed-off-by: Sebastian Ott <sebott@linux.ibm.com>
> [vneethv@linux.ibm.com: cleaned-up & modified description]
> Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
> Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
> Acked-by: Vasily Gorbik <gor@linux.ibm.com>
> Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
> ---
> drivers/s390/cio/chp.c | 15 +++++++++++++++
> drivers/s390/cio/chsc.h | 3 ++-
> 2 files changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c
> index dfcbe54591fb..8d0de6adcad0 100644
> --- a/drivers/s390/cio/chp.c
> +++ b/drivers/s390/cio/chp.c
> @@ -384,6 +384,20 @@ static ssize_t chp_chid_external_show(struct device *dev,
> }
> static DEVICE_ATTR(chid_external, 0444, chp_chid_external_show, NULL);
>
> +static ssize_t chp_esc_show(struct device *dev,
> + struct device_attribute *attr, char *buf)
> +{
> + struct channel_path *chp = to_channelpath(dev);
> + ssize_t rc;
> +
> + mutex_lock(&chp->lock);
> + rc = sprintf(buf, "%x\n", chp->desc_fmt1.esc);
I'm wondering: Do we need to distinguish between '0' == 'no esc, and
the hardware says so' and '0' == 'the chsc to get that information is
not supported'? I see that for the chid the code checks for a flag in
desc_fmt1, and I indeed see that nothing is displayed for
chid/chid_external when I run under QEMU.
> + mutex_unlock(&chp->lock);
> +
> + return rc;
> +}
> +static DEVICE_ATTR(esc, 0444, chp_esc_show, NULL);
> +
> static ssize_t util_string_read(struct file *filp, struct kobject *kobj,
> struct bin_attribute *attr, char *buf,
> loff_t off, size_t count)
(...)
next prev parent reply other threads:[~2020-10-06 9:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-02 19:39 [PATCH 00/10] DASD FC endpoint security Stefan Haberland
2020-10-02 19:39 ` [PATCH 01/10] s390/cio: Export information about Endpoint-Security Capability Stefan Haberland
2020-10-06 9:46 ` Cornelia Huck [this message]
2020-10-06 14:23 ` Stefan Haberland
2020-10-06 14:37 ` Cornelia Huck
2020-10-02 19:39 ` [PATCH 02/10] s390/cio: Provide Endpoint-Security Mode per CU Stefan Haberland
2020-10-06 14:46 ` Cornelia Huck
2020-10-07 14:24 ` Stefan Haberland
2020-10-07 16:13 ` Cornelia Huck
2020-10-02 19:39 ` [PATCH 03/10] s390/cio: Add support for FCES status notification Stefan Haberland
2020-10-02 19:39 ` [PATCH 04/10] s390/dasd: Remove unused parameter from dasd_generic_probe() Stefan Haberland
2020-10-02 19:39 ` [PATCH 05/10] s390/dasd: Move duplicate code to separate function Stefan Haberland
2020-10-02 19:39 ` [PATCH 06/10] s390/dasd: Store path configuration data during path handling Stefan Haberland
2020-10-02 19:39 ` [PATCH 07/10] s390/dasd: Fix operational path inconsistency Stefan Haberland
2020-10-02 19:39 ` [PATCH 08/10] s390/dasd: Display FC Endpoint Security information via sysfs Stefan Haberland
2020-10-06 10:26 ` Cornelia Huck
2020-10-06 16:57 ` Jan Höppner
2020-10-07 9:49 ` Cornelia Huck
2020-10-07 14:33 ` Jan Höppner
2020-10-07 16:40 ` Cornelia Huck
2020-10-07 20:10 ` Jan Höppner
2020-10-08 7:03 ` Cornelia Huck
2020-10-08 11:04 ` Stefan Haberland
2020-10-02 19:39 ` [PATCH 09/10] s390/dasd: Prepare for additional path event handling Stefan Haberland
2020-10-02 19:39 ` [PATCH 10/10] s390/dasd: Process FCES path event notification Stefan Haberland
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=20201006114656.6b1a97b1.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=axboe@kernel.dk \
--cc=borntraeger@de.ibm.com \
--cc=gor@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hoeppner@linux.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=sth@linux.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox