* [PATCH AUTOSEL 5.4 1/5] pstore/ram: Rate-limit "uncorrectable error in header" message
@ 2021-03-07 13:58 Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 2/5] tracing: Skip selftests if tracing is disabled Sasha Levin
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Sasha Levin @ 2021-03-07 13:58 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Dmitry Osipenko, Kees Cook, Sasha Levin
From: Dmitry Osipenko <digetx@gmail.com>
[ Upstream commit 7db688e99c0f770ae73e0f1f3fb67f9b64266445 ]
There is a quite huge "uncorrectable error in header" flood in KMSG
on a clean system boot since there is no pstore buffer saved in RAM.
Let's silence the redundant noisy messages by rate-limiting the printk
message. Now there are maximum 10 messages printed repeatedly instead
of 35+.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210302095850.30894-1-digetx@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/pstore/ram_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index 1f4d8c06f9be..4cb0478a17f8 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -246,7 +246,7 @@ static int persistent_ram_init_ecc(struct persistent_ram_zone *prz,
pr_info("error in header, %d\n", numerr);
prz->corrected_bytes += numerr;
} else if (numerr < 0) {
- pr_info("uncorrectable error in header\n");
+ pr_info_ratelimited("uncorrectable error in header\n");
prz->bad_blocks++;
}
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.4 2/5] tracing: Skip selftests if tracing is disabled
2021-03-07 13:58 [PATCH AUTOSEL 5.4 1/5] pstore/ram: Rate-limit "uncorrectable error in header" message Sasha Levin
@ 2021-03-07 13:58 ` Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 3/5] nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST Sasha Levin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-03-07 13:58 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Steven Rostedt (VMware), Sasha Levin
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
[ Upstream commit ee666a185558ac9a929e53b902a568442ed62416 ]
If tracing is disabled for some reason (traceoff_on_warning, command line,
etc), the ftrace selftests are guaranteed to fail, as their results are
defined by trace data in the ring buffers. If the ring buffers are turned
off, the tests will fail, due to lack of data.
Because tracing being disabled is for a specific reason (warning, user
decided to, etc), it does not make sense to enable tracing to run the self
tests, as the test output may corrupt the reason for the tracing to be
disabled.
Instead, simply skip the self tests and report that they are being skipped
due to tracing being disabled.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/trace/trace.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 1a75610f5f57..91c722213431 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1679,6 +1679,12 @@ static int run_tracer_selftest(struct tracer *type)
if (!selftests_can_run)
return save_selftest(type);
+ if (!tracing_is_on()) {
+ pr_warn("Selftest for tracer %s skipped due to tracing disabled\n",
+ type->name);
+ return 0;
+ }
+
/*
* Run a selftest on this tracer.
* Here we reset the trace buffer, and set the current
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.4 3/5] nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST.
2021-03-07 13:58 [PATCH AUTOSEL 5.4 1/5] pstore/ram: Rate-limit "uncorrectable error in header" message Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 2/5] tracing: Skip selftests if tracing is disabled Sasha Levin
@ 2021-03-07 13:58 ` Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 4/5] nvme-pci: add quirks for Lexar 256GB SSD Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 5/5] nvme-fabrics: fix kato initialization Sasha Levin
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-03-07 13:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Julian Einwag, Christoph Hellwig, Keith Busch, Sasha Levin,
linux-nvme
From: Julian Einwag <jeinwag-nvme@marcapo.com>
[ Upstream commit 5e112d3fb89703a4981ded60561b5647db3693bf ]
The kernel fails to fully detect these SSDs, only the character devices
are present:
[ 10.785605] nvme nvme0: pci function 0000:04:00.0
[ 10.876787] nvme nvme1: pci function 0000:81:00.0
[ 13.198614] nvme nvme0: missing or invalid SUBNQN field.
[ 13.198658] nvme nvme1: missing or invalid SUBNQN field.
[ 13.206896] nvme nvme0: Shutdown timeout set to 20 seconds
[ 13.215035] nvme nvme1: Shutdown timeout set to 20 seconds
[ 13.225407] nvme nvme0: 16/0/0 default/read/poll queues
[ 13.233602] nvme nvme1: 16/0/0 default/read/poll queues
[ 13.239627] nvme nvme0: Identify Descriptors failed (8194)
[ 13.246315] nvme nvme1: Identify Descriptors failed (8194)
Adding the NVME_QUIRK_NO_NS_DESC_LIST fixes this problem.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205679
Signed-off-by: Julian Einwag <jeinwag-nvme@marcapo.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/nvme/host/pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index abc342db3b33..197a5cd253c3 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3164,7 +3164,8 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST, },
{ PCI_DEVICE(0x1bb1, 0x0100), /* Seagate Nytro Flash Storage */
- .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
+ .driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY |
+ NVME_QUIRK_NO_NS_DESC_LIST, },
{ PCI_DEVICE(0x1c58, 0x0003), /* HGST adapter */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY, },
{ PCI_DEVICE(0x1c58, 0x0023), /* WDC SN200 adapter */
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.4 4/5] nvme-pci: add quirks for Lexar 256GB SSD
2021-03-07 13:58 [PATCH AUTOSEL 5.4 1/5] pstore/ram: Rate-limit "uncorrectable error in header" message Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 2/5] tracing: Skip selftests if tracing is disabled Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 3/5] nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST Sasha Levin
@ 2021-03-07 13:58 ` Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 5/5] nvme-fabrics: fix kato initialization Sasha Levin
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-03-07 13:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pascal Terjan, Christoph Hellwig, Sasha Levin, linux-nvme
From: Pascal Terjan <pterjan@google.com>
[ Upstream commit 6e6a6828c517fb6819479bf5187df5f39084eb9e ]
Add the NVME_QUIRK_NO_NS_DESC_LIST and NVME_QUIRK_IGNORE_DEV_SUBNQN
quirks for this buggy device.
Reported and tested in https://bugs.mageia.org/show_bug.cgi?id=28417
Signed-off-by: Pascal Terjan <pterjan@google.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/nvme/host/pci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 197a5cd253c3..fc18738dcf8f 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3179,6 +3179,9 @@ static const struct pci_device_id nvme_id_table[] = {
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */
.driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
+ { PCI_DEVICE(0x1b4b, 0x1092), /* Lexar 256 GB SSD */
+ .driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
+ NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1d1d, 0x1f1f), /* LighNVM qemu device */
.driver_data = NVME_QUIRK_LIGHTNVM, },
{ PCI_DEVICE(0x1d1d, 0x2807), /* CNEX WL */
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.4 5/5] nvme-fabrics: fix kato initialization
2021-03-07 13:58 [PATCH AUTOSEL 5.4 1/5] pstore/ram: Rate-limit "uncorrectable error in header" message Sasha Levin
` (2 preceding siblings ...)
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 4/5] nvme-pci: add quirks for Lexar 256GB SSD Sasha Levin
@ 2021-03-07 13:58 ` Sasha Levin
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2021-03-07 13:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Martin George, Christoph Hellwig, Sasha Levin, linux-nvme
From: Martin George <marting@netapp.com>
[ Upstream commit 32feb6de47242e54692eceab52cfae8616aa0518 ]
Currently kato is initialized to NVME_DEFAULT_KATO for both
discovery & i/o controllers. This is a problem specifically
for non-persistent discovery controllers since it always ends
up with a non-zero kato value. Fix this by initializing kato
to zero instead, and ensuring various controllers are assigned
appropriate kato values as follows:
non-persistent controllers - kato set to zero
persistent controllers - kato set to NVMF_DEV_DISC_TMO
(or any positive int via nvme-cli)
i/o controllers - kato set to NVME_DEFAULT_KATO
(or any positive int via nvme-cli)
Signed-off-by: Martin George <marting@netapp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/nvme/host/fabrics.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 3bb71f177dfd..8a2c5587def9 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -632,7 +632,7 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
opts->queue_size = NVMF_DEF_QUEUE_SIZE;
opts->nr_io_queues = num_online_cpus();
opts->reconnect_delay = NVMF_DEF_RECONNECT_DELAY;
- opts->kato = NVME_DEFAULT_KATO;
+ opts->kato = 0;
opts->duplicate_connect = false;
opts->hdr_digest = false;
opts->data_digest = false;
@@ -883,6 +883,9 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
opts->nr_write_queues = 0;
opts->nr_poll_queues = 0;
opts->duplicate_connect = true;
+ } else {
+ if (!opts->kato)
+ opts->kato = NVME_DEFAULT_KATO;
}
if (ctrl_loss_tmo < 0)
opts->max_reconnects = -1;
--
2.30.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-07 13:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-07 13:58 [PATCH AUTOSEL 5.4 1/5] pstore/ram: Rate-limit "uncorrectable error in header" message Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 2/5] tracing: Skip selftests if tracing is disabled Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 3/5] nvme-pci: mark Seagate Nytro XM1440 as QUIRK_NO_NS_DESC_LIST Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 4/5] nvme-pci: add quirks for Lexar 256GB SSD Sasha Levin
2021-03-07 13:58 ` [PATCH AUTOSEL 5.4 5/5] nvme-fabrics: fix kato initialization Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox