Re: kernel-team Digest, Vol 156, Issue 21

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: kernel-team Digest, Vol 156, Issue 21

Jun Young Yang

On 6 Jan 2018, at 1:29 AM, [hidden email] wrote:

Send kernel-team mailing list submissions to
[hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.ubuntu.com/mailman/listinfo/kernel-team
or, via email, send a message with subject or body 'help' to
[hidden email]

You can reach the person managing the list at
[hidden email]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of kernel-team digest..."


Today's Topics:

 1. NACK: [SRU Artful/Zesty][PATCH] On ARM64 PCIE physical
    function passthrough guest fails to boot (Kleber Souza)
 2. NACK: [SRU Artful/Zesty][PATCH] ACPI APEI error handling bug
    fixes (Kleber Souza)
 3. NACK: [SRU][A][PATCH 0/1] Fix for LP#1738334 - hibmc
    regression (Kleber Souza)
 4. NACK: [PATCH 0/2][A/B/OEM] HID:Fix RayD touchscreen failure
    to resume from S3 (Kleber Souza)
 5. NACK: [PATCH][Bionic][SRU Artful] scsi: hisi_sas: support
    zone management commands (Kleber Souza)
 6. Re: [PATCH 2/2][SRU][ARTFUL] block: cope with WRITE ZEROES
    failing in blkdev_issue_zeroout() (Kleber Souza)
 7. Re: [PATCH 2/2][SRU][ARTFUL] block: cope with WRITE ZEROES
    failing in blkdev_issue_zeroout() (Colin Ian King)


----------------------------------------------------------------------

Message: 1
Date: Fri, 5 Jan 2018 15:38:29 +0100
From: Kleber Souza <[hidden email]>
To: [hidden email]
Subject: NACK: [SRU Artful/Zesty][PATCH] On ARM64 PCIE physical
function passthrough guest fails to boot
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

On 11/21/17 00:50, Manoj Iyer wrote:

Please consider these patches that fixs bug https://launchpad.net/bugs/1732804.  The patches were cleanly cherry-picked from linux-next and a test kernel is available in the PPA https://launchpad.net/~centriq-team/+archive/ubuntu/lp1732804/
The kernel was tested by me as well as engg at Qualcomm on QDF2400 platform, and the results are posted to the bug report.

Thanks
Manoj Iyer


This patchset has been resent.



------------------------------

Message: 2
Date: Fri, 5 Jan 2018 15:39:23 +0100
From: Kleber Souza <[hidden email]>
To: Manoj Iyer <[hidden email]>,
[hidden email]
Subject: NACK: [SRU Artful/Zesty][PATCH] ACPI APEI error handling bug
fixes
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

On 11/21/17 00:57, Manoj Iyer wrote:
Please consider the following patches that fix the bug https://launchpad.net/bugs/1732990. The patches were cleanly cherry picked from linus tree and a test kernel is available in the PPA: https://launchpad.net/~centriq-team/+archive/ubuntu/lp1732990.

The kernel was tested by engineers at Qualcomm on a QDF2400 platform and the results are posted to the bug.

Thanks
Manoj Iyer



This patchset has been resent.



------------------------------

Message: 3
Date: Fri, 5 Jan 2018 15:40:58 +0100
From: Kleber Souza <[hidden email]>
To: Daniel Axtens <[hidden email]>,
[hidden email]
Subject: NACK: [SRU][A][PATCH 0/1] Fix for LP#1738334 - hibmc
regression
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

On 12/15/17 11:41, Daniel Axtens wrote:
[SRU Justification]

[Impact]
On Artful kernels, X fails to start and a kernel splat is printed.

This is because ea642c3216cb ("drm/ttm: add io_mem_pfn callback") is
incomplete: the hisilicon hibmc driver does not contain the callback
and so the kernel tries to execute code at NULL.

[Fix]
There is a discussion and potential fix at
https://lists.freedesktop.org/archives/dri-devel/2017-November/159002.html
The fix hasn't landed yet and it looks like they're going to
re-engineer the entire section instead.

Rather than wait for that and deal with the massive regression
potential, the fix I have picked to submit is very very minimal and
touches only hibmc.

[Regression Potential]
Minimal - fix only touches hibmc driver. Tested on D05 board.

[Testcase]
Install patched kernel, try to start X. If it succeeds, the fix
works. If there's a kernel splat and X does not start, the fix does
not work.

[Notes]
HiSilicon would really like this fix in Artful in such time so that
when the next 16.04 point release ships in February, the HWE kernel
will work with Xorg.

Michal Srb (1):
UBUNTU: SAUCE: drm: hibmc: Initialize the hibmc_bo_driver.io_mem_pfn

drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 1 +
1 file changed, 1 insertion(+)


This patchset has been resent.



------------------------------

Message: 4
Date: Fri, 5 Jan 2018 15:49:08 +0100
From: Kleber Souza <[hidden email]>
To: Aaron Ma <[hidden email]>, [hidden email],
[hidden email]
Subject: NACK: [PATCH 0/2][A/B/OEM] HID:Fix RayD touchscreen failure
to resume from S3
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

On 01/04/18 07:06, Aaron Ma wrote:
[Impact]
Resume of S3 cause system hang on Lenovo laptops with RayD touchscreen.

[Fix]
RayD touchscreen issued corrupted data after it resume from suspend.
Then HID driver didn't handle the data well,
because of the data overflow then it made a call trace and hang.
Keep memset safe from corrupted data and add command to make RayD
touchscreen back to normal.
Then touchscreen works fine.

[Test Case]
Tested on ThinkPad L380, works fine with fixes.

[Regression Potential]
Low, keep the data in hid-core and i2c-hid more strictly.
Add specific device quirk in i2c-hid.

Aaron Ma (2):
HID: core: i2c-hid: fix size check and type usage
HID: i2c-hid: Fix resume issue on Raydium touchscreen device

drivers/hid/hid-core.c        |  4 ++--
drivers/hid/hid-ids.h         |  3 +++
drivers/hid/i2c-hid/i2c-hid.c | 23 ++++++++++++++++++-----
3 files changed, 23 insertions(+), 7 deletions(-)


This patchset is being reworked, as stated by Aaron Ma.



------------------------------

Message: 5
Date: Fri, 5 Jan 2018 15:58:59 +0100
From: Kleber Souza <[hidden email]>
To: dann frazier <[hidden email]>,
[hidden email]
Subject: NACK: [PATCH][Bionic][SRU Artful] scsi: hisi_sas: support
zone management commands
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

On 12/23/17 17:24, dann frazier wrote:
From: Xiaofei Tan <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1739891

Add two ATA commands, ATA_CMD_ZAC_MGMT_IN and ATA_CMD_ZAC_MGMT_OUT in
hisi_sas_get_ata_protocol(), to support SATA SMR disk.

Signed-off-by: Xiaofei Tan <[hidden email]>
Signed-off-by: John Garry <[hidden email]>
Signed-off-by: Martin K. Petersen <[hidden email]>
(cherry picked from commit c3fe8a2bbbc22bd4945ea69ab5a29913baeb35e4)
Signed-off-by: dann frazier <[hidden email]>
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 44f3f9e0b0d4..9d9c2c248027 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -61,6 +61,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
case ATA_CMD_WRITE_QUEUED:
case ATA_CMD_WRITE_LOG_DMA_EXT:
case ATA_CMD_WRITE_STREAM_DMA_EXT:
+ case ATA_CMD_ZAC_MGMT_IN:
return HISI_SAS_SATA_PROTOCOL_DMA;

case ATA_CMD_CHK_POWER:
@@ -73,6 +74,7 @@ u8 hisi_sas_get_ata_protocol(u8 cmd, int direction)
case ATA_CMD_SET_FEATURES:
case ATA_CMD_STANDBY:
case ATA_CMD_STANDBYNOW1:
+ case ATA_CMD_ZAC_MGMT_OUT:
return HISI_SAS_SATA_PROTOCOL_NONDATA;
default:
if (direction == DMA_NONE)


This patch has been resent.



------------------------------

Message: 6
Date: Fri, 5 Jan 2018 16:22:59 +0100
From: Kleber Souza <[hidden email]>
To: Colin King <[hidden email]>,
[hidden email]
Subject: Re: [PATCH 2/2][SRU][ARTFUL] block: cope with WRITE ZEROES
failing in blkdev_issue_zeroout()
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

On 11/21/17 18:05, Colin King wrote:
From: Ilya Dryomov <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1726818

sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
is set.  Because REQ_OP_WRITE_ZEROES is implemented in terms of WRITE
SAME, blkdev_issue_zeroout() may fail with -EREMOTEIO:

$ fallocate -zn -l 1k /dev/sdg
fallocate: fallocate failed: Remote I/O error
$ fallocate -zn -l 1k /dev/sdg  # OK
$ fallocate -zn -l 1k /dev/sdg  # OK

The following calls succeed because sd_done() sets ->no_write_same in
response to a sense that would become BLK_STS_TARGET/-EREMOTEIO, causing
__blkdev_issue_zeroout() to fall back to generating ZERO_PAGE bios.

This means blkdev_issue_zeroout() must cope with WRITE ZEROES failing
and fall back to manually zeroing, unless BLKDEV_ZERO_NOFALLBACK is
specified.  For BLKDEV_ZERO_NOFALLBACK case, return -EOPNOTSUPP if
sd_done() has just set ->no_write_same thus indicating lack of offload
support.

Fixes: c20cfc27a473 ("block: stop using blkdev_issue_write_same for zeroing")
Cc: Hannes Reinecke <[hidden email]>
Reviewed-by: Christoph Hellwig <[hidden email]>
Reviewed-by: Martin K. Petersen <[hidden email]>
Signed-off-by: Ilya Dryomov <[hidden email]>
Signed-off-by: Jens Axboe <[hidden email]>

Hi Colin,

This patch is missing the "backported/cherry picked from" tag and your SOB.

The first patch of the series has you as the author, but mainline commit
425a4dba7953e35ffd096771973add6d2f40d2ed has "Ilya Dryomov
<[hidden email]>" as author. This we can fix when applying the
patch, but the SOB for the second one needs to come from you.

Thanks,
Kleber

---
block/blk-lib.c | 45 +++++++++++++++++++++++++++++++++++----------
1 file changed, 35 insertions(+), 10 deletions(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index 4ef942c..595517c 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -321,12 +321,6 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev,
*  Zero-fill a block range, either using hardware offload or by explicitly
*  writing zeroes to the device.
*
- *  Note that this function may fail with -EOPNOTSUPP if the driver signals
- *  zeroing offload support, but the device fails to process the command (for
- *  some devices there is no non-destructive way to verify whether this
- *  operation is actually supported).  In this case the caller should call
- *  retry the call to blkdev_issue_zeroout() and the fallback path will be used.
- *
*  If a device is using logical block provisioning, the underlying space will
*  not be released if %flags contains BLKDEV_ZERO_NOUNMAP.
*
@@ -370,18 +364,49 @@ EXPORT_SYMBOL(__blkdev_issue_zeroout);
int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
sector_t nr_sects, gfp_t gfp_mask, unsigned flags)
{
- int ret;
- struct bio *bio = NULL;
+ int ret = 0;
+ sector_t bs_mask;
+ struct bio *bio;
struct blk_plug plug;
+ bool try_write_zeroes = !!bdev_write_zeroes_sectors(bdev);

+ bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1;
+ if ((sector | nr_sects) & bs_mask)
+ return -EINVAL;
+
+retry:
+ bio = NULL;
blk_start_plug(&plug);
- ret = __blkdev_issue_zeroout(bdev, sector, nr_sects, gfp_mask,
- &bio, flags);
+ if (try_write_zeroes) {
+ ret = __blkdev_issue_write_zeroes(bdev, sector, nr_sects,
+  gfp_mask, &bio, flags);
+ } else if (!(flags & BLKDEV_ZERO_NOFALLBACK)) {
+ ret = __blkdev_issue_zero_pages(bdev, sector, nr_sects,
+ gfp_mask, &bio);
+ } else {
+ /* No zeroing offload support */
+ ret = -EOPNOTSUPP;
+ }
if (ret == 0 && bio) {
ret = submit_bio_wait(bio);
bio_put(bio);
}
blk_finish_plug(&plug);
+ if (ret && try_write_zeroes) {
+ if (!(flags & BLKDEV_ZERO_NOFALLBACK)) {
+ try_write_zeroes = false;
+ goto retry;
+ }
+ if (!bdev_write_zeroes_sectors(bdev)) {
+ /*
+ * Zeroing offload support was indicated, but the
+ * device reported ILLEGAL REQUEST (for some devices
+ * there is no non-destructive way to verify whether
+ * WRITE ZEROES is actually supported).
+ */
+ ret = -EOPNOTSUPP;
+ }
+ }

return ret;
}




------------------------------

Message: 7
Date: Fri, 5 Jan 2018 15:29:07 +0000
From: Colin Ian King <[hidden email]>
To: Kleber Souza <[hidden email]>,
[hidden email]
Subject: Re: [PATCH 2/2][SRU][ARTFUL] block: cope with WRITE ZEROES
failing in blkdev_issue_zeroout()
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8

On 05/01/18 15:22, Kleber Souza wrote:
On 11/21/17 18:05, Colin King wrote:
From: Ilya Dryomov <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1726818

sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to
permit trying WRITE SAME on older SCSI devices, unless ->no_write_same
is set.  Because REQ_OP_WRITE_ZEROES is implemented in terms of WRITE
SAME, blkdev_issue_zeroout() may fail with -EREMOTEIO:

$ fallocate -zn -l 1k /dev/sdg
fallocate: fallocate failed: Remote I/O error
$ fallocate -zn -l 1k /dev/sdg  # OK
$ fallocate -zn -l 1k /dev/sdg  # OK

The following calls succeed because sd_done() sets ->no_write_same in
response to a sense that would become BLK_STS_TARGET/-EREMOTEIO, causing
__blkdev_issue_zeroout() to fall back to generating ZERO_PAGE bios.

This means blkdev_issue_zeroout() must cope with WRITE ZEROES failing
and fall back to manually zeroing, unless BLKDEV_ZERO_NOFALLBACK is
specified.  For BLKDEV_ZERO_NOFALLBACK case, return -EOPNOTSUPP if
sd_done() has just set ->no_write_same thus indicating lack of offload
support.

Fixes: c20cfc27a473 ("block: stop using blkdev_issue_write_same for zeroing")
Cc: Hannes Reinecke <[hidden email]>
Reviewed-by: Christoph Hellwig <[hidden email]>
Reviewed-by: Martin K. Petersen <[hidden email]>
Signed-off-by: Ilya Dryomov <[hidden email]>
Signed-off-by: Jens Axboe <[hidden email]>

Hi Colin,

This patch is missing the "backported/cherry picked from" tag and your SOB.

Do you mind adding the following lines before applying patch:

(cherry picked from upstream commit
d5ce4c31d6df518dd8f63bbae20d7423c5018a6c)
Signed-off-by: Colin Ian King <[hidden email]>


The first patch of the series has you as the author, but mainline commit
425a4dba7953e35ffd096771973add6d2f40d2ed has "Ilya Dryomov
<[hidden email]>" as author. This we can fix when applying the
patch, but the SOB for the second one needs to come from you.

Thanks,
Kleber

---
block/blk-lib.c | 45 +++++++++++++++++++++++++++++++++++----------
1 file changed, 35 insertions(+), 10 deletions(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index 4ef942c..595517c 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -321,12 +321,6 @@ static int __blkdev_issue_zero_pages(struct block_device *bdev,
*  Zero-fill a block range, either using hardware offload or by explicitly
*  writing zeroes to the device.
*
- *  Note that this function may fail with -EOPNOTSUPP if the driver signals
- *  zeroing offload support, but the device fails to process the command (for
- *  some devices there is no non-destructive way to verify whether this
- *  operation is actually supported).  In this case the caller should call
- *  retry the call to blkdev_issue_zeroout() and the fallback path will be used.
- *
*  If a device is using logical block provisioning, the underlying space will
*  not be released if %flags contains BLKDEV_ZERO_NOUNMAP.
*
@@ -370,18 +364,49 @@ EXPORT_SYMBOL(__blkdev_issue_zeroout);
int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
sector_t nr_sects, gfp_t gfp_mask, unsigned flags)
{
- int ret;
- struct bio *bio = NULL;
+ int ret = 0;
+ sector_t bs_mask;
+ struct bio *bio;
struct blk_plug plug;
+ bool try_write_zeroes = !!bdev_write_zeroes_sectors(bdev);

+ bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1;
+ if ((sector | nr_sects) & bs_mask)
+ return -EINVAL;
+
+retry:
+ bio = NULL;
blk_start_plug(&plug);
- ret = __blkdev_issue_zeroout(bdev, sector, nr_sects, gfp_mask,
- &bio, flags);
+ if (try_write_zeroes) {
+ ret = __blkdev_issue_write_zeroes(bdev, sector, nr_sects,
+  gfp_mask, &bio, flags);
+ } else if (!(flags & BLKDEV_ZERO_NOFALLBACK)) {
+ ret = __blkdev_issue_zero_pages(bdev, sector, nr_sects,
+ gfp_mask, &bio);
+ } else {
+ /* No zeroing offload support */
+ ret = -EOPNOTSUPP;
+ }
if (ret == 0 && bio) {
ret = submit_bio_wait(bio);
bio_put(bio);
}
blk_finish_plug(&plug);
+ if (ret && try_write_zeroes) {
+ if (!(flags & BLKDEV_ZERO_NOFALLBACK)) {
+ try_write_zeroes = false;
+ goto retry;
+ }
+ if (!bdev_write_zeroes_sectors(bdev)) {
+ /*
+ * Zeroing offload support was indicated, but the
+ * device reported ILLEGAL REQUEST (for some devices
+ * there is no non-destructive way to verify whether
+ * WRITE ZEROES is actually supported).
+ */
+ ret = -EOPNOTSUPP;
+ }
+ }

return ret;
}






------------------------------

Subject: Digest Footer

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team


------------------------------

End of kernel-team Digest, Vol 156, Issue 21
********************************************


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team