Debrand for AlmaLinux OS
Use AlmaLinux OS secure boot cert Enable Btrfs support for all kernel variants hpsa: bring back deprecated PCI ids #CFHack #CFHack2024 mptsas: bring back deprecated PCI ids #CFHack #CFHack2024 megaraid_sas: bring back deprecated PCI ids #CFHack #CFHack2024 qla2xxx: bring back deprecated PCI ids #CFHack #CFHack2024 qla4xxx: bring back deprecated PCI ids be2iscsi: bring back deprecated PCI ids kernel/rh_messages.h: enable all disabled pci devices by moving to unmaintained
This commit is contained in:
parent
2fc0976aca
commit
035d1ef576
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,10 +1,12 @@
|
||||
fedoraimaca.x509
|
||||
kernel-abi-stablelists-6.12.0-211.7.1.el10_2.tar.xz
|
||||
kernel-kabi-dw-6.12.0-211.7.1.el10_2.tar.xz
|
||||
linux-6.12.0-211.7.1.el10_2.tar.xz
|
||||
kernel-abi-stablelists-6.12.0-211.34.1.el10_2.tar.xz
|
||||
kernel-kabi-dw-6.12.0-211.34.1.el10_2.tar.xz
|
||||
linux-6.12.0-211.34.1.el10_2.tar.xz
|
||||
nvidiabfdpu.x509
|
||||
nvidiagpuoot001.x509
|
||||
nvidiajetsonsoc.x509
|
||||
olima1.x509
|
||||
olimaca1.x509
|
||||
redhatsecureboot501.cer
|
||||
redhatsecureboot504.cer
|
||||
redhatsecurebootca5.cer
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
From 3da1fdf4efbc490041eb4f836bf596201203f8f2 Mon Sep 17 00:00:00 2001
|
||||
From: Asim Viladi Oglu Manizada <manizada@pm.me>
|
||||
Date: Sat, 16 May 2026 21:15:39 +0000
|
||||
Subject: smb: client: reject userspace cifs.spnego descriptions
|
||||
|
||||
cifs.spnego key descriptions contain authority-bearing fields such as
|
||||
pid, uid, creduid, and upcall_target that cifs.upcall treats as
|
||||
kernel-originating inputs. However, userspace can also create keys of
|
||||
this type through request_key(2) or add_key(2), allowing those fields to
|
||||
be supplied without CIFS origin.
|
||||
|
||||
Only accept cifs.spnego descriptions while CIFS is using its private
|
||||
spnego_cred to request the key.
|
||||
|
||||
Fixes: f1d662a7d5e5 ("[CIFS] Add upcall files for cifs to use spnego/kerberos")
|
||||
Assisted-by: avom-custom-harness:gpt-5.5-qwen3.6-mod-mix
|
||||
Reviewed-by: David Howells <dhowells@redhat.com>
|
||||
Signed-off-by: Asim Viladi Oglu Manizada <manizada@pm.me>
|
||||
Signed-off-by: Steve French <stfrench@microsoft.com>
|
||||
---
|
||||
fs/smb/client/cifs_spnego.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/fs/smb/client/cifs_spnego.c b/fs/smb/client/cifs_spnego.c
|
||||
index 3a41bbada04c76..44c40727568042 100644
|
||||
--- a/fs/smb/client/cifs_spnego.c
|
||||
+++ b/fs/smb/client/cifs_spnego.c
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/list.h>
|
||||
+#include <linux/cred.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <keys/user-type.h>
|
||||
@@ -40,12 +41,27 @@ cifs_spnego_key_destroy(struct key *key)
|
||||
kfree(key->payload.data[0]);
|
||||
}
|
||||
|
||||
+static int
|
||||
+cifs_spnego_key_vet_description(const char *description)
|
||||
+{
|
||||
+ /*
|
||||
+ * cifs.spnego descriptions are authority-bearing inputs to cifs.upcall.
|
||||
+ * They are only valid when produced by CIFS while using the private
|
||||
+ * spnego_cred installed below. Do not let userspace create this type
|
||||
+ * of key through request_key(2)/add_key(2), since the helper treats
|
||||
+ * pid/uid/creduid/upcall_target as kernel-originating fields.
|
||||
+ */
|
||||
+ if (current_cred() != spnego_cred)
|
||||
+ return -EPERM;
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
/*
|
||||
* keytype for CIFS spnego keys
|
||||
*/
|
||||
struct key_type cifs_spnego_key_type = {
|
||||
.name = "cifs.spnego",
|
||||
+ .vet_description = cifs_spnego_key_vet_description,
|
||||
.instantiate = cifs_spnego_key_instantiate,
|
||||
.destroy = cifs_spnego_key_destroy,
|
||||
.describe = user_describe,
|
||||
--
|
||||
cgit 1.3-korg
|
||||
|
||||
@ -1,89 +0,0 @@
|
||||
From ff57186b2cc39766672c4c0332323933e5faaa88 Mon Sep 17 00:00:00 2001
|
||||
From: William Liu <will@willsroot.io>
|
||||
Date: Tue, 19 Aug 2025 03:36:28 +0000
|
||||
Subject: [PATCH] net/sched: Make cake_enqueue return NET_XMIT_CN when past
|
||||
buffer_limit
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
[ Upstream commit 15de71d06a400f7fdc15bf377a2552b0ec437cf5 ]
|
||||
|
||||
The following setup can trigger a WARNING in htb_activate due to
|
||||
the condition: !cl->leaf.q->q.qlen
|
||||
|
||||
tc qdisc del dev lo root
|
||||
tc qdisc add dev lo root handle 1: htb default 1
|
||||
tc class add dev lo parent 1: classid 1:1 \
|
||||
htb rate 64bit
|
||||
tc qdisc add dev lo parent 1:1 handle f: \
|
||||
cake memlimit 1b
|
||||
ping -I lo -f -c1 -s64 -W0.001 127.0.0.1
|
||||
|
||||
This is because the low memlimit leads to a low buffer_limit, which
|
||||
causes packet dropping. However, cake_enqueue still returns
|
||||
NET_XMIT_SUCCESS, causing htb_enqueue to call htb_activate with an
|
||||
empty child qdisc. We should return NET_XMIT_CN when packets are
|
||||
dropped from the same tin and flow.
|
||||
|
||||
I do not believe return value of NET_XMIT_CN is necessary for packet
|
||||
drops in the case of ack filtering, as that is meant to optimize
|
||||
performance, not to signal congestion.
|
||||
|
||||
Fixes: 046f6fd5daef ("sched: Add Common Applications Kept Enhanced (cake) qdisc")
|
||||
Signed-off-by: William Liu <will@willsroot.io>
|
||||
Reviewed-by: Savino Dicanosa <savy@syst3mfailure.io>
|
||||
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
|
||||
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
|
||||
Link: https://patch.msgid.link/20250819033601.579821-1-will@willsroot.io
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
|
||||
index 2c2e2a67f3b2..6cbe8a7a0e5c 100644
|
||||
--- a/net/sched/sch_cake.c
|
||||
+++ b/net/sched/sch_cake.c
|
||||
@@ -1745,7 +1745,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
ktime_t now = ktime_get();
|
||||
struct cake_tin_data *b;
|
||||
struct cake_flow *flow;
|
||||
- u32 idx;
|
||||
+ u32 idx, tin;
|
||||
|
||||
/* choose flow to insert into */
|
||||
idx = cake_classify(sch, &b, skb, q->flow_mode, &ret);
|
||||
@@ -1755,6 +1755,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
__qdisc_drop(skb, to_free);
|
||||
return ret;
|
||||
}
|
||||
+ tin = (u32)(b - q->tins);
|
||||
idx--;
|
||||
flow = &b->flows[idx];
|
||||
|
||||
@@ -1922,13 +1923,22 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
q->buffer_max_used = q->buffer_used;
|
||||
|
||||
if (q->buffer_used > q->buffer_limit) {
|
||||
+ bool same_flow = false;
|
||||
u32 dropped = 0;
|
||||
+ u32 drop_id;
|
||||
|
||||
while (q->buffer_used > q->buffer_limit) {
|
||||
dropped++;
|
||||
- cake_drop(sch, to_free);
|
||||
+ drop_id = cake_drop(sch, to_free);
|
||||
+
|
||||
+ if ((drop_id >> 16) == tin &&
|
||||
+ (drop_id & 0xFFFF) == idx)
|
||||
+ same_flow = true;
|
||||
}
|
||||
b->drop_overlimit += dropped;
|
||||
+
|
||||
+ if (same_flow)
|
||||
+ return NET_XMIT_CN;
|
||||
}
|
||||
return NET_XMIT_SUCCESS;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,118 +0,0 @@
|
||||
|
||||
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
|
||||
index aa9f31e..ef51a9e 100644
|
||||
--- a/net/sched/sch_cake.c
|
||||
+++ b/net/sched/sch_cake.c
|
||||
@@ -1594,7 +1594,6 @@ static unsigned int cake_drop(struct Qdisc *sch, struct sk_buff **to_free)
|
||||
|
||||
qdisc_drop_reason(skb, sch, to_free, SKB_DROP_REASON_QDISC_OVERLIMIT);
|
||||
sch->q.qlen--;
|
||||
- qdisc_tree_reduce_backlog(sch, 1, len);
|
||||
|
||||
cake_heapify(q, 0);
|
||||
|
||||
@@ -1740,14 +1739,14 @@ static void cake_reconfigure(struct Qdisc *sch);
|
||||
static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
struct sk_buff **to_free)
|
||||
{
|
||||
+ u32 idx, tin, prev_qlen, prev_backlog, drop_id;
|
||||
struct cake_sched_data *q = qdisc_priv(sch);
|
||||
- int len = qdisc_pkt_len(skb);
|
||||
- int ret;
|
||||
+ int len = qdisc_pkt_len(skb), ret;
|
||||
struct sk_buff *ack = NULL;
|
||||
ktime_t now = ktime_get();
|
||||
struct cake_tin_data *b;
|
||||
struct cake_flow *flow;
|
||||
- u32 idx, tin;
|
||||
+ bool same_flow = false;
|
||||
|
||||
/* choose flow to insert into */
|
||||
idx = cake_classify(sch, &b, skb, q->flow_mode, &ret);
|
||||
@@ -1820,6 +1819,8 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
consume_skb(skb);
|
||||
} else {
|
||||
/* not splitting */
|
||||
+ int ack_pkt_len = 0;
|
||||
+
|
||||
cobalt_set_enqueue_time(skb, now);
|
||||
get_cobalt_cb(skb)->adjusted_len = cake_overhead(q, skb);
|
||||
flow_queue_add(flow, skb);
|
||||
@@ -1830,13 +1831,13 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
if (ack) {
|
||||
b->ack_drops++;
|
||||
sch->qstats.drops++;
|
||||
- b->bytes += qdisc_pkt_len(ack);
|
||||
- len -= qdisc_pkt_len(ack);
|
||||
+ ack_pkt_len = qdisc_pkt_len(ack);
|
||||
+ b->bytes += ack_pkt_len;
|
||||
q->buffer_used += skb->truesize - ack->truesize;
|
||||
if (q->rate_flags & CAKE_FLAG_INGRESS)
|
||||
cake_advance_shaper(q, b, ack, now, true);
|
||||
|
||||
- qdisc_tree_reduce_backlog(sch, 1, qdisc_pkt_len(ack));
|
||||
+ qdisc_tree_reduce_backlog(sch, 1, ack_pkt_len);
|
||||
consume_skb(ack);
|
||||
} else {
|
||||
sch->q.qlen++;
|
||||
@@ -1845,11 +1846,11 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
|
||||
/* stats */
|
||||
b->packets++;
|
||||
- b->bytes += len;
|
||||
- b->backlogs[idx] += len;
|
||||
- b->tin_backlog += len;
|
||||
- sch->qstats.backlog += len;
|
||||
- q->avg_window_bytes += len;
|
||||
+ b->bytes += len - ack_pkt_len;
|
||||
+ b->backlogs[idx] += len - ack_pkt_len;
|
||||
+ b->tin_backlog += len - ack_pkt_len;
|
||||
+ sch->qstats.backlog += len - ack_pkt_len;
|
||||
+ q->avg_window_bytes += len - ack_pkt_len;
|
||||
}
|
||||
|
||||
if (q->overflow_timeout)
|
||||
@@ -1924,24 +1925,29 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||
if (q->buffer_used > q->buffer_max_used)
|
||||
q->buffer_max_used = q->buffer_used;
|
||||
|
||||
- if (q->buffer_used > q->buffer_limit) {
|
||||
- bool same_flow = false;
|
||||
- u32 dropped = 0;
|
||||
- u32 drop_id;
|
||||
+ if (q->buffer_used <= q->buffer_limit)
|
||||
+ return NET_XMIT_SUCCESS;
|
||||
|
||||
- while (q->buffer_used > q->buffer_limit) {
|
||||
- dropped++;
|
||||
- drop_id = cake_drop(sch, to_free);
|
||||
+ prev_qlen = sch->q.qlen;
|
||||
+ prev_backlog = sch->qstats.backlog;
|
||||
|
||||
- if ((drop_id >> 16) == tin &&
|
||||
- (drop_id & 0xFFFF) == idx)
|
||||
- same_flow = true;
|
||||
- }
|
||||
- b->drop_overlimit += dropped;
|
||||
+ while (q->buffer_used > q->buffer_limit) {
|
||||
+ drop_id = cake_drop(sch, to_free);
|
||||
+ if ((drop_id >> 16) == tin &&
|
||||
+ (drop_id & 0xFFFF) == idx)
|
||||
+ same_flow = true;
|
||||
+ }
|
||||
+
|
||||
+ prev_qlen -= sch->q.qlen;
|
||||
+ prev_backlog -= sch->qstats.backlog;
|
||||
+ b->drop_overlimit += prev_qlen;
|
||||
|
||||
- if (same_flow)
|
||||
- return NET_XMIT_CN;
|
||||
+ if (same_flow) {
|
||||
+ qdisc_tree_reduce_backlog(sch, prev_qlen - 1,
|
||||
+ prev_backlog - len);
|
||||
+ return NET_XMIT_CN;
|
||||
}
|
||||
+ qdisc_tree_reduce_backlog(sch, prev_qlen, prev_backlog);
|
||||
return NET_XMIT_SUCCESS;
|
||||
}
|
||||
|
||||
@ -1,61 +0,0 @@
|
||||
From cd7786466db3f8e0004e2383a066b3c805643196 Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Fri, 8 Aug 2025 15:41:46 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: Support extended stats for Thor2 VF
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit 260ce16e579d375ba8f1ac945308343522f98d50
|
||||
Author: Ajit Khaparde <ajit.khaparde@broadcom.com>
|
||||
Date: Fri May 23 13:29:52 2025 +0530
|
||||
|
||||
RDMA/bnxt_re: Support extended stats for Thor2 VF
|
||||
|
||||
The driver currently checks if the user is querying VF RoCE statistics.
|
||||
It will not send the query_roce_stats_ext HWRM command if it is for a
|
||||
VF. But Thor2 VF can support extended statistics.
|
||||
Allow query of extended stats for Thor2 VFs.
|
||||
|
||||
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
|
||||
Signed-off-by: Shravya KN <shravya.k-n@broadcom.com>
|
||||
Link: https://patch.msgid.link/20250523075952.1267827-1-kalesh-anakkur.purayil@broadcom.com
|
||||
Reviewed-by: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
|
||||
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
|
||||
index 457eecb99f96..be34c605d516 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
|
||||
@@ -1113,7 +1113,7 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
|
||||
qp_flags |= CMDQ_CREATE_QP_QP_FLAGS_FORCE_COMPLETION;
|
||||
if (qp->wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE)
|
||||
qp_flags |= CMDQ_CREATE_QP_QP_FLAGS_VARIABLE_SIZED_WQE_ENABLED;
|
||||
- if (_is_ext_stats_supported(res->dattr->dev_cap_flags) && !res->is_vf)
|
||||
+ if (bnxt_ext_stats_supported(res->cctx, res->dattr->dev_cap_flags, res->is_vf))
|
||||
qp_flags |= CMDQ_CREATE_QP_QP_FLAGS_EXT_STATS_ENABLED;
|
||||
|
||||
req.qp_flags = cpu_to_le32(qp_flags);
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
|
||||
index f231e886ad9d..9efd32a3dc55 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
|
||||
@@ -846,7 +846,12 @@ int bnxt_qplib_qext_stat(struct bnxt_qplib_rcfw *rcfw, u32 fid,
|
||||
|
||||
req.resp_size = sbuf.size / BNXT_QPLIB_CMDQE_UNITS;
|
||||
req.resp_addr = cpu_to_le64(sbuf.dma_addr);
|
||||
- req.function_id = cpu_to_le32(fid);
|
||||
+ if (bnxt_qplib_is_chip_gen_p7(rcfw->res->cctx) && rcfw->res->is_vf)
|
||||
+ req.function_id =
|
||||
+ cpu_to_le32(CMDQ_QUERY_ROCE_STATS_EXT_VF_VALID |
|
||||
+ (fid << CMDQ_QUERY_ROCE_STATS_EXT_VF_NUM_SFT));
|
||||
+ else
|
||||
+ req.function_id = cpu_to_le32(fid);
|
||||
req.flags = cpu_to_le16(CMDQ_QUERY_ROCE_STATS_EXT_FLAGS_FUNCTION_ID);
|
||||
|
||||
bnxt_qplib_fill_cmdqmsg(&msg, &req, &resp, &sbuf, sizeof(req),
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
From b66389e5f1dea3e149fdf089036021e5ab3fc52d Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Fri, 8 Aug 2025 15:43:05 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: Fix size of uverbs_copy_to() in
|
||||
BNXT_RE_METHOD_GET_TOGGLE_MEM
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit 09d231ab569ca97478445ccc1ad44ab026de39b1
|
||||
Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Date: Fri Jul 4 10:08:55 2025 +0530
|
||||
|
||||
RDMA/bnxt_re: Fix size of uverbs_copy_to() in BNXT_RE_METHOD_GET_TOGGLE_MEM
|
||||
|
||||
Since both "length" and "offset" are of type u32, there is
|
||||
no functional issue here.
|
||||
|
||||
Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
|
||||
Signed-off-by: Shravya KN <shravya.k-n@broadcom.com>
|
||||
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Link: https://patch.msgid.link/20250704043857.19158-2-kalesh-anakkur.purayil@broadcom.com
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
|
||||
index 063801384b2b..3a627acb82ce 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
|
||||
@@ -4738,7 +4738,7 @@ static int UVERBS_HANDLER(BNXT_RE_METHOD_GET_TOGGLE_MEM)(struct uverbs_attr_bund
|
||||
return err;
|
||||
|
||||
err = uverbs_copy_to(attrs, BNXT_RE_TOGGLE_MEM_MMAP_OFFSET,
|
||||
- &offset, sizeof(length));
|
||||
+ &offset, sizeof(offset));
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,127 +0,0 @@
|
||||
From 36c9223728944bf2e60709bd6c233c9bc0d1b56e Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Fri, 8 Aug 2025 15:43:19 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: Support 2G message size
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit 0aed817380d620987b2d5c573fdd2f01c30976a4
|
||||
Author: Selvin Xavier <selvin.xavier@broadcom.com>
|
||||
Date: Fri Jul 4 10:08:56 2025 +0530
|
||||
|
||||
RDMA/bnxt_re: Support 2G message size
|
||||
|
||||
bnxt_qplib_put_sges is calculating the length in
|
||||
a signed int. So handling the 2G message size
|
||||
is not working since it is considered as negative.
|
||||
|
||||
Use a unsigned number to calculate the total message
|
||||
length. As per the spec, IB message size shall be
|
||||
between zero and 2^31 bytes (inclusive). So adding
|
||||
a check for 2G message size.
|
||||
|
||||
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
|
||||
Signed-off-by: Shravya KN <shravya.k-n@broadcom.com>
|
||||
Link: https://patch.msgid.link/20250704043857.19158-3-kalesh-anakkur.purayil@broadcom.com
|
||||
Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com>
|
||||
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
|
||||
index be34c605d516..dfe3177123e5 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c
|
||||
@@ -1750,9 +1750,9 @@ static void bnxt_qplib_fill_psn_search(struct bnxt_qplib_qp *qp,
|
||||
}
|
||||
}
|
||||
|
||||
-static int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
||||
- struct bnxt_qplib_swqe *wqe,
|
||||
- u16 *idx)
|
||||
+static unsigned int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
||||
+ struct bnxt_qplib_swqe *wqe,
|
||||
+ u32 *idx)
|
||||
{
|
||||
struct bnxt_qplib_hwq *hwq;
|
||||
int len, t_len, offt;
|
||||
@@ -1769,7 +1769,7 @@ static int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
||||
il_src = (void *)wqe->sg_list[indx].addr;
|
||||
t_len += len;
|
||||
if (t_len > qp->max_inline_data)
|
||||
- return -ENOMEM;
|
||||
+ return BNXT_RE_INVAL_MSG_SIZE;
|
||||
while (len) {
|
||||
if (pull_dst) {
|
||||
pull_dst = false;
|
||||
@@ -1795,9 +1795,9 @@ static int bnxt_qplib_put_inline(struct bnxt_qplib_qp *qp,
|
||||
return t_len;
|
||||
}
|
||||
|
||||
-static u32 bnxt_qplib_put_sges(struct bnxt_qplib_hwq *hwq,
|
||||
- struct bnxt_qplib_sge *ssge,
|
||||
- u16 nsge, u16 *idx)
|
||||
+static unsigned int bnxt_qplib_put_sges(struct bnxt_qplib_hwq *hwq,
|
||||
+ struct bnxt_qplib_sge *ssge,
|
||||
+ u32 nsge, u32 *idx)
|
||||
{
|
||||
struct sq_sge *dsge;
|
||||
int indx, len = 0;
|
||||
@@ -1878,14 +1878,12 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp,
|
||||
struct bnxt_qplib_hwq *hwq;
|
||||
struct bnxt_qplib_swq *swq;
|
||||
bool sch_handler = false;
|
||||
+ u32 wqe_idx, slots, idx;
|
||||
u16 wqe_sz, qdf = 0;
|
||||
bool msn_update;
|
||||
void *base_hdr;
|
||||
void *ext_hdr;
|
||||
__le32 temp32;
|
||||
- u32 wqe_idx;
|
||||
- u32 slots;
|
||||
- u16 idx;
|
||||
|
||||
hwq = &sq->hwq;
|
||||
if (qp->state != CMDQ_MODIFY_QP_NEW_STATE_RTS &&
|
||||
@@ -1937,8 +1935,10 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp,
|
||||
else
|
||||
data_len = bnxt_qplib_put_sges(hwq, wqe->sg_list, wqe->num_sge,
|
||||
&idx);
|
||||
- if (data_len < 0)
|
||||
- goto queue_err;
|
||||
+ if (data_len > BNXT_RE_MAX_MSG_SIZE) {
|
||||
+ rc = -EINVAL;
|
||||
+ goto done;
|
||||
+ }
|
||||
/* Make sure we update MSN table only for wired wqes */
|
||||
msn_update = true;
|
||||
/* Specifics */
|
||||
@@ -2139,8 +2139,8 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp,
|
||||
struct bnxt_qplib_hwq *hwq;
|
||||
struct bnxt_qplib_swq *swq;
|
||||
bool sch_handler = false;
|
||||
- u16 wqe_sz, idx;
|
||||
- u32 wqe_idx;
|
||||
+ u32 wqe_idx, idx;
|
||||
+ u16 wqe_sz;
|
||||
int rc = 0;
|
||||
|
||||
hwq = &rq->hwq;
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.h b/drivers/infiniband/hw/bnxt_re/qplib_fp.h
|
||||
index 0d9487c889ff..ab125f1d949e 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/qplib_fp.h
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.h
|
||||
@@ -346,6 +346,9 @@ struct bnxt_qplib_qp {
|
||||
u8 tos_dscp;
|
||||
};
|
||||
|
||||
+#define BNXT_RE_MAX_MSG_SIZE 0x80000000
|
||||
+#define BNXT_RE_INVAL_MSG_SIZE 0xFFFFFFFF
|
||||
+
|
||||
#define BNXT_QPLIB_MAX_CQE_ENTRY_SIZE sizeof(struct cq_base)
|
||||
|
||||
#define CQE_CNT_PER_PG (PAGE_SIZE / BNXT_QPLIB_MAX_CQE_ENTRY_SIZE)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
From c610161ea1b9940dbfa17cbab72bf8c945145dea Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Fri, 8 Aug 2025 15:43:30 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: Use macro instead of hard coded value
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit 7788278ff267f831bab39a377beaa7e08d79c2a9
|
||||
Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Date: Fri Jul 4 10:08:57 2025 +0530
|
||||
|
||||
RDMA/bnxt_re: Use macro instead of hard coded value
|
||||
|
||||
1. Defined a macro for the hard coded value.
|
||||
2. "access" field in the request structure is of type "u8".
|
||||
Updated the mask accordingly.
|
||||
|
||||
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Signed-off-by: Shravya KN <shravya.k-n@broadcom.com>
|
||||
Link: https://patch.msgid.link/20250704043857.19158-4-kalesh-anakkur.purayil@broadcom.com
|
||||
Reviewed-by: Hongguang Gao <hongguang.gao@broadcom.com>
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.c b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
|
||||
index 9efd32a3dc55..68981399598d 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.c
|
||||
@@ -674,7 +674,7 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr,
|
||||
req.log2_pbl_pg_size = cpu_to_le16(((ilog2(PAGE_SIZE) <<
|
||||
CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_SFT) &
|
||||
CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_MASK));
|
||||
- req.access = (mr->access_flags & 0xFFFF);
|
||||
+ req.access = (mr->access_flags & BNXT_QPLIB_MR_ACCESS_MASK);
|
||||
req.va = cpu_to_le64(mr->va);
|
||||
req.key = cpu_to_le32(mr->lkey);
|
||||
if (_is_alloc_mr_unified(res->dattr->dev_cap_flags))
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_sp.h b/drivers/infiniband/hw/bnxt_re/qplib_sp.h
|
||||
index e626b05038a1..09faf4a1e849 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/qplib_sp.h
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/qplib_sp.h
|
||||
@@ -111,6 +111,7 @@ struct bnxt_qplib_mrw {
|
||||
struct bnxt_qplib_pd *pd;
|
||||
int type;
|
||||
u32 access_flags;
|
||||
+#define BNXT_QPLIB_MR_ACCESS_MASK 0xFF
|
||||
#define BNXT_QPLIB_FR_PMR 0x80000000
|
||||
u32 lkey;
|
||||
u32 rkey;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,56 +0,0 @@
|
||||
From 57b1289801efb0d9e4c93131706522d79aee7fe3 Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Tue, 19 Aug 2025 13:02:23 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: Fix incorrect display of inactivity_cp in
|
||||
debugfs output
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit 58d7a965bb2b014d467445d38cdb07099b1f0f77
|
||||
Author: Gautam R A <gautam-r.a@broadcom.com>
|
||||
Date: Tue May 20 09:29:07 2025 +0530
|
||||
|
||||
RDMA/bnxt_re: Fix incorrect display of inactivity_cp in debugfs output
|
||||
|
||||
The inactivity_cp parameter in debugfs was not being read or
|
||||
written correctly, resulting in "Invalid argument" errors.
|
||||
|
||||
Fixed this by ensuring proper mapping of inactivity_cp in
|
||||
both the map_cc_config_offset_gen0_ext0 and
|
||||
bnxt_re_fill_gen0_ext0() functions.
|
||||
|
||||
Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
|
||||
Signed-off-by: Gautam R A <gautam-r.a@broadcom.com>
|
||||
Link: https://patch.msgid.link/20250520035910.1061918-2-kalesh-anakkur.purayil@broadcom.com
|
||||
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
index af91d16c3c77..a3aad6c3dbec 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
@@ -170,6 +170,9 @@ static int map_cc_config_offset_gen0_ext0(u32 offset, struct bnxt_qplib_cc_param
|
||||
case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TCP_CP:
|
||||
*val = ccparam->tcp_cp;
|
||||
break;
|
||||
+ case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP:
|
||||
+ *val = ccparam->inact_th;
|
||||
+ break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -247,7 +250,9 @@ static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offs
|
||||
ccparam->tcp_cp = val;
|
||||
break;
|
||||
case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE:
|
||||
+ break;
|
||||
case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP:
|
||||
+ ccparam->inact_th = val;
|
||||
break;
|
||||
case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TIME_PER_PHASE:
|
||||
ccparam->time_pph = val;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,79 +0,0 @@
|
||||
From 5cda728320e19c716ddf48cd704360d164af5775 Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Tue, 19 Aug 2025 14:10:02 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: Fix missing error handling for tx_queue
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit e3d57a00d4d1f36689e9eab80b60d5024361efec
|
||||
Author: Gautam R A <gautam-r.a@broadcom.com>
|
||||
Date: Tue May 20 09:29:08 2025 +0530
|
||||
|
||||
RDMA/bnxt_re: Fix missing error handling for tx_queue
|
||||
|
||||
bnxt_re_fill_gen0_ext0() did not return an error when
|
||||
attempting to modify CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE,
|
||||
leading to silent failures.
|
||||
|
||||
Fixed this by returning -EOPNOTSUPP for tx_queue modifications and
|
||||
ensuring proper error propagation in bnxt_re_configure_cc().
|
||||
|
||||
Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
|
||||
Signed-off-by: Gautam R A <gautam-r.a@broadcom.com>
|
||||
Link: https://patch.msgid.link/20250520035910.1061918-3-kalesh-anakkur.purayil@broadcom.com
|
||||
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
index a3aad6c3dbec..9f6392155d91 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
@@ -206,7 +206,7 @@ static ssize_t bnxt_re_cc_config_get(struct file *filp, char __user *buffer,
|
||||
return simple_read_from_buffer(buffer, usr_buf_len, ppos, (u8 *)(buf), rc);
|
||||
}
|
||||
|
||||
-static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offset, u32 val)
|
||||
+static int bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offset, u32 val)
|
||||
{
|
||||
u32 modify_mask;
|
||||
|
||||
@@ -250,7 +250,7 @@ static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offs
|
||||
ccparam->tcp_cp = val;
|
||||
break;
|
||||
case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE:
|
||||
- break;
|
||||
+ return -EOPNOTSUPP;
|
||||
case CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP:
|
||||
ccparam->inact_th = val;
|
||||
break;
|
||||
@@ -263,18 +263,21 @@ static void bnxt_re_fill_gen0_ext0(struct bnxt_qplib_cc_param *ccparam, u32 offs
|
||||
}
|
||||
|
||||
ccparam->mask = modify_mask;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int bnxt_re_configure_cc(struct bnxt_re_dev *rdev, u32 gen_ext, u32 offset, u32 val)
|
||||
{
|
||||
struct bnxt_qplib_cc_param ccparam = { };
|
||||
+ int rc;
|
||||
|
||||
- /* Supporting only Gen 0 now */
|
||||
- if (gen_ext == CC_CONFIG_GEN0_EXT0)
|
||||
- bnxt_re_fill_gen0_ext0(&ccparam, offset, val);
|
||||
- else
|
||||
+ if (gen_ext != CC_CONFIG_GEN0_EXT0)
|
||||
return -EINVAL;
|
||||
|
||||
+ rc = bnxt_re_fill_gen0_ext0(&ccparam, offset, val);
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+
|
||||
bnxt_qplib_modify_cc(&rdev->qplib_res, &ccparam);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
From 7e413faf8726503ba29dc3c9985c2a51b4d39c17 Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Tue, 19 Aug 2025 15:24:51 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit 990b5c07f677a0b633b41130a70771337c18343e
|
||||
Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Date: Tue May 20 09:29:09 2025 +0530
|
||||
|
||||
RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc
|
||||
|
||||
Driver currently supports modifying GEN0_EXT0 CC parameters
|
||||
through debugfs hook.
|
||||
|
||||
Fixed to return -EOPNOTSUPP instead of -EINVAL in bnxt_re_configure_cc()
|
||||
when the user tries to modify any other CC parameters.
|
||||
|
||||
Fixes: 656dff55da19 ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
|
||||
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
|
||||
Link: https://patch.msgid.link/20250520035910.1061918-4-kalesh-anakkur.purayil@broadcom.com
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/debugfs.c b/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
index 9f6392155d91..e632f1661b92 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/debugfs.c
|
||||
@@ -272,7 +272,7 @@ static int bnxt_re_configure_cc(struct bnxt_re_dev *rdev, u32 gen_ext, u32 offse
|
||||
int rc;
|
||||
|
||||
if (gen_ext != CC_CONFIG_GEN0_EXT0)
|
||||
- return -EINVAL;
|
||||
+ return -EOPNOTSUPP;
|
||||
|
||||
rc = bnxt_re_fill_gen0_ext0(&ccparam, offset, val);
|
||||
if (rc)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,93 +0,0 @@
|
||||
From 158c90165846bc756b86c514a97a233dc40b6724 Mon Sep 17 00:00:00 2001
|
||||
From: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
Date: Tue, 19 Aug 2025 14:11:52 -0700
|
||||
Subject: [PATCH] RDMA/bnxt_re: convert timeouts to secs_to_jiffies()
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-108694
|
||||
|
||||
commit f873136416293b786e7611d36226c9f5a8f6d20b
|
||||
Author: Easwar Hariharan <eahariha@linux.microsoft.com>
|
||||
Date: Tue Feb 25 20:17:30 2025 +0000
|
||||
|
||||
RDMA/bnxt_re: convert timeouts to secs_to_jiffies()
|
||||
|
||||
Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced
|
||||
secs_to_jiffies(). As the value here is a multiple of 1000, use
|
||||
secs_to_jiffies() instead of msecs_to_jiffies() to avoid the
|
||||
multiplication
|
||||
|
||||
This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with
|
||||
the following Coccinelle rules:
|
||||
|
||||
@depends on patch@
|
||||
expression E;
|
||||
@@
|
||||
|
||||
-msecs_to_jiffies
|
||||
+secs_to_jiffies
|
||||
(E
|
||||
- * \( 1000 \| MSEC_PER_SEC \)
|
||||
)
|
||||
|
||||
Link: https://lkml.kernel.org/r/20250225-converge-secs-to-jiffies-part-two-v3-16-a43967e36c88@linux.microsoft.com
|
||||
Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com>
|
||||
Cc: Carlos Maiolino <cem@kernel.org>
|
||||
Cc: Carlos Maiolino <cmaiolino@redhat.com>
|
||||
Cc: Chris Mason <clm@fb.com>
|
||||
Cc: Christoph Hellwig <hch@lst.de>
|
||||
Cc: Damien Le Maol <dlemoal@kernel.org>
|
||||
Cc: "Darrick J. Wong" <djwong@kernel.org>
|
||||
Cc: David Sterba <dsterba@suse.com>
|
||||
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
|
||||
Cc: Dongsheng Yang <dongsheng.yang@easystack.cn>
|
||||
Cc: Fabio Estevam <festevam@gmail.com>
|
||||
Cc: Frank Li <frank.li@nxp.com>
|
||||
Cc: Hans de Goede <hdegoede@redhat.com>
|
||||
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
|
||||
Cc: Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>
|
||||
Cc: Ilya Dryomov <idryomov@gmail.com>
|
||||
Cc: James Bottomley <james.bottomley@HansenPartnership.com>
|
||||
Cc: James Smart <james.smart@broadcom.com>
|
||||
Cc: Jaroslav Kysela <perex@perex.cz>
|
||||
Cc: Jason Gunthorpe <jgg@ziepe.ca>
|
||||
Cc: Jens Axboe <axboe@kernel.dk>
|
||||
Cc: Josef Bacik <josef@toxicpanda.com>
|
||||
Cc: Julia Lawall <julia.lawall@inria.fr>
|
||||
Cc: Kalesh Anakkur Purayil <kalesh-anakkur.purayil@broadcom.com>
|
||||
Cc: Keith Busch <kbusch@kernel.org>
|
||||
Cc: Leon Romanovsky <leon@kernel.org>
|
||||
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
Cc: Mark Brown <broonie@kernel.org>
|
||||
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
|
||||
Cc: Nicolas Palix <nicolas.palix@imag.fr>
|
||||
Cc: Niklas Cassel <cassel@kernel.org>
|
||||
Cc: Oded Gabbay <ogabbay@kernel.org>
|
||||
Cc: Sagi Grimberg <sagi@grimberg.me>
|
||||
Cc: Sascha Hauer <s.hauer@pengutronix.de>
|
||||
Cc: Sebastian Reichel <sre@kernel.org>
|
||||
Cc: Selvin Thyparampil Xavier <selvin.xavier@broadcom.com>
|
||||
Cc: Shawn Guo <shawnguo@kernel.org>
|
||||
Cc: Shyam-sundar S-k <Shyam-sundar.S-k@amd.com>
|
||||
Cc: Takashi Iwai <tiwai@suse.com>
|
||||
Cc: Takashi Iwai <tiwai@suse.de>
|
||||
Cc: Xiubo Li <xiubli@redhat.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
|
||||
Signed-off-by: Sreekanth Reddy <sreeredd@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
|
||||
index d23074383428..804bc773b4ef 100644
|
||||
--- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
|
||||
+++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
|
||||
@@ -160,7 +160,7 @@ static int __wait_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie)
|
||||
wait_event_timeout(cmdq->waitq,
|
||||
!crsqe->is_in_used ||
|
||||
test_bit(ERR_DEVICE_DETACHED, &cmdq->flags),
|
||||
- msecs_to_jiffies(rcfw->max_timeout * 1000));
|
||||
+ secs_to_jiffies(rcfw->max_timeout));
|
||||
|
||||
if (!crsqe->is_in_used)
|
||||
return 0;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,133 +0,0 @@
|
||||
From 0a6054968d4fb03613bfa5655cd560f7faca9110 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@redhat.com>
|
||||
Date: Fri, 20 Mar 2026 15:01:50 +0100
|
||||
Subject: [PATCH] net: openvswitch: Avoid releasing netdev before teardown
|
||||
completes
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-155383
|
||||
|
||||
commit 7c770dadfda5cbbde6aa3c4363ed513f1d212bf8
|
||||
Author: Toke Høiland-Jørgensen <toke@redhat.com>
|
||||
Date: Wed Mar 18 16:55:51 2026 +0100
|
||||
|
||||
net: openvswitch: Avoid releasing netdev before teardown completes
|
||||
|
||||
The patch cited in the Fixes tag below changed the teardown code for
|
||||
OVS ports to no longer unconditionally take the RTNL. After this change,
|
||||
the netdev_destroy() callback can proceed immediately to the call_rcu()
|
||||
invocation if the IFF_OVS_DATAPATH flag is already cleared on the
|
||||
netdev.
|
||||
|
||||
The ovs_netdev_detach_dev() function clears the flag before completing
|
||||
the unregistration, and if it gets preempted after clearing the flag (as
|
||||
can happen on an -rt kernel), netdev_destroy() can complete and the
|
||||
device can be freed before the unregistration completes. This leads to a
|
||||
splat like:
|
||||
|
||||
[ 998.393867] Oops: general protection fault, probably for non-canonical address 0xff00000001000239: 0000 [#1] SMP PTI
|
||||
[ 998.393877] CPU: 42 UID: 0 PID: 55177 Comm: ip Kdump: loaded Not tainted 6.12.0-211.1.1.el10_2.x86_64+rt #1 PREEMPT_RT
|
||||
[ 998.393886] Hardware name: Dell Inc. PowerEdge R740/0JMK61, BIOS 2.24.0 03/27/2025
|
||||
[ 998.393889] RIP: 0010:dev_set_promiscuity+0x8d/0xa0
|
||||
[ 998.393901] Code: 00 00 75 d8 48 8b 53 08 48 83 ba b0 02 00 00 00 75 ca 48 83 c4 08 5b c3 cc cc cc cc 48 83 bf 48 09 00 00 00 75 91 48 8b 47 08 <48> 83 b8 b0 02 00 00 00 74 97 eb 81 0f 1f 80 00 00 00 00 90 90 90
|
||||
[ 998.393906] RSP: 0018:ffffce5864a5f6a0 EFLAGS: 00010246
|
||||
[ 998.393912] RAX: ff00000000ffff89 RBX: ffff894d0adf5a05 RCX: 0000000000000000
|
||||
[ 998.393917] RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffff894d0adf5a05
|
||||
[ 998.393921] RBP: ffff894d19252000 R08: ffff894d19252000 R09: 0000000000000000
|
||||
[ 998.393924] R10: ffff894d19252000 R11: ffff894d192521b8 R12: 0000000000000006
|
||||
[ 998.393927] R13: ffffce5864a5f738 R14: 00000000ffffffe2 R15: 0000000000000000
|
||||
[ 998.393931] FS: 00007fad61971800(0000) GS:ffff894cc0140000(0000) knlGS:0000000000000000
|
||||
[ 998.393936] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
||||
[ 998.393940] CR2: 000055df0a2a6e40 CR3: 000000011c7fe003 CR4: 00000000007726f0
|
||||
[ 998.393944] PKRU: 55555554
|
||||
[ 998.393946] Call Trace:
|
||||
[ 998.393949] <TASK>
|
||||
[ 998.393952] ? show_trace_log_lvl+0x1b0/0x2f0
|
||||
[ 998.393961] ? show_trace_log_lvl+0x1b0/0x2f0
|
||||
[ 998.393975] ? dp_device_event+0x41/0x80 [openvswitch]
|
||||
[ 998.394009] ? __die_body.cold+0x8/0x12
|
||||
[ 998.394016] ? die_addr+0x3c/0x60
|
||||
[ 998.394027] ? exc_general_protection+0x16d/0x390
|
||||
[ 998.394042] ? asm_exc_general_protection+0x26/0x30
|
||||
[ 998.394058] ? dev_set_promiscuity+0x8d/0xa0
|
||||
[ 998.394066] ? ovs_netdev_detach_dev+0x3a/0x80 [openvswitch]
|
||||
[ 998.394092] dp_device_event+0x41/0x80 [openvswitch]
|
||||
[ 998.394102] notifier_call_chain+0x5a/0xd0
|
||||
[ 998.394106] unregister_netdevice_many_notify+0x51b/0xa60
|
||||
[ 998.394110] rtnl_dellink+0x169/0x3e0
|
||||
[ 998.394121] ? rt_mutex_slowlock.constprop.0+0x95/0xd0
|
||||
[ 998.394125] rtnetlink_rcv_msg+0x142/0x3f0
|
||||
[ 998.394128] ? avc_has_perm_noaudit+0x69/0xf0
|
||||
[ 998.394130] ? __pfx_rtnetlink_rcv_msg+0x10/0x10
|
||||
[ 998.394132] netlink_rcv_skb+0x50/0x100
|
||||
[ 998.394138] netlink_unicast+0x292/0x3f0
|
||||
[ 998.394141] netlink_sendmsg+0x21b/0x470
|
||||
[ 998.394145] ____sys_sendmsg+0x39d/0x3d0
|
||||
[ 998.394149] ___sys_sendmsg+0x9a/0xe0
|
||||
[ 998.394156] __sys_sendmsg+0x7a/0xd0
|
||||
[ 998.394160] do_syscall_64+0x7f/0x170
|
||||
[ 998.394162] entry_SYSCALL_64_after_hwframe+0x76/0x7e
|
||||
[ 998.394165] RIP: 0033:0x7fad61bf4724
|
||||
[ 998.394188] Code: 89 02 b8 ff ff ff ff eb bb 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 80 3d c5 e9 0c 00 00 74 13 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 48 83 ec 28 89 54 24 1c 48 89
|
||||
[ 998.394189] RSP: 002b:00007ffd7e2f7cb8 EFLAGS: 00000202 ORIG_RAX: 000000000000002e
|
||||
[ 998.394191] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fad61bf4724
|
||||
[ 998.394193] RDX: 0000000000000000 RSI: 00007ffd7e2f7d20 RDI: 0000000000000003
|
||||
[ 998.394194] RBP: 00007ffd7e2f7d90 R08: 0000000000000010 R09: 000000000000003f
|
||||
[ 998.394195] R10: 000055df11558010 R11: 0000000000000202 R12: 00007ffd7e2f8380
|
||||
[ 998.394196] R13: 0000000069b233d7 R14: 000055df0a256040 R15: 0000000000000000
|
||||
[ 998.394200] </TASK>
|
||||
|
||||
To fix this, reorder the operations in ovs_netdev_detach_dev() to only
|
||||
clear the flag after completing the other operations, and introduce an
|
||||
smp_wmb() to make the ordering requirement explicit. The smp_wmb() is
|
||||
paired with a full smp_mb() in netdev_destroy() to make sure the
|
||||
call_rcu() invocation does not happen before the unregister operations
|
||||
are visible.
|
||||
|
||||
Reported-by: Minxi Hou <mhou@redhat.com>
|
||||
Tested-by: Minxi Hou <mhou@redhat.com>
|
||||
Fixes: 549822767630 ("net: openvswitch: Avoid needlessly taking the RTNL on vport destroy")
|
||||
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
||||
Link: https://patch.msgid.link/20260318155554.1133405-1-toke@redhat.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
(cherry picked from commit 7c770dadfda5cbbde6aa3c4363ed513f1d212bf8)
|
||||
Assisted-by: Patchpal
|
||||
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
||||
|
||||
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
|
||||
index 6574f9bcdc02..c688dee96503 100644
|
||||
--- a/net/openvswitch/vport-netdev.c
|
||||
+++ b/net/openvswitch/vport-netdev.c
|
||||
@@ -151,11 +151,15 @@ static void vport_netdev_free(struct rcu_head *rcu)
|
||||
void ovs_netdev_detach_dev(struct vport *vport)
|
||||
{
|
||||
ASSERT_RTNL();
|
||||
- vport->dev->priv_flags &= ~IFF_OVS_DATAPATH;
|
||||
netdev_rx_handler_unregister(vport->dev);
|
||||
netdev_upper_dev_unlink(vport->dev,
|
||||
netdev_master_upper_dev_get(vport->dev));
|
||||
dev_set_promiscuity(vport->dev, -1);
|
||||
+
|
||||
+ /* paired with smp_mb() in netdev_destroy() */
|
||||
+ smp_wmb();
|
||||
+
|
||||
+ vport->dev->priv_flags &= ~IFF_OVS_DATAPATH;
|
||||
}
|
||||
|
||||
static void netdev_destroy(struct vport *vport)
|
||||
@@ -174,6 +178,9 @@ static void netdev_destroy(struct vport *vport)
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
+ /* paired with smp_wmb() in ovs_netdev_detach_dev() */
|
||||
+ smp_mb();
|
||||
+
|
||||
call_rcu(&vport->rcu, vport_netdev_free);
|
||||
}
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
From e324506b98bf6935e6df4813b989d6a9b333109c Mon Sep 17 00:00:00 2001
|
||||
From: Mohammad Heib <mheib@redhat.com>
|
||||
Date: Tue, 17 Mar 2026 19:08:06 +0200
|
||||
Subject: [PATCH] ionic: fix persistent MAC address override on PF
|
||||
|
||||
[ Upstream commit cbcb3cfcdc436d6f91a3d95ecfa9c831abe14aed ]
|
||||
|
||||
The use of IONIC_CMD_LIF_SETATTR in the MAC address update path causes
|
||||
the ionic firmware to update the LIF's identity in its persistent state.
|
||||
Since the firmware state is maintained across host warm boots and driver
|
||||
reloads, any MAC change on the Physical Function (PF) becomes "sticky.
|
||||
|
||||
This is problematic because it causes ethtool -P to report the
|
||||
user-configured MAC as the permanent factory address, which breaks
|
||||
system management tools that rely on a stable hardware identity.
|
||||
|
||||
While Virtual Functions (VFs) need this hardware-level programming to
|
||||
properly handle MAC assignments in guest environments, the PF should
|
||||
maintain standard transient behavior. This patch gates the
|
||||
ionic_program_mac call using is_virtfn so that PF MAC changes remain
|
||||
local to the netdev filters and do not overwrite the firmware's
|
||||
permanent identity block.
|
||||
|
||||
Fixes: 19058be7c48c ("ionic: VF initial random MAC address if no assigned mac")
|
||||
Signed-off-by: Mohammad Heib <mheib@redhat.com>
|
||||
Reviewed-by: Simon Horman <horms@kernel.org>
|
||||
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
|
||||
Link: https://patch.msgid.link/20260317170806.35390-1-mheib@redhat.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
|
||||
index d6bea7152805..8119281b26d0 100644
|
||||
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
|
||||
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
|
||||
@@ -1718,13 +1718,18 @@ static int ionic_set_mac_address(struct net_device *netdev, void *sa)
|
||||
if (ether_addr_equal(netdev->dev_addr, mac))
|
||||
return 0;
|
||||
|
||||
- err = ionic_program_mac(lif, mac);
|
||||
- if (err < 0)
|
||||
- return err;
|
||||
+ /* Only program macs for virtual functions to avoid losing the permanent
|
||||
+ * Mac across warm reset/reboot.
|
||||
+ */
|
||||
+ if (lif->ionic->pdev->is_virtfn) {
|
||||
+ err = ionic_program_mac(lif, mac);
|
||||
+ if (err < 0)
|
||||
+ return err;
|
||||
|
||||
- if (err > 0)
|
||||
- netdev_dbg(netdev, "%s: SET and GET ATTR Mac are not equal-due to old FW running\n",
|
||||
- __func__);
|
||||
+ if (err > 0)
|
||||
+ netdev_dbg(netdev, "%s: SET and GET ATTR Mac are not equal-due to old FW running\n",
|
||||
+ __func__);
|
||||
+ }
|
||||
|
||||
err = eth_prepare_mac_addr_change(netdev, addr);
|
||||
if (err)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
From 266f721e430bee90651dbb9be46ba6ff070c0228 Mon Sep 17 00:00:00 2001
|
||||
From: Vinay Mulugund <vmulugun@redhat.com>
|
||||
Date: Wed, 11 Mar 2026 12:27:30 +0530
|
||||
Subject: [PATCH] net: hv_netvsc: reject RSS hash key programming without RX
|
||||
indirection table
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-145154
|
||||
|
||||
commit d23564955811da493f34412d7de60fa268c8cb50
|
||||
Author: Aditya Garg <gargaditya@linux.microsoft.com>
|
||||
Date: Mon Jan 12 02:01:33 2026 -0800
|
||||
|
||||
net: hv_netvsc: reject RSS hash key programming without RX indirection table
|
||||
|
||||
RSS configuration requires a valid RX indirection table. When the device
|
||||
reports a single receive queue, rndis_filter_device_add() does not
|
||||
allocate an indirection table, accepting RSS hash key updates in this
|
||||
state leads to a hang.
|
||||
|
||||
Fix this by gating netvsc_set_rxfh() on ndc->rx_table_sz and return
|
||||
-EOPNOTSUPP when the table is absent. This aligns set_rxfh with the device
|
||||
capabilities and prevents incorrect behavior.
|
||||
|
||||
Fixes: 962f3fee83a4 ("netvsc: add ethtool ops to get/set RSS key")
|
||||
Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com>
|
||||
Reviewed-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
|
||||
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
|
||||
Link: https://patch.msgid.link/1768212093-1594-1-git-send-email-gargaditya@linux.microsoft.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
(cherry picked from commit d23564955811da493f34412d7de60fa268c8cb50)
|
||||
|
||||
Signed-off-by: Vinay Mulugund <vmulugun@redhat.com>
|
||||
|
||||
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
|
||||
index 313d258a346e..c4243ee74654 100644
|
||||
--- a/drivers/net/hyperv/netvsc_drv.c
|
||||
+++ b/drivers/net/hyperv/netvsc_drv.c
|
||||
@@ -1757,6 +1757,9 @@ static int netvsc_set_rxfh(struct net_device *dev,
|
||||
rxfh->hfunc != ETH_RSS_HASH_TOP)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
+ if (!ndc->rx_table_sz)
|
||||
+ return -EOPNOTSUPP;
|
||||
+
|
||||
rndis_dev = ndev->extension;
|
||||
if (rxfh->indir) {
|
||||
for (i = 0; i < ndc->rx_table_sz; i++)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
From bf9a43aa596c70d0c9c32fa654c39926f1c2ef82 Mon Sep 17 00:00:00 2001
|
||||
From: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Date: Thu, 26 Mar 2026 17:41:01 +0000
|
||||
Subject: [PATCH] scsi: qla2xxx: Fix improper freeing of purex item
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-161120
|
||||
CVE: CVE-2025-68741
|
||||
|
||||
commit 78b1a242fe612a755f2158fd206ee6bb577d18ca
|
||||
Author: Zilin Guan <zilin@seu.edu.cn>
|
||||
Date: Thu Nov 13 15:12:46 2025 +0000
|
||||
|
||||
scsi: qla2xxx: Fix improper freeing of purex item
|
||||
|
||||
In qla2xxx_process_purls_iocb(), an item is allocated via
|
||||
qla27xx_copy_multiple_pkt(), which internally calls
|
||||
qla24xx_alloc_purex_item().
|
||||
|
||||
The qla24xx_alloc_purex_item() function may return a pre-allocated item
|
||||
from a per-adapter pool for small allocations, instead of dynamically
|
||||
allocating memory with kzalloc().
|
||||
|
||||
An error handling path in qla2xxx_process_purls_iocb() incorrectly uses
|
||||
kfree() to release the item. If the item was from the pre-allocated
|
||||
pool, calling kfree() on it is a bug that can lead to memory corruption.
|
||||
|
||||
Fix this by using the correct deallocation function,
|
||||
qla24xx_free_purex_item(), which properly handles both dynamically
|
||||
allocated and pre-allocated items.
|
||||
|
||||
Fixes: 875386b98857 ("scsi: qla2xxx: Add Unsolicited LS Request and Response Support for NVMe")
|
||||
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
|
||||
Reviewed-by: Himanshu Madhani <hmadhani2024@gmail.com>
|
||||
Link: https://patch.msgid.link/20251113151246.762510-1-zilin@seu.edu.cn
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
|
||||
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
|
||||
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
|
||||
index 8ee2e337c9e1..6ecf3da765aa 100644
|
||||
--- a/drivers/scsi/qla2xxx/qla_nvme.c
|
||||
+++ b/drivers/scsi/qla2xxx/qla_nvme.c
|
||||
@@ -1292,7 +1292,7 @@ void qla2xxx_process_purls_iocb(void **pkt, struct rsp_que **rsp)
|
||||
a.reason = FCNVME_RJT_RC_LOGIC;
|
||||
a.explanation = FCNVME_RJT_EXP_NONE;
|
||||
xmt_reject = true;
|
||||
- kfree(item);
|
||||
+ qla24xx_free_purex_item(item);
|
||||
goto out;
|
||||
}
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
From 30367bfca94e52eeb59b216f5d8d22054aa4f1a8 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Alcantara <paalcant@redhat.com>
|
||||
Date: Tue, 24 Mar 2026 10:39:08 -0300
|
||||
Subject: [PATCH] smb: client: fix krb5 mount with username option
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-158991
|
||||
|
||||
commit 12b4c5d98cd7ca46d5035a57bcd995df614c14e1
|
||||
Author: Paulo Alcantara <pc@manguebit.org>
|
||||
Date: Fri Mar 13 00:03:38 2026 -0300
|
||||
|
||||
smb: client: fix krb5 mount with username option
|
||||
|
||||
Customer reported that some of their krb5 mounts were failing against
|
||||
a single server as the client was trying to mount the shares with
|
||||
wrong credentials. It turned out the client was reusing SMB session
|
||||
from first mount to try mounting the other shares, even though a
|
||||
different username= option had been specified to the other mounts.
|
||||
|
||||
By using username mount option along with sec=krb5 to search for
|
||||
principals from keytab is supported by cifs.upcall(8) since
|
||||
cifs-utils-4.8. So fix this by matching username mount option in
|
||||
match_session() even with Kerberos.
|
||||
|
||||
For example, the second mount below should fail with -ENOKEY as there
|
||||
is no 'foobar' principal in keytab (/etc/krb5.keytab). The client
|
||||
ends up reusing SMB session from first mount to perform the second
|
||||
one, which is wrong.
|
||||
|
||||
```
|
||||
$ ktutil
|
||||
ktutil: add_entry -password -p testuser -k 1 -e aes256-cts
|
||||
Password for testuser@ZELDA.TEST:
|
||||
ktutil: write_kt /etc/krb5.keytab
|
||||
ktutil: quit
|
||||
$ klist -ke
|
||||
Keytab name: FILE:/etc/krb5.keytab
|
||||
KVNO Principal
|
||||
---- ----------------------------------------------------------------
|
||||
1 testuser@ZELDA.TEST (aes256-cts-hmac-sha1-96)
|
||||
$ mount.cifs //w22-root2/scratch /mnt/1 -o sec=krb5,username=testuser
|
||||
$ mount.cifs //w22-root2/scratch /mnt/2 -o sec=krb5,username=foobar
|
||||
$ mount -t cifs | grep -Po 'username=\K\w+'
|
||||
testuser
|
||||
testuser
|
||||
```
|
||||
|
||||
Reported-by: Oscar Santos <ossantos@redhat.com>
|
||||
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
|
||||
Cc: David Howells <dhowells@redhat.com>
|
||||
Cc: linux-cifs@vger.kernel.org
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Steve French <stfrench@microsoft.com>
|
||||
|
||||
Signed-off-by: Paulo Alcantara <paalcant@redhat.com>
|
||||
|
||||
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
|
||||
index a0b45710bd04..37ad111331b3 100644
|
||||
--- a/fs/smb/client/connect.c
|
||||
+++ b/fs/smb/client/connect.c
|
||||
@@ -1952,6 +1952,10 @@ static int match_session(struct cifs_ses *ses,
|
||||
case Kerberos:
|
||||
if (!uid_eq(ctx->cred_uid, ses->cred_uid))
|
||||
return 0;
|
||||
+ if (strncmp(ses->user_name ?: "",
|
||||
+ ctx->username ?: "",
|
||||
+ CIFS_MAX_USERNAME_LEN))
|
||||
+ return 0;
|
||||
break;
|
||||
case NTLMv2:
|
||||
case RawNTLMSSP:
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
From 2b6abddbbd260c6ed60125a41e9aa32cf3e31296 Mon Sep 17 00:00:00 2001
|
||||
From: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Date: Wed, 25 Feb 2026 14:34:51 +0000
|
||||
Subject: [PATCH] ALSA: hda/tas2781: Ignore reset check for SPI device
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-148197
|
||||
|
||||
commit 908ef80e31e4d3bd953a0088fe57640cd9ae7b3e
|
||||
Author: Baojun Xu <baojun.xu@ti.com>
|
||||
Date: Wed Feb 11 11:09:46 2026 +0800
|
||||
|
||||
ALSA: hda/tas2781: Ignore reset check for SPI device
|
||||
|
||||
In the SPI driver probe, the device should be in the default state, so the
|
||||
device status check is not necessary. It should be forced to do the
|
||||
firmware download as I2C device.
|
||||
|
||||
Signed-off-by: Baojun Xu <baojun.xu@ti.com>
|
||||
Link: https://patch.msgid.link/20260211030946.2330-1-baojun.xu@ti.com
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
|
||||
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
|
||||
diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
|
||||
index b9a55672bf15..488e35dac952 100644
|
||||
--- a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
|
||||
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
|
||||
@@ -634,7 +634,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
|
||||
struct tasdevice_priv *tas_priv = context;
|
||||
struct tas2781_hda *tas_hda = dev_get_drvdata(tas_priv->dev);
|
||||
struct hda_codec *codec = tas_priv->codec;
|
||||
- int ret, val;
|
||||
+ int ret;
|
||||
|
||||
pm_runtime_get_sync(tas_priv->dev);
|
||||
guard(mutex)(&tas_priv->codec_lock);
|
||||
@@ -673,20 +673,14 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
|
||||
tas_priv->rcabin.profile_cfg_id = 0;
|
||||
|
||||
tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
|
||||
- ret = tasdevice_spi_dev_read(tas_priv, tas_priv->index,
|
||||
- TAS2781_REG_CLK_CONFIG, &val);
|
||||
- if (ret < 0)
|
||||
- goto out;
|
||||
|
||||
- if (val == TAS2781_REG_CLK_CONFIG_RESET) {
|
||||
- ret = tasdevice_prmg_load(tas_priv, 0);
|
||||
- if (ret < 0) {
|
||||
- dev_err(tas_priv->dev, "FW download failed = %d\n",
|
||||
- ret);
|
||||
- goto out;
|
||||
- }
|
||||
- tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
|
||||
+ ret = tasdevice_prmg_load(tas_priv, 0);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(tas_priv->dev, "FW download failed = %d\n", ret);
|
||||
+ goto out;
|
||||
}
|
||||
+ tas_priv->fw_state = TASDEVICE_DSP_FW_ALL_OK;
|
||||
+
|
||||
if (tas_priv->fmw->nr_programs > 0)
|
||||
tas_priv->tasdevice[tas_priv->index].cur_prog = 0;
|
||||
if (tas_priv->fmw->nr_configurations > 0)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
From 4270afcc8324648b92a33e5450e4d6bc9bf925d9 Mon Sep 17 00:00:00 2001
|
||||
From: Mohammad Heib <mheib@redhat.com>
|
||||
Date: Mon, 9 Feb 2026 10:10:58 +0200
|
||||
Subject: [PATCH] i40e: drop udp_tunnel_get_rx_info() call from i40e_open()
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-143670
|
||||
|
||||
commit 40857194956dcaf3d2b66d6bd113d844c93bef54
|
||||
Author: Mohammad Heib <mheib@redhat.com>
|
||||
Date: Sun Dec 28 21:40:20 2025 +0200
|
||||
|
||||
i40e: drop udp_tunnel_get_rx_info() call from i40e_open()
|
||||
|
||||
The i40e driver calls udp_tunnel_get_rx_info() during i40e_open().
|
||||
This is redundant because UDP tunnel RX offload state is preserved
|
||||
across device down/up cycles. The udp_tunnel core handles
|
||||
synchronization automatically when required.
|
||||
|
||||
Furthermore, recent changes in the udp_tunnel infrastructure require
|
||||
querying RX info while holding the udp_tunnel lock. Calling it
|
||||
directly from the ndo_open path violates this requirement,
|
||||
triggering the following lockdep warning:
|
||||
|
||||
Call Trace:
|
||||
<TASK>
|
||||
? __udp_tunnel_nic_assert_locked+0x39/0x40 [udp_tunnel]
|
||||
i40e_open+0x135/0x14f [i40e]
|
||||
__dev_open+0x121/0x2e0
|
||||
__dev_change_flags+0x227/0x270
|
||||
dev_change_flags+0x3d/0xb0
|
||||
devinet_ioctl+0x56f/0x860
|
||||
sock_do_ioctl+0x7b/0x130
|
||||
__x64_sys_ioctl+0x91/0xd0
|
||||
do_syscall_64+0x90/0x170
|
||||
...
|
||||
</TASK>
|
||||
|
||||
Remove the redundant and unsafe call to udp_tunnel_get_rx_info() from
|
||||
i40e_open() resolve the locking violation.
|
||||
|
||||
Fixes: 1ead7501094c ("udp_tunnel: remove rtnl_lock dependency")
|
||||
Signed-off-by: Mohammad Heib <mheib@redhat.com>
|
||||
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
|
||||
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
|
||||
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
|
||||
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
|
||||
|
||||
Signed-off-by: Mohammad Heib <mheib@redhat.com>
|
||||
|
||||
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
|
||||
index f418eef4323b..92df70499b6e 100644
|
||||
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
|
||||
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
|
||||
@@ -9054,7 +9054,6 @@ int i40e_open(struct net_device *netdev)
|
||||
TCP_FLAG_FIN |
|
||||
TCP_FLAG_CWR) >> 16);
|
||||
wr32(&pf->hw, I40E_GLLAN_TSOMSK_L, be32_to_cpu(TCP_FLAG_CWR) >> 16);
|
||||
- udp_tunnel_get_rx_info(netdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,65 +0,0 @@
|
||||
From 6c8fced68178676061687969c26e1e61b3c91ecd Mon Sep 17 00:00:00 2001
|
||||
From: Mohammad Heib <mheib@redhat.com>
|
||||
Date: Mon, 9 Feb 2026 10:10:58 +0200
|
||||
Subject: [PATCH] ice: drop udp_tunnel_get_rx_info() call from ndo_open()
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-143670
|
||||
|
||||
commit 234e615bfece9e3e91c50fe49ab9e68ee37c791a
|
||||
Author: Mohammad Heib <mheib@redhat.com>
|
||||
Date: Sun Dec 28 21:40:21 2025 +0200
|
||||
|
||||
ice: drop udp_tunnel_get_rx_info() call from ndo_open()
|
||||
|
||||
The ice driver calls udp_tunnel_get_rx_info() during ice_open_internal().
|
||||
This is redundant because UDP tunnel RX offload state is preserved
|
||||
across device down/up cycles. The udp_tunnel core handles
|
||||
synchronization automatically when required.
|
||||
|
||||
Furthermore, recent changes in the udp_tunnel infrastructure require
|
||||
querying RX info while holding the udp_tunnel lock. Calling it
|
||||
directly from the ndo_open path violates this requirement,
|
||||
triggering the following lockdep warning:
|
||||
|
||||
Call Trace:
|
||||
<TASK>
|
||||
ice_open_internal+0x253/0x350 [ice]
|
||||
__udp_tunnel_nic_assert_locked+0x86/0xb0 [udp_tunnel]
|
||||
__dev_open+0x2f5/0x880
|
||||
__dev_change_flags+0x44c/0x660
|
||||
netif_change_flags+0x80/0x160
|
||||
devinet_ioctl+0xd21/0x15f0
|
||||
inet_ioctl+0x311/0x350
|
||||
sock_ioctl+0x114/0x220
|
||||
__x64_sys_ioctl+0x131/0x1a0
|
||||
...
|
||||
</TASK>
|
||||
|
||||
Remove the redundant and unsafe call to udp_tunnel_get_rx_info() from
|
||||
ice_open_internal() to resolve the locking violation
|
||||
|
||||
Fixes: 1ead7501094c ("udp_tunnel: remove rtnl_lock dependency")
|
||||
Signed-off-by: Mohammad Heib <mheib@redhat.com>
|
||||
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
|
||||
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
|
||||
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
|
||||
|
||||
Signed-off-by: Mohammad Heib <mheib@redhat.com>
|
||||
|
||||
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
|
||||
index d89ae9e3a168..04f71716a70f 100644
|
||||
--- a/drivers/net/ethernet/intel/ice/ice_main.c
|
||||
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
|
||||
@@ -9624,9 +9624,6 @@ int ice_open_internal(struct net_device *netdev)
|
||||
netdev_err(netdev, "Failed to open VSI 0x%04X on switch 0x%04X\n",
|
||||
vsi->vsi_num, vsi->vsw->sw_id);
|
||||
|
||||
- /* Update existing tunnels information */
|
||||
- udp_tunnel_get_rx_info(netdev);
|
||||
-
|
||||
return err;
|
||||
}
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
From 8ea33562256c638f6864f56a0620b1d998e3ade4 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Stancek <jstancek@redhat.com>
|
||||
Date: Mon, 9 Mar 2026 08:47:13 +0100
|
||||
Subject: [PATCH] x86/boot: Handle relative CONFIG_EFI_SBAT_FILE file paths
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-132871
|
||||
Upstream Status: linux.git
|
||||
|
||||
commit 3d1973a0c76a78a4728cff13648a188ed486cf44
|
||||
Author: Jan Stancek <jstancek@redhat.com>
|
||||
Date: Wed Feb 25 20:30:23 2026 +0100
|
||||
|
||||
x86/boot: Handle relative CONFIG_EFI_SBAT_FILE file paths
|
||||
|
||||
CONFIG_EFI_SBAT_FILE can be a relative path. When compiling using a different
|
||||
output directory (O=) the build currently fails because it can't find the
|
||||
filename set in CONFIG_EFI_SBAT_FILE:
|
||||
|
||||
arch/x86/boot/compressed/sbat.S: Assembler messages:
|
||||
arch/x86/boot/compressed/sbat.S:6: Error: file not found: kernel.sbat
|
||||
|
||||
Add $(srctree) as include dir for sbat.o.
|
||||
|
||||
[ bp: Massage commit message. ]
|
||||
|
||||
Fixes: 61b57d35396a ("x86/efi: Implement support for embedding SBAT data for x86")
|
||||
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
||||
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
|
||||
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Cc: <stable@kernel.org>
|
||||
Link: https://patch.msgid.link/f4eda155b0cef91d4d316b4e92f5771cb0aa7187.1772047658.git.jstancek@redhat.com
|
||||
|
||||
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
||||
|
||||
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
|
||||
index c6fa7fa71db4..9f521bff57a4 100644
|
||||
--- a/arch/x86/boot/compressed/Makefile
|
||||
+++ b/arch/x86/boot/compressed/Makefile
|
||||
@@ -111,6 +111,7 @@ vmlinux-objs-$(CONFIG_EFI_SBAT) += $(obj)/sbat.o
|
||||
|
||||
ifdef CONFIG_EFI_SBAT
|
||||
$(obj)/sbat.o: $(CONFIG_EFI_SBAT_FILE)
|
||||
+AFLAGS_sbat.o += -I $(srctree)
|
||||
endif
|
||||
|
||||
$(obj)/vmlinux: $(vmlinux-objs-y) $(vmlinux-libs-y) FORCE
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,100 +0,0 @@
|
||||
From a64542a8df51ed10c2d6ac1cbfd20281cadb6e6a Mon Sep 17 00:00:00 2001
|
||||
From: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Date: Tue, 7 Apr 2026 09:07:40 +0000
|
||||
Subject: [PATCH] net/sched: Only allow act_ct to bind to clsact/ingress qdiscs
|
||||
and shared blocks
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-164343
|
||||
CVE: CVE-2026-23270
|
||||
|
||||
commit 11cb63b0d1a0685e0831ae3c77223e002ef18189
|
||||
Author: Victor Nogueira <victor@mojatatu.com>
|
||||
Date: Wed Feb 25 10:43:48 2026 -0300
|
||||
|
||||
net/sched: Only allow act_ct to bind to clsact/ingress qdiscs and shared blocks
|
||||
|
||||
As Paolo said earlier [1]:
|
||||
|
||||
"Since the blamed commit below, classify can return TC_ACT_CONSUMED while
|
||||
the current skb being held by the defragmentation engine. As reported by
|
||||
GangMin Kim, if such packet is that may cause a UaF when the defrag engine
|
||||
later on tries to tuch again such packet."
|
||||
|
||||
act_ct was never meant to be used in the egress path, however some users
|
||||
are attaching it to egress today [2]. Attempting to reach a middle
|
||||
ground, we noticed that, while most qdiscs are not handling
|
||||
TC_ACT_CONSUMED, clsact/ingress qdiscs are. With that in mind, we
|
||||
address the issue by only allowing act_ct to bind to clsact/ingress
|
||||
qdiscs and shared blocks. That way it's still possible to attach act_ct to
|
||||
egress (albeit only with clsact).
|
||||
|
||||
[1] https://lore.kernel.org/netdev/674b8cbfc385c6f37fb29a1de08d8fe5c2b0fbee.1771321118.git.pabeni@redhat.com/
|
||||
[2] https://lore.kernel.org/netdev/cc6bfb4a-4a2b-42d8-b9ce-7ef6644fb22b@ovn.org/
|
||||
|
||||
Reported-by: GangMin Kim <km.kim1503@gmail.com>
|
||||
Fixes: 3f14b377d01d ("net/sched: act_ct: fix skb leak and crash on ooo frags")
|
||||
CC: stable@vger.kernel.org
|
||||
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
|
||||
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
|
||||
Link: https://patch.msgid.link/20260225134349.1287037-1-victor@mojatatu.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
|
||||
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
|
||||
diff --git a/include/net/act_api.h b/include/net/act_api.h
|
||||
index 2894cfff2da3..6b09f4587885 100644
|
||||
--- a/include/net/act_api.h
|
||||
+++ b/include/net/act_api.h
|
||||
@@ -68,6 +68,7 @@ struct tc_action {
|
||||
#define TCA_ACT_FLAGS_REPLACE (1U << (TCA_ACT_FLAGS_USER_BITS + 2))
|
||||
#define TCA_ACT_FLAGS_NO_RTNL (1U << (TCA_ACT_FLAGS_USER_BITS + 3))
|
||||
#define TCA_ACT_FLAGS_AT_INGRESS (1U << (TCA_ACT_FLAGS_USER_BITS + 4))
|
||||
+#define TCA_ACT_FLAGS_AT_INGRESS_OR_CLSACT (1U << (TCA_ACT_FLAGS_USER_BITS + 5))
|
||||
|
||||
/* Update lastuse only if needed, to avoid dirtying a cache line.
|
||||
* We use a temp variable to avoid fetching jiffies twice.
|
||||
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
|
||||
index e6ea788da01d..dfae934d26c7 100644
|
||||
--- a/net/sched/act_ct.c
|
||||
+++ b/net/sched/act_ct.c
|
||||
@@ -1358,6 +1358,12 @@ static int tcf_ct_init(struct net *net, struct nlattr *nla,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
+ if (bind && !(flags & TCA_ACT_FLAGS_AT_INGRESS_OR_CLSACT)) {
|
||||
+ NL_SET_ERR_MSG_MOD(extack,
|
||||
+ "Attaching ct to a non ingress/clsact qdisc is unsupported");
|
||||
+ return -EOPNOTSUPP;
|
||||
+ }
|
||||
+
|
||||
err = nla_parse_nested(tb, TCA_CT_MAX, nla, ct_policy, extack);
|
||||
if (err < 0)
|
||||
return err;
|
||||
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
|
||||
index 5399a46f58dd..0d76e6917155 100644
|
||||
--- a/net/sched/cls_api.c
|
||||
+++ b/net/sched/cls_api.c
|
||||
@@ -2228,6 +2228,11 @@ static bool is_qdisc_ingress(__u32 classid)
|
||||
return (TC_H_MIN(classid) == TC_H_MIN(TC_H_MIN_INGRESS));
|
||||
}
|
||||
|
||||
+static bool is_ingress_or_clsact(struct tcf_block *block, struct Qdisc *q)
|
||||
+{
|
||||
+ return tcf_block_shared(block) || (q && !!(q->flags & TCQ_F_INGRESS));
|
||||
+}
|
||||
+
|
||||
static int tc_new_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
@@ -2420,6 +2425,8 @@ static int tc_new_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
|
||||
flags |= TCA_ACT_FLAGS_NO_RTNL;
|
||||
if (is_qdisc_ingress(parent))
|
||||
flags |= TCA_ACT_FLAGS_AT_INGRESS;
|
||||
+ if (is_ingress_or_clsact(block, q))
|
||||
+ flags |= TCA_ACT_FLAGS_AT_INGRESS_OR_CLSACT;
|
||||
err = tp->ops->change(net, skb, tp, cl, t->tcm_handle, tca, &fh,
|
||||
flags, extack);
|
||||
if (err == 0) {
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
From aa6ff47bec14a3ff3e61d5156611282ea4af0cd5 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <jkysela@redhat.com>
|
||||
Date: Thu, 5 Mar 2026 15:06:49 +0100
|
||||
Subject: [PATCH] ASoC: SDCA: Tidy up some memory allocations
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-85741
|
||||
|
||||
commit 61d2a7699ab39d448f44919ef15c16187e6f70ec
|
||||
Author: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Date: Thu Jan 15 11:46:07 2026 +0000
|
||||
|
||||
ASoC: SDCA: Tidy up some memory allocations
|
||||
|
||||
It is slightly better to deference the type being allocate for a sizeof
|
||||
rather than manually using the type. Saves effort if types change in the
|
||||
future. This results in no functional changes, just tidies up the style
|
||||
of the code a little.
|
||||
|
||||
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Link: https://patch.msgid.link/20260115114607.271990-1-ckeepax@opensource.cirrus.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
|
||||
|
||||
diff --git a/sound/soc/sdca/sdca_fdl.c b/sound/soc/sdca/sdca_fdl.c
|
||||
index 3180ebd07c40..8bee9f23c473 100644
|
||||
--- a/sound/soc/sdca/sdca_fdl.c
|
||||
+++ b/sound/soc/sdca/sdca_fdl.c
|
||||
@@ -487,7 +487,7 @@ int sdca_fdl_alloc_state(struct sdca_interrupt *interrupt)
|
||||
struct device *dev = interrupt->dev;
|
||||
struct fdl_state *fdl_state;
|
||||
|
||||
- fdl_state = devm_kzalloc(dev, sizeof(struct fdl_state), GFP_KERNEL);
|
||||
+ fdl_state = devm_kzalloc(dev, sizeof(*fdl_state), GFP_KERNEL);
|
||||
if (!fdl_state)
|
||||
return -ENOMEM;
|
||||
|
||||
diff --git a/sound/soc/sdca/sdca_functions.c b/sound/soc/sdca/sdca_functions.c
|
||||
index acac066f1d8d..80c71116e6d4 100644
|
||||
--- a/sound/soc/sdca/sdca_functions.c
|
||||
+++ b/sound/soc/sdca/sdca_functions.c
|
||||
@@ -952,7 +952,7 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
|
||||
}
|
||||
|
||||
control->values = devm_kcalloc(dev, hweight64(control->cn_list),
|
||||
- sizeof(int), GFP_KERNEL);
|
||||
+ sizeof(*control->values), GFP_KERNEL);
|
||||
if (!control->values)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -2048,7 +2048,7 @@ static int find_sdca_filesets(struct device *dev, struct sdw_slave *sdw,
|
||||
fwnode_property_read_u32_array(function_node, "mipi-sdca-file-set-id-list",
|
||||
filesets_list, num_sets);
|
||||
|
||||
- sets = devm_kcalloc(dev, num_sets, sizeof(struct sdca_fdl_set), GFP_KERNEL);
|
||||
+ sets = devm_kcalloc(dev, num_sets, sizeof(*sets), GFP_KERNEL);
|
||||
if (!sets)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -2074,7 +2074,7 @@ static int find_sdca_filesets(struct device *dev, struct sdw_slave *sdw,
|
||||
dev_dbg(dev, "fileset: %#x\n", filesets_list[i]);
|
||||
|
||||
files = devm_kcalloc(dev, num_entries / mult_fileset,
|
||||
- sizeof(struct sdca_fdl_file), GFP_KERNEL);
|
||||
+ sizeof(*files), GFP_KERNEL);
|
||||
if (!files)
|
||||
return -ENOMEM;
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
From 1351c2e480a0e7b2c42ac6016c7fdf61de18ee68 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <jkysela@redhat.com>
|
||||
Date: Thu, 5 Mar 2026 15:07:17 +0100
|
||||
Subject: [PATCH] ASoC: SDCA: Handle CONFIG_PM_SLEEP not being set
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-85741
|
||||
|
||||
commit 7a3d1b04d938f31e112fe09c0ffc1af830ba1f6d
|
||||
Author: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Date: Thu Jan 15 14:11:06 2026 +0000
|
||||
|
||||
ASoC: SDCA: Handle CONFIG_PM_SLEEP not being set
|
||||
|
||||
If CONFIG_PM_SLEEP is not set the completion used will not exist. Update
|
||||
the code to avoid the build error this introduces, without PM_SLEEP it
|
||||
should be safe to always run the conditional code.
|
||||
|
||||
Fixes: ffd7e8a10111 ("ASoC: SDCA: Device boot into the system suspend process")
|
||||
Reported-by: kernel test robot <lkp@intel.com>
|
||||
Closes: https://lore.kernel.org/oe-kbuild-all/202601151803.XY7KryHC-lkp@intel.com/
|
||||
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Link: https://patch.msgid.link/20260115141107.564929-1-ckeepax@opensource.cirrus.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
|
||||
|
||||
diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c
|
||||
index cc40732c30cc..d9e22cf40f77 100644
|
||||
--- a/sound/soc/sdca/sdca_interrupts.c
|
||||
+++ b/sound/soc/sdca/sdca_interrupts.c
|
||||
@@ -198,6 +198,18 @@ static irqreturn_t hid_handler(int irq, void *data)
|
||||
return irqret;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_PM_SLEEP
|
||||
+static bool no_pm_in_progress(struct device *dev)
|
||||
+{
|
||||
+ return completion_done(&dev->power.completion);
|
||||
+}
|
||||
+#else
|
||||
+static bool no_pm_in_progress(struct device *dev)
|
||||
+{
|
||||
+ return true;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static irqreturn_t fdl_owner_handler(int irq, void *data)
|
||||
{
|
||||
struct sdca_interrupt *interrupt = data;
|
||||
@@ -209,7 +221,7 @@ static irqreturn_t fdl_owner_handler(int irq, void *data)
|
||||
* FDL has to run from the system resume handler, at which point
|
||||
* we can't wait for the pm runtime.
|
||||
*/
|
||||
- if (completion_done(&dev->power.completion)) {
|
||||
+ if (no_pm_in_progress(dev)) {
|
||||
ret = pm_runtime_get_sync(dev);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to resume for fdl: %d\n", ret);
|
||||
@@ -223,7 +235,7 @@ static irqreturn_t fdl_owner_handler(int irq, void *data)
|
||||
|
||||
irqret = IRQ_HANDLED;
|
||||
error:
|
||||
- if (completion_done(&dev->power.completion))
|
||||
+ if (no_pm_in_progress(dev))
|
||||
pm_runtime_put(dev);
|
||||
return irqret;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,139 +0,0 @@
|
||||
From afcc1ec4a47228eb2f8a8f1f79a9dbf3918a9c16 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <jkysela@redhat.com>
|
||||
Date: Thu, 5 Mar 2026 15:04:28 +0100
|
||||
Subject: [PATCH] ASoC: SDCA: Update counting of SU/GE DAPM routes
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-85741
|
||||
|
||||
commit 1fb720d33eecdb9a90ee340b3000ba378d49f5ca
|
||||
Author: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Date: Wed Feb 25 14:01:16 2026 +0000
|
||||
|
||||
ASoC: SDCA: Update counting of SU/GE DAPM routes
|
||||
|
||||
Device Layer Selector Unit's are controlled by a Group Entity control
|
||||
rather than by the host directly. For the purposes of the ASoC class
|
||||
driver the number of input routes to the SU is controlled by the number
|
||||
of options within the Group Entity Selected Mode Control. ie. One valid
|
||||
DAPM route for each valid route defined in the Group Entity.
|
||||
|
||||
Currently the code assumes that a Device Layer SU will have a number of
|
||||
routes equal to the number of potential sources for the SU. ie. it
|
||||
counts the routes using the SU, but then creates the routes using the
|
||||
GE. However, this isn't actually true, it is perfectly allowed for the
|
||||
GE to only define options for some of the potential sources of the SU.o
|
||||
In such a case the number of routes return will not match those created,
|
||||
leading to either an overflow of the routes array or undefined routes to
|
||||
be past to the ASoC core, both of which generally lead to the sound card
|
||||
failing to probe.
|
||||
|
||||
Update the handling for the counting of routes to count the connected
|
||||
routes on the GE itself and then ignore the source routes on the SU.
|
||||
This makes it match the logic generating the routes and ensuring that
|
||||
both remain in sync.
|
||||
|
||||
Fixes: 2c8b3a8e6aa8 ("ASoC: SDCA: Create DAPM widgets and routes from DisCo")
|
||||
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
|
||||
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Link: https://patch.msgid.link/20260225140118.402695-3-ckeepax@opensource.cirrus.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
|
||||
|
||||
diff --git a/sound/soc/sdca/sdca_asoc.c b/sound/soc/sdca/sdca_asoc.c
|
||||
index 65e87de1563b..49cbf38b7adb 100644
|
||||
--- a/sound/soc/sdca/sdca_asoc.c
|
||||
+++ b/sound/soc/sdca/sdca_asoc.c
|
||||
@@ -50,6 +50,25 @@ static bool readonly_control(struct sdca_control *control)
|
||||
return control->has_fixed || control->mode == SDCA_ACCESS_MODE_RO;
|
||||
}
|
||||
|
||||
+static int ge_count_routes(struct sdca_entity *entity)
|
||||
+{
|
||||
+ int count = 0;
|
||||
+ int i, j;
|
||||
+
|
||||
+ for (i = 0; i < entity->ge.num_modes; i++) {
|
||||
+ struct sdca_ge_mode *mode = &entity->ge.modes[i];
|
||||
+
|
||||
+ for (j = 0; j < mode->num_controls; j++) {
|
||||
+ struct sdca_ge_control *affected = &mode->controls[j];
|
||||
+
|
||||
+ if (affected->sel != SDCA_CTL_SU_SELECTOR || affected->val)
|
||||
+ count++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* sdca_asoc_count_component - count the various component parts
|
||||
* @dev: Pointer to the device against which allocations will be done.
|
||||
@@ -73,6 +92,7 @@ int sdca_asoc_count_component(struct device *dev, struct sdca_function_data *fun
|
||||
int *num_widgets, int *num_routes, int *num_controls,
|
||||
int *num_dais)
|
||||
{
|
||||
+ struct sdca_control *control;
|
||||
int i, j;
|
||||
|
||||
*num_widgets = function->num_entities - 1;
|
||||
@@ -82,6 +102,7 @@ int sdca_asoc_count_component(struct device *dev, struct sdca_function_data *fun
|
||||
|
||||
for (i = 0; i < function->num_entities - 1; i++) {
|
||||
struct sdca_entity *entity = &function->entities[i];
|
||||
+ bool skip_primary_routes = false;
|
||||
|
||||
/* Add supply/DAI widget connections */
|
||||
switch (entity->type) {
|
||||
@@ -95,6 +116,17 @@ int sdca_asoc_count_component(struct device *dev, struct sdca_function_data *fun
|
||||
case SDCA_ENTITY_TYPE_PDE:
|
||||
*num_routes += entity->pde.num_managed;
|
||||
break;
|
||||
+ case SDCA_ENTITY_TYPE_GE:
|
||||
+ *num_routes += ge_count_routes(entity);
|
||||
+ skip_primary_routes = true;
|
||||
+ break;
|
||||
+ case SDCA_ENTITY_TYPE_SU:
|
||||
+ control = sdca_selector_find_control(dev, entity, SDCA_CTL_SU_SELECTOR);
|
||||
+ if (!control)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ skip_primary_routes = (control->layers == SDCA_ACCESS_LAYER_DEVICE);
|
||||
+ break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -103,7 +135,8 @@ int sdca_asoc_count_component(struct device *dev, struct sdca_function_data *fun
|
||||
(*num_routes)++;
|
||||
|
||||
/* Add primary entity connections from DisCo */
|
||||
- *num_routes += entity->num_sources;
|
||||
+ if (!skip_primary_routes)
|
||||
+ *num_routes += entity->num_sources;
|
||||
|
||||
for (j = 0; j < entity->num_controls; j++) {
|
||||
if (exported_control(entity, &entity->controls[j]))
|
||||
@@ -406,7 +439,6 @@ static int entity_parse_su_device(struct device *dev,
|
||||
struct snd_soc_dapm_route **route)
|
||||
{
|
||||
struct sdca_control_range *range;
|
||||
- int num_routes = 0;
|
||||
int i, j;
|
||||
|
||||
if (!entity->group) {
|
||||
@@ -442,11 +474,6 @@ static int entity_parse_su_device(struct device *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- if (++num_routes > entity->num_sources) {
|
||||
- dev_err(dev, "%s: too many input routes\n", entity->label);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
term = sdca_range_search(range, SDCA_SELECTED_MODE_INDEX,
|
||||
mode->val, SDCA_SELECTED_MODE_TERM_TYPE);
|
||||
if (!term) {
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,65 +0,0 @@
|
||||
From 105ead878dbfc6db2beb895ba2bc03d7ad620811 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <jkysela@redhat.com>
|
||||
Date: Thu, 5 Mar 2026 15:05:23 +0100
|
||||
Subject: [PATCH] ASoC: add snd_soc_lookup_component_by_name helper
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-85741
|
||||
|
||||
commit 98eb42c7de6b0185c914df4cca61b49ff76821ee
|
||||
Author: Bard Liao <yung-chuan.liao@linux.intel.com>
|
||||
Date: Wed Feb 25 21:50:02 2026 +0800
|
||||
|
||||
ASoC: add snd_soc_lookup_component_by_name helper
|
||||
|
||||
Add a helper to help user to get the component by name.
|
||||
|
||||
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
|
||||
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
||||
Link: https://patch.msgid.link/20260225135004.2322987-2-yung-chuan.liao@linux.intel.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
|
||||
|
||||
diff --git a/include/sound/soc.h b/include/sound/soc.h
|
||||
index f0d837424b4e..753a4a5aecd6 100644
|
||||
--- a/include/sound/soc.h
|
||||
+++ b/include/sound/soc.h
|
||||
@@ -465,6 +465,7 @@ struct snd_soc_component *snd_soc_lookup_component_nolocked(struct device *dev,
|
||||
const char *driver_name);
|
||||
struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
|
||||
const char *driver_name);
|
||||
+struct snd_soc_component *snd_soc_lookup_component_by_name(const char *component_name);
|
||||
|
||||
int soc_new_pcm(struct snd_soc_pcm_runtime *rtd);
|
||||
#ifdef CONFIG_SND_SOC_COMPRESS
|
||||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
|
||||
index 9dd84d73046b..065fef528f02 100644
|
||||
--- a/sound/soc/soc-core.c
|
||||
+++ b/sound/soc/soc-core.c
|
||||
@@ -404,6 +404,19 @@ struct snd_soc_component *snd_soc_lookup_component(struct device *dev,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_lookup_component);
|
||||
|
||||
+struct snd_soc_component *snd_soc_lookup_component_by_name(const char *component_name)
|
||||
+{
|
||||
+ struct snd_soc_component *component;
|
||||
+
|
||||
+ guard(mutex)(&client_mutex);
|
||||
+ for_each_component(component)
|
||||
+ if (strstr(component->name, component_name))
|
||||
+ return component;
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(snd_soc_lookup_component_by_name);
|
||||
+
|
||||
struct snd_soc_pcm_runtime
|
||||
*snd_soc_get_pcm_runtime(struct snd_soc_card *card,
|
||||
struct snd_soc_dai_link *dai_link)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,78 +0,0 @@
|
||||
From 97fd7dca352424825024946458c26d8729e2f72b Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <jkysela@redhat.com>
|
||||
Date: Thu, 5 Mar 2026 15:05:45 +0100
|
||||
Subject: [PATCH] ASoC: soc_sdw_utils: partial match the codec name
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-85741
|
||||
|
||||
commit c5ae3d8bc968a28aaeefbb772ec42e50cf3a15f0
|
||||
Author: Bard Liao <yung-chuan.liao@linux.intel.com>
|
||||
Date: Wed Feb 25 21:50:03 2026 +0800
|
||||
|
||||
ASoC: soc_sdw_utils: partial match the codec name
|
||||
|
||||
Currently, we can set codec name in the dai info which will be set as
|
||||
the codec component name in a DAI link. However, the codec name may
|
||||
not be fixed. For example, there is an index in a SDCA codec name and
|
||||
that is not fixed. Lookup the fixed codec name string from the component
|
||||
list to get the right component name to ensure the DAI link will bind
|
||||
to the right codec component.
|
||||
|
||||
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
|
||||
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
||||
Link: https://patch.msgid.link/20260225135004.2322987-3-yung-chuan.liao@linux.intel.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
|
||||
|
||||
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
|
||||
index 2f3c9698a0e8..88afb14e1ed3 100644
|
||||
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
|
||||
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
|
||||
@@ -1213,8 +1213,18 @@ const char *asoc_sdw_get_codec_name(struct device *dev,
|
||||
const struct snd_soc_acpi_link_adr *adr_link,
|
||||
int adr_index)
|
||||
{
|
||||
- if (dai_info->codec_name)
|
||||
- return devm_kstrdup(dev, dai_info->codec_name, GFP_KERNEL);
|
||||
+ if (dai_info->codec_name) {
|
||||
+ struct snd_soc_component *component;
|
||||
+
|
||||
+ component = snd_soc_lookup_component_by_name(dai_info->codec_name);
|
||||
+ if (component) {
|
||||
+ dev_dbg(dev, "%s found component %s for codec_name %s\n",
|
||||
+ __func__, component->name, dai_info->codec_name);
|
||||
+ return devm_kstrdup(dev, component->name, GFP_KERNEL);
|
||||
+ } else {
|
||||
+ return devm_kstrdup(dev, dai_info->codec_name, GFP_KERNEL);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
return _asoc_sdw_get_codec_name(dev, adr_link, adr_index);
|
||||
}
|
||||
@@ -1526,7 +1536,17 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
|
||||
return -EINVAL;
|
||||
|
||||
for (j = 0; j < codec_info->aux_num; j++) {
|
||||
- soc_aux->dlc.name = codec_info->auxs[j].codec_name;
|
||||
+ struct snd_soc_component *component;
|
||||
+
|
||||
+ component = snd_soc_lookup_component_by_name(codec_info->auxs[j].codec_name);
|
||||
+ if (component) {
|
||||
+ dev_dbg(dev, "%s found component %s for aux name %s\n",
|
||||
+ __func__, component->name,
|
||||
+ codec_info->auxs[j].codec_name);
|
||||
+ soc_aux->dlc.name = component->name;
|
||||
+ } else {
|
||||
+ soc_aux->dlc.name = codec_info->auxs[j].codec_name;
|
||||
+ }
|
||||
soc_aux++;
|
||||
}
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
From 69e69e240e71e94b8404b33ce9296967a1114258 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <jkysela@redhat.com>
|
||||
Date: Thu, 5 Mar 2026 15:06:06 +0100
|
||||
Subject: [PATCH] ASoC: soc_sdw_utils: remove index from sdca codec name
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-85741
|
||||
|
||||
commit 34b4fc44e4f904fbb81335d53163ffdcb0180000
|
||||
Author: Bard Liao <yung-chuan.liao@linux.intel.com>
|
||||
Date: Wed Feb 25 21:50:04 2026 +0800
|
||||
|
||||
ASoC: soc_sdw_utils: remove index from sdca codec name
|
||||
|
||||
The index is not fixed and it will lead to the DAI link can't bind the
|
||||
codec component with the name when the index is different from the
|
||||
predefined one.
|
||||
|
||||
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
|
||||
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
||||
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
||||
Link: https://patch.msgid.link/20260225135004.2322987-4-yung-chuan.liao@linux.intel.com
|
||||
Signed-off-by: Mark Brown <broonie@kernel.org>
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
|
||||
|
||||
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
|
||||
index 88afb14e1ed3..7afd8fa305be 100644
|
||||
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
|
||||
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
|
||||
@@ -727,7 +727,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||
.dais = {
|
||||
{
|
||||
.direction = {true, false},
|
||||
- .codec_name = "snd_soc_sdca.UAJ.1",
|
||||
+ .codec_name = "snd_soc_sdca.UAJ",
|
||||
.dai_name = "IT 41",
|
||||
.dai_type = SOC_SDW_DAI_TYPE_JACK,
|
||||
.dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID},
|
||||
@@ -743,7 +743,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||
},
|
||||
{
|
||||
.direction = {false, true},
|
||||
- .codec_name = "snd_soc_sdca.UAJ.1",
|
||||
+ .codec_name = "snd_soc_sdca.UAJ",
|
||||
.dai_name = "OT 36",
|
||||
.dai_type = SOC_SDW_DAI_TYPE_JACK,
|
||||
.dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_JACK_IN_DAI_ID},
|
||||
@@ -752,7 +752,7 @@ struct asoc_sdw_codec_info codec_info_list[] = {
|
||||
.dai_num = 3,
|
||||
.auxs = {
|
||||
{
|
||||
- .codec_name = "snd_soc_sdca.HID.2",
|
||||
+ .codec_name = "snd_soc_sdca.HID",
|
||||
},
|
||||
},
|
||||
.aux_num = 1,
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
|
||||
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
|
||||
index 0349e26..dbd06bd 100644
|
||||
--- a/arch/x86/kvm/mmu/mmu.c
|
||||
+++ b/arch/x86/kvm/mmu/mmu.c
|
||||
@@ -3040,12 +3040,6 @@ static int mmu_set_spte(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot,
|
||||
bool prefetch = !fault || fault->prefetch;
|
||||
bool write_fault = fault && fault->write;
|
||||
|
||||
- if (unlikely(is_noslot_pfn(pfn))) {
|
||||
- vcpu->stat.pf_mmio_spte_created++;
|
||||
- mark_mmio_spte(vcpu, sptep, gfn, pte_access);
|
||||
- return RET_PF_EMULATE;
|
||||
- }
|
||||
-
|
||||
if (is_shadow_present_pte(*sptep)) {
|
||||
if (prefetch && is_last_spte(*sptep, level) &&
|
||||
pfn == spte_to_pfn(*sptep))
|
||||
@@ -3069,6 +3063,14 @@ static int mmu_set_spte(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot,
|
||||
was_rmapped = 1;
|
||||
}
|
||||
|
||||
+ if (unlikely(is_noslot_pfn(pfn))) {
|
||||
+ vcpu->stat.pf_mmio_spte_created++;
|
||||
+ mark_mmio_spte(vcpu, sptep, gfn, pte_access);
|
||||
+ if (flush)
|
||||
+ kvm_flush_remote_tlbs_gfn(vcpu->kvm, gfn, level);
|
||||
+ return RET_PF_EMULATE;
|
||||
+ }
|
||||
+
|
||||
wrprot = make_spte(vcpu, sp, slot, pte_access, gfn, pfn, *sptep, prefetch,
|
||||
false, host_writable, &spte);
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
From df83746075778958954aa0460cca55f4b3fc9c02 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Christopherson <seanjc@google.com>
|
||||
Date: Thu, 5 Mar 2026 17:42:14 -0800
|
||||
Subject: [PATCH] KVM: x86/mmu: Only WARN in direct MMUs when overwriting
|
||||
shadow-present SPTE
|
||||
|
||||
Adjust KVM's sanity check against overwriting a shadow-present SPTE with a
|
||||
another SPTE with a different target PFN to only apply to direct MMUs,
|
||||
i.e. only to MMUs without shadowed gPTEs. While it's impossible for KVM
|
||||
to overwrite a shadow-present SPTE in response to a guest write, writes
|
||||
from outside the scope of KVM, e.g. from host userspace, aren't detected
|
||||
by KVM's write tracking and so can break KVM's shadow paging rules.
|
||||
|
||||
------------[ cut here ]------------
|
||||
pfn != spte_to_pfn(*sptep)
|
||||
WARNING: arch/x86/kvm/mmu/mmu.c:3069 at mmu_set_spte+0x1e4/0x440 [kvm], CPU#0: vmx_ept_stale_r/872
|
||||
Modules linked in: kvm_intel kvm irqbypass
|
||||
CPU: 0 UID: 1000 PID: 872 Comm: vmx_ept_stale_r Not tainted 7.0.0-rc2-eafebd2d2ab0-sink-vm #319 PREEMPT
|
||||
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
|
||||
RIP: 0010:mmu_set_spte+0x1e4/0x440 [kvm]
|
||||
Call Trace:
|
||||
<TASK>
|
||||
ept_page_fault+0x535/0x7f0 [kvm]
|
||||
kvm_mmu_do_page_fault+0xee/0x1f0 [kvm]
|
||||
kvm_mmu_page_fault+0x8d/0x620 [kvm]
|
||||
vmx_handle_exit+0x18c/0x5a0 [kvm_intel]
|
||||
kvm_arch_vcpu_ioctl_run+0xc55/0x1c20 [kvm]
|
||||
kvm_vcpu_ioctl+0x2d5/0x980 [kvm]
|
||||
__x64_sys_ioctl+0x8a/0xd0
|
||||
do_syscall_64+0xb5/0x730
|
||||
entry_SYSCALL_64_after_hwframe+0x4b/0x53
|
||||
</TASK>
|
||||
---[ end trace 0000000000000000 ]---
|
||||
|
||||
Fixes: 11d45175111d ("KVM: x86/mmu: Warn if PFN changes on shadow-present SPTE in shadow MMU")
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Sean Christopherson <seanjc@google.com>
|
||||
|
||||
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
|
||||
index 98406d6aa2d6..dd06453d5b72 100644
|
||||
--- a/arch/x86/kvm/mmu/mmu.c
|
||||
+++ b/arch/x86/kvm/mmu/mmu.c
|
||||
@@ -3060,7 +3060,8 @@ static int mmu_set_spte(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot,
|
||||
child = spte_to_child_sp(pte);
|
||||
drop_parent_pte(vcpu->kvm, child, sptep);
|
||||
flush = true;
|
||||
- } else if (WARN_ON_ONCE(pfn != spte_to_pfn(*sptep))) {
|
||||
+ } else if (pfn != spte_to_pfn(*sptep)) {
|
||||
+ WARN_ON_ONCE(vcpu->arch.mmu->root_role.direct);
|
||||
drop_spte(vcpu->kvm, sptep);
|
||||
flush = true;
|
||||
} else
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,101 +0,0 @@
|
||||
From 180018072a6bc00717f4648cf45b1dd27752a4ac Mon Sep 17 00:00:00 2001
|
||||
From: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Date: Wed, 15 Apr 2026 14:04:07 +0000
|
||||
Subject: [PATCH] nfsd: fix heap overflow in NFSv4.0 LOCK replay cache
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-168570
|
||||
CVE: CVE-2026-31402
|
||||
|
||||
commit 5133b61aaf437e5f25b1b396b14242a6bb0508e2
|
||||
Author: Jeff Layton <jlayton@kernel.org>
|
||||
Date: Tue Feb 24 11:33:35 2026 -0500
|
||||
|
||||
nfsd: fix heap overflow in NFSv4.0 LOCK replay cache
|
||||
|
||||
The NFSv4.0 replay cache uses a fixed 112-byte inline buffer
|
||||
(rp_ibuf[NFSD4_REPLAY_ISIZE]) to store encoded operation responses.
|
||||
This size was calculated based on OPEN responses and does not account
|
||||
for LOCK denied responses, which include the conflicting lock owner as
|
||||
a variable-length field up to 1024 bytes (NFS4_OPAQUE_LIMIT).
|
||||
|
||||
When a LOCK operation is denied due to a conflict with an existing lock
|
||||
that has a large owner, nfsd4_encode_operation() copies the full encoded
|
||||
response into the undersized replay buffer via read_bytes_from_xdr_buf()
|
||||
with no bounds check. This results in a slab-out-of-bounds write of up
|
||||
to 944 bytes past the end of the buffer, corrupting adjacent heap memory.
|
||||
|
||||
This can be triggered remotely by an unauthenticated attacker with two
|
||||
cooperating NFSv4.0 clients: one sets a lock with a large owner string,
|
||||
then the other requests a conflicting lock to provoke the denial.
|
||||
|
||||
We could fix this by increasing NFSD4_REPLAY_ISIZE to allow for a full
|
||||
opaque, but that would increase the size of every stateowner, when most
|
||||
lockowners are not that large.
|
||||
|
||||
Instead, fix this by checking the encoded response length against
|
||||
NFSD4_REPLAY_ISIZE before copying into the replay buffer. If the
|
||||
response is too large, set rp_buflen to 0 to skip caching the replay
|
||||
payload. The status is still cached, and the client already received the
|
||||
correct response on the original request.
|
||||
|
||||
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
|
||||
Cc: stable@kernel.org
|
||||
Reported-by: Nicholas Carlini <npc@anthropic.com>
|
||||
Tested-by: Nicholas Carlini <npc@anthropic.com>
|
||||
Signed-off-by: Jeff Layton <jlayton@kernel.org>
|
||||
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
|
||||
|
||||
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
|
||||
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
|
||||
index bdf18ffb0064..538806e45904 100644
|
||||
--- a/fs/nfsd/nfs4xdr.c
|
||||
+++ b/fs/nfsd/nfs4xdr.c
|
||||
@@ -5921,9 +5921,14 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op)
|
||||
int len = xdr->buf->len - (op_status_offset + XDR_UNIT);
|
||||
|
||||
so->so_replay.rp_status = op->status;
|
||||
- so->so_replay.rp_buflen = len;
|
||||
- read_bytes_from_xdr_buf(xdr->buf, op_status_offset + XDR_UNIT,
|
||||
+ if (len <= NFSD4_REPLAY_ISIZE) {
|
||||
+ so->so_replay.rp_buflen = len;
|
||||
+ read_bytes_from_xdr_buf(xdr->buf,
|
||||
+ op_status_offset + XDR_UNIT,
|
||||
so->so_replay.rp_buf, len);
|
||||
+ } else {
|
||||
+ so->so_replay.rp_buflen = 0;
|
||||
+ }
|
||||
}
|
||||
status:
|
||||
op->status = nfsd4_map_status(op->status,
|
||||
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
|
||||
index 399815d9038f..c63c8abd199a 100644
|
||||
--- a/fs/nfsd/state.h
|
||||
+++ b/fs/nfsd/state.h
|
||||
@@ -539,11 +539,18 @@ struct nfs4_client_reclaim {
|
||||
struct xdr_netobj cr_princhash;
|
||||
};
|
||||
|
||||
-/* A reasonable value for REPLAY_ISIZE was estimated as follows:
|
||||
- * The OPEN response, typically the largest, requires
|
||||
- * 4(status) + 8(stateid) + 20(changeinfo) + 4(rflags) + 8(verifier) +
|
||||
- * 4(deleg. type) + 8(deleg. stateid) + 4(deleg. recall flag) +
|
||||
- * 20(deleg. space limit) + ~32(deleg. ace) = 112 bytes
|
||||
+/*
|
||||
+ * REPLAY_ISIZE is sized for an OPEN response with delegation:
|
||||
+ * 4(status) + 8(stateid) + 20(changeinfo) + 4(rflags) +
|
||||
+ * 8(verifier) + 4(deleg. type) + 8(deleg. stateid) +
|
||||
+ * 4(deleg. recall flag) + 20(deleg. space limit) +
|
||||
+ * ~32(deleg. ace) = 112 bytes
|
||||
+ *
|
||||
+ * Some responses can exceed this. A LOCK denial includes the conflicting
|
||||
+ * lock owner, which can be up to 1024 bytes (NFS4_OPAQUE_LIMIT). Responses
|
||||
+ * larger than REPLAY_ISIZE are not cached in rp_ibuf; only rp_status is
|
||||
+ * saved. Enlarging this constant increases the size of every
|
||||
+ * nfs4_stateowner.
|
||||
*/
|
||||
|
||||
#define NFSD4_REPLAY_ISIZE 112
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
From 8df832e6b945e1ba61467d7f1c9305e314ae92fe Mon Sep 17 00:00:00 2001
|
||||
From: Ignat Korchagin <ignat@cloudflare.com>
|
||||
Date: Mon, 14 Oct 2024 16:38:03 +0100
|
||||
Subject: [PATCH] net: af_can: do not leave a dangling sk pointer in
|
||||
can_create()
|
||||
|
||||
[ Upstream commit 811a7ca7320c062e15d0f5b171fe6ad8592d1434 ]
|
||||
|
||||
On error can_create() frees the allocated sk object, but sock_init_data()
|
||||
has already attached it to the provided sock object. This will leave a
|
||||
dangling sk pointer in the sock object and may cause use-after-free later.
|
||||
|
||||
Signed-off-by: Ignat Korchagin <ignat@cloudflare.com>
|
||||
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
|
||||
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
|
||||
Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
Link: https://patch.msgid.link/20241014153808.51894-5-ignat@cloudflare.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
diff --git a/net/can/af_can.c b/net/can/af_can.c
|
||||
index 707576eeeb58..01f3fbb3b67d 100644
|
||||
--- a/net/can/af_can.c
|
||||
+++ b/net/can/af_can.c
|
||||
@@ -171,6 +171,7 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
|
||||
/* release sk on errors */
|
||||
sock_orphan(sk);
|
||||
sock_put(sk);
|
||||
+ sock->sk = NULL;
|
||||
}
|
||||
|
||||
errout:
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
From b9cdc1763c2f19e5d5f025e13cd0ccb71aa44616 Mon Sep 17 00:00:00 2001
|
||||
From: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Date: Mon, 20 Apr 2026 15:21:10 +0000
|
||||
Subject: [PATCH] crypto: asymmetric_keys - prevent overflow in
|
||||
asymmetric_key_generate_id
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-169566
|
||||
CVE: CVE-2025-68724
|
||||
|
||||
commit df0845cf447ae1556c3440b8b155de0926cbaa56
|
||||
Author: Thorsten Blum <thorsten.blum@linux.dev>
|
||||
Date: Mon Oct 13 13:40:10 2025 +0200
|
||||
|
||||
crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id
|
||||
|
||||
Use check_add_overflow() to guard against potential integer overflows
|
||||
when adding the binary blob lengths and the size of an asymmetric_key_id
|
||||
structure and return ERR_PTR(-EOVERFLOW) accordingly. This prevents a
|
||||
possible buffer overflow when copying data from potentially malicious
|
||||
X.509 certificate fields that can be arbitrarily large, such as ASN.1
|
||||
INTEGER serial numbers, issuer names, etc.
|
||||
|
||||
Fixes: 7901c1a8effb ("KEYS: Implement binary asymmetric key ID handling")
|
||||
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
|
||||
Reviewed-by: Lukas Wunner <lukas@wunner.de>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
|
||||
diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
|
||||
index 43af5fa510c0..7859b0692b42 100644
|
||||
--- a/crypto/asymmetric_keys/asymmetric_type.c
|
||||
+++ b/crypto/asymmetric_keys/asymmetric_type.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <crypto/public_key.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/overflow.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <keys/system_keyring.h>
|
||||
@@ -151,12 +152,17 @@ struct asymmetric_key_id *asymmetric_key_generate_id(const void *val_1,
|
||||
size_t len_2)
|
||||
{
|
||||
struct asymmetric_key_id *kid;
|
||||
-
|
||||
- kid = kmalloc(sizeof(struct asymmetric_key_id) + len_1 + len_2,
|
||||
- GFP_KERNEL);
|
||||
+ size_t kid_sz;
|
||||
+ size_t len;
|
||||
+
|
||||
+ if (check_add_overflow(len_1, len_2, &len))
|
||||
+ return ERR_PTR(-EOVERFLOW);
|
||||
+ if (check_add_overflow(sizeof(struct asymmetric_key_id), len, &kid_sz))
|
||||
+ return ERR_PTR(-EOVERFLOW);
|
||||
+ kid = kmalloc(kid_sz, GFP_KERNEL);
|
||||
if (!kid)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
- kid->len = len_1 + len_2;
|
||||
+ kid->len = len;
|
||||
memcpy(kid->data, val_1, len_1);
|
||||
memcpy(kid->data + len_1, val_2, len_2);
|
||||
return kid;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,81 +0,0 @@
|
||||
From c88e70dc8bfca9a2be74a100387b1b66de973128 Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@intel.com>
|
||||
Date: Wed, 15 Oct 2025 19:19:28 +0300
|
||||
Subject: [PATCH] drm/i915/dsc: Add helper to enable the DSC configuration for
|
||||
a CRTC
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Add a helper to enable the DSC compression configuration for a CRTC.
|
||||
Follow-up changes will introduce tracking for the same DSC state on the
|
||||
whole link, which will need to be set whenever DSC is enabled for the
|
||||
CRTC. Also, according to the above, when querying the DSC state on the
|
||||
link, both the CRTC's and the link's DSC state must be considered.
|
||||
|
||||
Setting the DSC configuration for a CRTC and querying the DSC
|
||||
configuration for the link (added by follow-up changes) is better done
|
||||
via helper functions based on the above, prepare for that here.
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
||||
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
|
||||
Link: https://lore.kernel.org/r/20251015161934.262108-2-imre.deak@intel.com
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
|
||||
index 37faa8f19f6e..297368ff42a5 100644
|
||||
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
|
||||
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
|
||||
@@ -1655,7 +1655,7 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- crtc_state->dsc.compression_enable = true;
|
||||
+ intel_dsc_enable_on_crtc(crtc_state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
index 7059d55687cf..fc1949e0c4de 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
@@ -2475,7 +2475,8 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
|
||||
return ret;
|
||||
}
|
||||
|
||||
- pipe_config->dsc.compression_enable = true;
|
||||
+ intel_dsc_enable_on_crtc(pipe_config);
|
||||
+
|
||||
drm_dbg_kms(display->drm, "DP DSC computed with Input Bpp = %d "
|
||||
"Compressed Bpp = " FXP_Q4_FMT " Slice Count = %d\n",
|
||||
pipe_config->pipe_bpp,
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
|
||||
index bca747e24a7f..803f3b395c79 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
|
||||
@@ -372,6 +372,11 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+void intel_dsc_enable_on_crtc(struct intel_crtc_state *crtc_state)
|
||||
+{
|
||||
+ crtc_state->dsc.compression_enable = true;
|
||||
+}
|
||||
+
|
||||
enum intel_display_power_domain
|
||||
intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder)
|
||||
{
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.h b/drivers/gpu/drm/i915/display/intel_vdsc.h
|
||||
index 2139391ff881..8c7c7fb652c3 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_vdsc.h
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.h
|
||||
@@ -20,6 +20,7 @@ void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
|
||||
void intel_dsc_enable(const struct intel_crtc_state *crtc_state);
|
||||
void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
|
||||
int intel_dsc_compute_params(struct intel_crtc_state *pipe_config);
|
||||
+void intel_dsc_enable_on_crtc(struct intel_crtc_state *crtc_state);
|
||||
void intel_dsc_get_config(struct intel_crtc_state *crtc_state);
|
||||
enum intel_display_power_domain
|
||||
intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder);
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
From 69df31263bcabc527a5b526fb8972cb080a179b3 Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@intel.com>
|
||||
Date: Wed, 15 Oct 2025 19:19:29 +0300
|
||||
Subject: [PATCH] drm/i915/dp: Ensure the FEC state stays disabled for UHBR
|
||||
links
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Atm, in the DP SST case the FEC state is computed before
|
||||
intel_crtc_state::port_clock is initialized, hence intel_dp_is_uhbr()
|
||||
will always return false and the FEC state will be always computed
|
||||
assuming a non-UHBR link.
|
||||
|
||||
This happens to work, since the FEC state is recomputed later in
|
||||
intel_dp_mtp_tu_compute_config(), where port_clock will be set already,
|
||||
so intel_crtc_state::fec_enable will be reset as expected for UHBR. This
|
||||
also depends on link rates being tried in an increasing order (i.e. from
|
||||
non-UHBR -> UHBR link rates) in dsc_compute_link_config(), thus
|
||||
intel_crtc_state::fec_enable being set for the non-UHBR rates and
|
||||
getting reset for the first UHBR rate as expected.
|
||||
|
||||
A follow-up change will reuse intel_dp_fec_compute_config() for the DP
|
||||
MST state computation, prepare for that here, making sure that the
|
||||
function determines the correct intel_crtc_state::fec_enable=false state
|
||||
for UHBR link rates based on the above.
|
||||
|
||||
The DP SST and MST state computation should be further unified to avoid
|
||||
computing/setting the intel_crtc_state::fec_enable state multiple times,
|
||||
but that's left for a follow-up change. For now add only code comments
|
||||
about this.
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
||||
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
|
||||
Link: https://lore.kernel.org/r/20251015161934.262108-3-imre.deak@intel.com
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
index fc1949e0c4de..7c568c23134f 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
@@ -2368,6 +2368,9 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
|
||||
static void intel_dp_fec_compute_config(struct intel_dp *intel_dp,
|
||||
struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
+ if (intel_dp_is_uhbr(crtc_state))
|
||||
+ return;
|
||||
+
|
||||
if (crtc_state->fec_enable)
|
||||
return;
|
||||
|
||||
@@ -2379,9 +2382,6 @@ static void intel_dp_fec_compute_config(struct intel_dp *intel_dp,
|
||||
if (intel_dp_is_edp(intel_dp))
|
||||
return;
|
||||
|
||||
- if (intel_dp_is_uhbr(crtc_state))
|
||||
- return;
|
||||
-
|
||||
crtc_state->fec_enable = true;
|
||||
}
|
||||
|
||||
@@ -2400,6 +2400,10 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
|
||||
bool is_mst = intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST);
|
||||
int ret;
|
||||
|
||||
+ /*
|
||||
+ * FIXME: set the FEC enabled state once pipe_config->port_clock is
|
||||
+ * already known, so the UHBR/non-UHBR mode can be determined.
|
||||
+ */
|
||||
intel_dp_fec_compute_config(intel_dp, pipe_config);
|
||||
|
||||
if (!intel_dp_dsc_supports_format(connector, pipe_config->output_format))
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
index f2266b265304..27e952a67c34 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
@@ -293,6 +293,11 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
|
||||
mst_stream_update_slots(crtc_state, mst_state);
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * NOTE: The following must reset crtc_state->fec_enable for UHBR/DSC
|
||||
+ * after it was set by intel_dp_dsc_compute_config() ->
|
||||
+ * intel_dp_fec_compute_config().
|
||||
+ */
|
||||
if (dsc) {
|
||||
if (!intel_dp_supports_fec(intel_dp, connector, crtc_state))
|
||||
return -EINVAL;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,106 +0,0 @@
|
||||
From cb6c8f1f6f46ac2cbfb42ce8eb8b18257aeaa91a Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@intel.com>
|
||||
Date: Wed, 15 Oct 2025 19:19:30 +0300
|
||||
Subject: [PATCH] drm/i915/dp: Export helper to determine if FEC on non-UHBR
|
||||
links is required
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Export the helper function to determine if FEC is required on a non-UHBR
|
||||
(8b10b) SST or MST link. A follow up change will take this into use for
|
||||
MST as well.
|
||||
|
||||
While at it determine the output type from the CRTC state, which allows
|
||||
dropping the intel_dp argument. Also make the function return the
|
||||
required FEC state, instead of setting this in the CRTC state, which
|
||||
allows only querying this requirement, without changing the state.
|
||||
|
||||
Also rename the function to intel_dp_needs_8b10b_fec(), to clarify that
|
||||
the function determines if FEC is required on an 8b10b link (on 128b132b
|
||||
links FEC is always enabled by the HW implicitly, so the function will
|
||||
return false for that case).
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
||||
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
|
||||
Link: https://lore.kernel.org/r/20251015161934.262108-4-imre.deak@intel.com
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
index 7c568c23134f..844118735998 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
@@ -2365,24 +2365,29 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void intel_dp_fec_compute_config(struct intel_dp *intel_dp,
|
||||
- struct intel_crtc_state *crtc_state)
|
||||
+/*
|
||||
+ * Return whether FEC must be enabled for 8b10b SST or MST links. On 128b132b
|
||||
+ * links FEC is always enabled implicitly by the HW, so this function returns
|
||||
+ * false for that case.
|
||||
+ */
|
||||
+bool intel_dp_needs_8b10b_fec(const struct intel_crtc_state *crtc_state,
|
||||
+ bool dsc_enabled_on_crtc)
|
||||
{
|
||||
if (intel_dp_is_uhbr(crtc_state))
|
||||
- return;
|
||||
+ return false;
|
||||
|
||||
if (crtc_state->fec_enable)
|
||||
- return;
|
||||
+ return true;
|
||||
|
||||
/*
|
||||
* Though eDP v1.5 supports FEC with DSC, unlike DP, it is optional.
|
||||
* Since, FEC is a bandwidth overhead, continue to not enable it for
|
||||
* eDP. Until, there is a good reason to do so.
|
||||
*/
|
||||
- if (intel_dp_is_edp(intel_dp))
|
||||
- return;
|
||||
+ if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
|
||||
+ return false;
|
||||
|
||||
- crtc_state->fec_enable = true;
|
||||
+ return dsc_enabled_on_crtc;
|
||||
}
|
||||
|
||||
int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
|
||||
@@ -2404,7 +2409,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
|
||||
* FIXME: set the FEC enabled state once pipe_config->port_clock is
|
||||
* already known, so the UHBR/non-UHBR mode can be determined.
|
||||
*/
|
||||
- intel_dp_fec_compute_config(intel_dp, pipe_config);
|
||||
+ pipe_config->fec_enable = intel_dp_needs_8b10b_fec(pipe_config, true);
|
||||
|
||||
if (!intel_dp_dsc_supports_format(connector, pipe_config->output_format))
|
||||
return -EINVAL;
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
|
||||
index 281ced3a3b39..0537be20fe7b 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp.h
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
|
||||
@@ -73,6 +73,8 @@ void intel_dp_encoder_flush_work(struct drm_encoder *encoder);
|
||||
int intel_dp_compute_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_state *pipe_config,
|
||||
struct drm_connector_state *conn_state);
|
||||
+bool intel_dp_needs_8b10b_fec(const struct intel_crtc_state *crtc_state,
|
||||
+ bool dsc_enabled_on_crtc);
|
||||
int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
|
||||
struct intel_crtc_state *pipe_config,
|
||||
struct drm_connector_state *conn_state,
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
index 27e952a67c34..d0590b5ffffd 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
@@ -296,7 +296,7 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
|
||||
/*
|
||||
* NOTE: The following must reset crtc_state->fec_enable for UHBR/DSC
|
||||
* after it was set by intel_dp_dsc_compute_config() ->
|
||||
- * intel_dp_fec_compute_config().
|
||||
+ * intel_dp_needs_8b10b_fec().
|
||||
*/
|
||||
if (dsc) {
|
||||
if (!intel_dp_supports_fec(intel_dp, connector, crtc_state))
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
From b762ae48293e2cc2145cdc91eb596d057f1aff11 Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@intel.com>
|
||||
Date: Wed, 15 Oct 2025 19:19:31 +0300
|
||||
Subject: [PATCH] drm/i915/dp_mst: Reuse the DP-SST helper function to compute
|
||||
FEC config
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Reuse the DP-SST helper to compute the state for the FEC enabled state
|
||||
for DP-MST as well.
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
||||
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
|
||||
Link: https://lore.kernel.org/r/20251015161934.262108-5-imre.deak@intel.com
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
index d0590b5ffffd..0cbb4c3a8e22 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
@@ -298,12 +298,10 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
|
||||
* after it was set by intel_dp_dsc_compute_config() ->
|
||||
* intel_dp_needs_8b10b_fec().
|
||||
*/
|
||||
- if (dsc) {
|
||||
- if (!intel_dp_supports_fec(intel_dp, connector, crtc_state))
|
||||
- return -EINVAL;
|
||||
-
|
||||
- crtc_state->fec_enable = !intel_dp_is_uhbr(crtc_state);
|
||||
- }
|
||||
+ crtc_state->fec_enable = intel_dp_needs_8b10b_fec(crtc_state, dsc);
|
||||
+ if (crtc_state->fec_enable &&
|
||||
+ !intel_dp_supports_fec(intel_dp, connector, crtc_state))
|
||||
+ return -EINVAL;
|
||||
|
||||
max_dpt_bpp_x16 = fxp_q4_from_int(intel_dp_mst_max_dpt_bpp(crtc_state, dsc));
|
||||
if (max_dpt_bpp_x16 && max_bpp_x16 > max_dpt_bpp_x16) {
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,100 +0,0 @@
|
||||
From 7c027070e98d7b515e4d3a94b54d288c61cb5918 Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@intel.com>
|
||||
Date: Wed, 15 Oct 2025 19:19:32 +0300
|
||||
Subject: [PATCH] drm/i915/dp_mst: Track DSC enabled status on the MST link
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Track whether DSC is enabled on any CRTC on a link. On DP-SST (and DSI)
|
||||
this will always match the CRTC's DSC state, those links having only a
|
||||
single stream (aka CRTC). For instance, on DP-MST if DSC is enabled for
|
||||
CRTC#0, but disabled for CRTC#1, the DSC/FEC state for these CRTCs will
|
||||
be as follows:
|
||||
|
||||
CRTC#0:
|
||||
- compression_enable = true
|
||||
- compression_enabled_on_link = true
|
||||
- fec_enable = true for 8b10b, false for 128b132b
|
||||
|
||||
CRTC#1:
|
||||
- compression_enable = false
|
||||
- compression_enabled_on_link = true
|
||||
- fec_enable = true for 8b10b, false for 128b132b
|
||||
|
||||
This patch only sets compression_enabled_on_link for CRTC#0 above and
|
||||
enables FEC on CRTC#0 if DSC was enabled on any other CRTC on the 8b10b
|
||||
MST link. A follow-up change will make sure that the state of all the
|
||||
CRTCs (CRTC#1 above) on an MST link is recomputed if DSC gets enabled on
|
||||
any CRTC, setting compression_enabled_on_link and fec_enable for these.
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
||||
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
|
||||
Link: https://lore.kernel.org/r/20251015161934.262108-6-imre.deak@intel.com
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
|
||||
index 203dd38a9ec4..20747fa4d3da 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
|
||||
@@ -1279,6 +1279,8 @@ struct intel_crtc_state {
|
||||
|
||||
/* Display Stream compression state */
|
||||
struct {
|
||||
+ /* Only used for state computation, not read out from the HW. */
|
||||
+ bool compression_enabled_on_link;
|
||||
bool compression_enable;
|
||||
int num_streams;
|
||||
/* Compressed Bpp in U6.4 format (first 4 bits for fractional part) */
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
index 844118735998..95884af242b3 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
@@ -2387,7 +2387,7 @@ bool intel_dp_needs_8b10b_fec(const struct intel_crtc_state *crtc_state,
|
||||
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
|
||||
return false;
|
||||
|
||||
- return dsc_enabled_on_crtc;
|
||||
+ return dsc_enabled_on_crtc || intel_dsc_enabled_on_link(crtc_state);
|
||||
}
|
||||
|
||||
int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
|
||||
index 803f3b395c79..dbf2cf1b896d 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
|
||||
@@ -374,9 +374,20 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)
|
||||
|
||||
void intel_dsc_enable_on_crtc(struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
+ crtc_state->dsc.compression_enabled_on_link = true;
|
||||
crtc_state->dsc.compression_enable = true;
|
||||
}
|
||||
|
||||
+bool intel_dsc_enabled_on_link(const struct intel_crtc_state *crtc_state)
|
||||
+{
|
||||
+ struct intel_display *display = to_intel_display(crtc_state);
|
||||
+
|
||||
+ drm_WARN_ON(display->drm, crtc_state->dsc.compression_enable &&
|
||||
+ !crtc_state->dsc.compression_enabled_on_link);
|
||||
+
|
||||
+ return crtc_state->dsc.compression_enabled_on_link;
|
||||
+}
|
||||
+
|
||||
enum intel_display_power_domain
|
||||
intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder)
|
||||
{
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.h b/drivers/gpu/drm/i915/display/intel_vdsc.h
|
||||
index 8c7c7fb652c3..99f64ac54b27 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_vdsc.h
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.h
|
||||
@@ -21,6 +21,7 @@ void intel_dsc_enable(const struct intel_crtc_state *crtc_state);
|
||||
void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
|
||||
int intel_dsc_compute_params(struct intel_crtc_state *pipe_config);
|
||||
void intel_dsc_enable_on_crtc(struct intel_crtc_state *crtc_state);
|
||||
+bool intel_dsc_enabled_on_link(const struct intel_crtc_state *crtc_state);
|
||||
void intel_dsc_get_config(struct intel_crtc_state *crtc_state);
|
||||
enum intel_display_power_domain
|
||||
intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder);
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,171 +0,0 @@
|
||||
From 470b84af457e34cbfa4d2c17dab78746736ab898 Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@intel.com>
|
||||
Date: Wed, 15 Oct 2025 19:19:33 +0300
|
||||
Subject: [PATCH] drm/i915/dp_mst: Recompute all MST link CRTCs if DSC gets
|
||||
enabled on the link
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The state of all the CRTCs on an MST link must be recomputed, if DSC
|
||||
gets enabled on any of the CRTCs on the link. For instance an MST
|
||||
docking station's Panel Replay capability may depend on whether DSC is
|
||||
enabled on any of the dock's streams (aka CRTCs). To assist the Panel
|
||||
Replay state computation for a CRTC based on the above, track in the
|
||||
CRTC state if DSC is enabled on any CRTC on an MST link.
|
||||
|
||||
The intel_link_bw_limits::force_fec_pipes mask is used for a reason
|
||||
similar to the above: enable FEC on all CRTCs of a non-UHBR (8b10b) MST
|
||||
link if DSC is enabled on any of the link's CRTCs. The FEC enabled state
|
||||
for a CRTC doesn't indicate if DSC is enabled on a UHBR MST link (FEC is
|
||||
always enabled by the HW for UHBR, hence it's not tracked by the
|
||||
intel_crtc_state::fec_enable flag for such links, where this flag is
|
||||
always false).
|
||||
|
||||
Based on the above, to be able to determine the DSC state on both
|
||||
non-UHBR and UHBR MST links, track the more generic DSC-enabled-on-link
|
||||
state (instead of the FEC-enabled-on-link state) for each CRTC in
|
||||
intel_link_bw_limits.
|
||||
|
||||
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
||||
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
|
||||
Link: https://lore.kernel.org/r/20251015161934.262108-7-imre.deak@intel.com
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
|
||||
index bbb6ff929d64..a8b4619de347 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_display.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_display.c
|
||||
@@ -4603,7 +4603,7 @@ intel_modeset_pipe_config(struct intel_atomic_state *state,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- crtc_state->fec_enable = limits->force_fec_pipes & BIT(crtc->pipe);
|
||||
+ crtc_state->dsc.compression_enabled_on_link = limits->link_dsc_pipes & BIT(crtc->pipe);
|
||||
crtc_state->max_link_bpp_x16 = limits->max_bpp_x16[crtc->pipe];
|
||||
|
||||
if (crtc_state->pipe_bpp > fxp_q4_to_int(crtc_state->max_link_bpp_x16)) {
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
index 0cbb4c3a8e22..a845b2612a3f 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
|
||||
@@ -814,14 +814,14 @@ static u8 get_pipes_downstream_of_mst_port(struct intel_atomic_state *state,
|
||||
return mask;
|
||||
}
|
||||
|
||||
-static int intel_dp_mst_check_fec_change(struct intel_atomic_state *state,
|
||||
+static int intel_dp_mst_check_dsc_change(struct intel_atomic_state *state,
|
||||
struct drm_dp_mst_topology_mgr *mst_mgr,
|
||||
struct intel_link_bw_limits *limits)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(state);
|
||||
struct intel_crtc *crtc;
|
||||
u8 mst_pipe_mask;
|
||||
- u8 fec_pipe_mask = 0;
|
||||
+ u8 dsc_pipe_mask = 0;
|
||||
int ret;
|
||||
|
||||
mst_pipe_mask = get_pipes_downstream_of_mst_port(state, mst_mgr, NULL);
|
||||
@@ -834,16 +834,16 @@ static int intel_dp_mst_check_fec_change(struct intel_atomic_state *state,
|
||||
if (drm_WARN_ON(display->drm, !crtc_state))
|
||||
return -EINVAL;
|
||||
|
||||
- if (crtc_state->fec_enable)
|
||||
- fec_pipe_mask |= BIT(crtc->pipe);
|
||||
+ if (intel_dsc_enabled_on_link(crtc_state))
|
||||
+ dsc_pipe_mask |= BIT(crtc->pipe);
|
||||
}
|
||||
|
||||
- if (!fec_pipe_mask || mst_pipe_mask == fec_pipe_mask)
|
||||
+ if (!dsc_pipe_mask || mst_pipe_mask == dsc_pipe_mask)
|
||||
return 0;
|
||||
|
||||
- limits->force_fec_pipes |= mst_pipe_mask;
|
||||
+ limits->link_dsc_pipes |= mst_pipe_mask;
|
||||
|
||||
- ret = intel_modeset_pipes_in_mask_early(state, "MST FEC",
|
||||
+ ret = intel_modeset_pipes_in_mask_early(state, "MST DSC",
|
||||
mst_pipe_mask);
|
||||
|
||||
return ret ? : -EAGAIN;
|
||||
@@ -897,7 +897,7 @@ int intel_dp_mst_atomic_check_link(struct intel_atomic_state *state,
|
||||
int i;
|
||||
|
||||
for_each_new_mst_mgr_in_state(&state->base, mgr, mst_state, i) {
|
||||
- ret = intel_dp_mst_check_fec_change(state, mgr, limits);
|
||||
+ ret = intel_dp_mst_check_dsc_change(state, mgr, limits);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.c b/drivers/gpu/drm/i915/display/intel_link_bw.c
|
||||
index f52dee0ea412..d2862de894fa 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_link_bw.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_link_bw.c
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "intel_dp_tunnel.h"
|
||||
#include "intel_fdi.h"
|
||||
#include "intel_link_bw.h"
|
||||
+#include "intel_vdsc.h"
|
||||
|
||||
static int get_forced_link_bpp_x16(struct intel_atomic_state *state,
|
||||
const struct intel_crtc *crtc)
|
||||
@@ -55,7 +56,7 @@ void intel_link_bw_init_limits(struct intel_atomic_state *state,
|
||||
struct intel_display *display = to_intel_display(state);
|
||||
enum pipe pipe;
|
||||
|
||||
- limits->force_fec_pipes = 0;
|
||||
+ limits->link_dsc_pipes = 0;
|
||||
limits->bpp_limit_reached_pipes = 0;
|
||||
for_each_pipe(display, pipe) {
|
||||
struct intel_crtc *crtc = intel_crtc_for_pipe(display, pipe);
|
||||
@@ -65,8 +66,8 @@ void intel_link_bw_init_limits(struct intel_atomic_state *state,
|
||||
|
||||
if (state->base.duplicated && crtc_state) {
|
||||
limits->max_bpp_x16[pipe] = crtc_state->max_link_bpp_x16;
|
||||
- if (crtc_state->fec_enable)
|
||||
- limits->force_fec_pipes |= BIT(pipe);
|
||||
+ if (intel_dsc_enabled_on_link(crtc_state))
|
||||
+ limits->link_dsc_pipes |= BIT(pipe);
|
||||
} else {
|
||||
limits->max_bpp_x16[pipe] = INT_MAX;
|
||||
}
|
||||
@@ -265,10 +266,10 @@ assert_link_limit_change_valid(struct intel_display *display,
|
||||
bool bpps_changed = false;
|
||||
enum pipe pipe;
|
||||
|
||||
- /* FEC can't be forced off after it was forced on. */
|
||||
+ /* DSC can't be disabled after it was enabled. */
|
||||
if (drm_WARN_ON(display->drm,
|
||||
- (old_limits->force_fec_pipes & new_limits->force_fec_pipes) !=
|
||||
- old_limits->force_fec_pipes))
|
||||
+ (old_limits->link_dsc_pipes & new_limits->link_dsc_pipes) !=
|
||||
+ old_limits->link_dsc_pipes))
|
||||
return false;
|
||||
|
||||
for_each_pipe(display, pipe) {
|
||||
@@ -286,8 +287,8 @@ assert_link_limit_change_valid(struct intel_display *display,
|
||||
/* At least one limit must change. */
|
||||
if (drm_WARN_ON(display->drm,
|
||||
!bpps_changed &&
|
||||
- new_limits->force_fec_pipes ==
|
||||
- old_limits->force_fec_pipes))
|
||||
+ new_limits->link_dsc_pipes ==
|
||||
+ old_limits->link_dsc_pipes))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_link_bw.h b/drivers/gpu/drm/i915/display/intel_link_bw.h
|
||||
index 95ab7c50c61d..cb18e171037c 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_link_bw.h
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_link_bw.h
|
||||
@@ -15,7 +15,7 @@ struct intel_connector;
|
||||
struct intel_crtc_state;
|
||||
|
||||
struct intel_link_bw_limits {
|
||||
- u8 force_fec_pipes;
|
||||
+ u8 link_dsc_pipes;
|
||||
u8 bpp_limit_reached_pipes;
|
||||
/* in 1/16 bpp units */
|
||||
int max_bpp_x16[I915_MAX_PIPES];
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,248 +0,0 @@
|
||||
From c390bf07961b3a39f3417d75850a4e721b87e595 Mon Sep 17 00:00:00 2001
|
||||
From: Imre Deak <imre.deak@intel.com>
|
||||
Date: Wed, 15 Oct 2025 19:19:34 +0300
|
||||
Subject: [PATCH] drm/i915/dp: Fix panel replay when DSC is enabled
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Prevent enabling panel replay if the sink doesn't support this due to
|
||||
DSC being enabled.
|
||||
|
||||
Panel replay has two modes, updating full frames or only selected
|
||||
regions of the frame. If the sink doesn't support Panel Replay in full
|
||||
frame update mode with DSC prevent Panel Replay completely if DSC is
|
||||
enabled. If the sink doesn't support Panel Replay only in the selective
|
||||
update mode while DSC is enabled, it will still support Panel Replay in
|
||||
the full frame update mode, so only prevent selective updates in this
|
||||
case.
|
||||
|
||||
v2:
|
||||
- Use Panel Replay instead of PR in debug prints. (Jouni)
|
||||
- Rebase on change tracking the link DSC state in the crtc state.
|
||||
|
||||
Cc: Jouni Högander <jouni.hogander@intel.com>
|
||||
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14869
|
||||
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
|
||||
Signed-off-by: Imre Deak <imre.deak@intel.com>
|
||||
Link: https://lore.kernel.org/r/20251015161934.262108-8-imre.deak@intel.com
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
|
||||
index 20747fa4d3da..1e0cd81c9474 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
|
||||
@@ -955,6 +955,12 @@ struct intel_csc_matrix {
|
||||
u16 postoff[3];
|
||||
};
|
||||
|
||||
+enum intel_panel_replay_dsc_support {
|
||||
+ INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED,
|
||||
+ INTEL_DP_PANEL_REPLAY_DSC_FULL_FRAME_ONLY,
|
||||
+ INTEL_DP_PANEL_REPLAY_DSC_SELECTIVE_UPDATE,
|
||||
+};
|
||||
+
|
||||
struct intel_crtc_state {
|
||||
/*
|
||||
* uapi (drm) state. This is the software state shown to userspace.
|
||||
@@ -1133,6 +1139,8 @@ struct intel_crtc_state {
|
||||
bool has_panel_replay;
|
||||
bool wm_level_disabled;
|
||||
bool pkg_c_latency_used;
|
||||
+ /* Only used for state verification. */
|
||||
+ enum intel_panel_replay_dsc_support panel_replay_dsc_support;
|
||||
u32 dc3co_exitline;
|
||||
u16 su_y_granularity;
|
||||
u8 active_non_psr_pipes;
|
||||
@@ -1706,6 +1714,7 @@ struct intel_psr {
|
||||
bool source_panel_replay_support;
|
||||
bool sink_panel_replay_support;
|
||||
bool sink_panel_replay_su_support;
|
||||
+ enum intel_panel_replay_dsc_support sink_panel_replay_dsc_support;
|
||||
bool panel_replay_enabled;
|
||||
u32 dc3co_exitline;
|
||||
u32 dc3co_exit_delay;
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
index 95884af242b3..215ad690ab07 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
|
||||
@@ -6053,6 +6053,8 @@ intel_dp_detect(struct drm_connector *_connector,
|
||||
memset(connector->dp.dsc_dpcd, 0, sizeof(connector->dp.dsc_dpcd));
|
||||
intel_dp->psr.sink_panel_replay_support = false;
|
||||
intel_dp->psr.sink_panel_replay_su_support = false;
|
||||
+ intel_dp->psr.sink_panel_replay_dsc_support =
|
||||
+ INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED;
|
||||
|
||||
intel_dp_mst_disconnect(intel_dp);
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
|
||||
index 703e5f6af04c..3e99a65ec988 100644
|
||||
--- a/drivers/gpu/drm/i915/display/intel_psr.c
|
||||
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
#include "i915_reg.h"
|
||||
+#include "i915_utils.h"
|
||||
#include "intel_alpm.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_crtc.h"
|
||||
@@ -50,6 +51,7 @@
|
||||
#include "intel_snps_phy.h"
|
||||
#include "intel_step.h"
|
||||
#include "intel_vblank.h"
|
||||
+#include "intel_vdsc.h"
|
||||
#include "intel_vrr.h"
|
||||
#include "skl_universal_plane.h"
|
||||
|
||||
@@ -580,6 +582,44 @@ static void intel_dp_get_su_granularity(struct intel_dp *intel_dp)
|
||||
intel_dp->psr.su_y_granularity = y;
|
||||
}
|
||||
|
||||
+static enum intel_panel_replay_dsc_support
|
||||
+compute_pr_dsc_support(struct intel_dp *intel_dp)
|
||||
+{
|
||||
+ u8 pr_dsc_mode;
|
||||
+ u8 val;
|
||||
+
|
||||
+ val = intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_CAPABILITY)];
|
||||
+ pr_dsc_mode = REG_FIELD_GET8(DP_PANEL_REPLAY_DSC_DECODE_CAPABILITY_IN_PR_MASK, val);
|
||||
+
|
||||
+ switch (pr_dsc_mode) {
|
||||
+ case DP_DSC_DECODE_CAPABILITY_IN_PR_FULL_FRAME_ONLY:
|
||||
+ return INTEL_DP_PANEL_REPLAY_DSC_FULL_FRAME_ONLY;
|
||||
+ case DP_DSC_DECODE_CAPABILITY_IN_PR_SUPPORTED:
|
||||
+ return INTEL_DP_PANEL_REPLAY_DSC_SELECTIVE_UPDATE;
|
||||
+ default:
|
||||
+ MISSING_CASE(pr_dsc_mode);
|
||||
+ fallthrough;
|
||||
+ case DP_DSC_DECODE_CAPABILITY_IN_PR_NOT_SUPPORTED:
|
||||
+ case DP_DSC_DECODE_CAPABILITY_IN_PR_RESERVED:
|
||||
+ return INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static const char *panel_replay_dsc_support_str(enum intel_panel_replay_dsc_support dsc_support)
|
||||
+{
|
||||
+ switch (dsc_support) {
|
||||
+ case INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED:
|
||||
+ return "not supported";
|
||||
+ case INTEL_DP_PANEL_REPLAY_DSC_FULL_FRAME_ONLY:
|
||||
+ return "full frame only";
|
||||
+ case INTEL_DP_PANEL_REPLAY_DSC_SELECTIVE_UPDATE:
|
||||
+ return "selective update";
|
||||
+ default:
|
||||
+ MISSING_CASE(dsc_support);
|
||||
+ return "n/a";
|
||||
+ };
|
||||
+}
|
||||
+
|
||||
static void _panel_replay_init_dpcd(struct intel_dp *intel_dp)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(intel_dp);
|
||||
@@ -615,10 +655,13 @@ static void _panel_replay_init_dpcd(struct intel_dp *intel_dp)
|
||||
DP_PANEL_REPLAY_SU_SUPPORT)
|
||||
intel_dp->psr.sink_panel_replay_su_support = true;
|
||||
|
||||
+ intel_dp->psr.sink_panel_replay_dsc_support = compute_pr_dsc_support(intel_dp);
|
||||
+
|
||||
drm_dbg_kms(display->drm,
|
||||
- "Panel replay %sis supported by panel\n",
|
||||
+ "Panel replay %sis supported by panel (in DSC mode: %s)\n",
|
||||
intel_dp->psr.sink_panel_replay_su_support ?
|
||||
- "selective_update " : "");
|
||||
+ "selective_update " : "",
|
||||
+ panel_replay_dsc_support_str(intel_dp->psr.sink_panel_replay_dsc_support));
|
||||
}
|
||||
|
||||
static void _psr_init_dpcd(struct intel_dp *intel_dp)
|
||||
@@ -1606,9 +1649,21 @@ static bool intel_sel_update_config_valid(struct intel_dp *intel_dp,
|
||||
goto unsupported;
|
||||
}
|
||||
|
||||
- if (crtc_state->has_panel_replay && (DISPLAY_VER(display) < 14 ||
|
||||
- !intel_dp->psr.sink_panel_replay_su_support))
|
||||
- goto unsupported;
|
||||
+ if (crtc_state->has_panel_replay) {
|
||||
+ if (DISPLAY_VER(display) < 14)
|
||||
+ goto unsupported;
|
||||
+
|
||||
+ if (!intel_dp->psr.sink_panel_replay_su_support)
|
||||
+ goto unsupported;
|
||||
+
|
||||
+ if (intel_dsc_enabled_on_link(crtc_state) &&
|
||||
+ intel_dp->psr.sink_panel_replay_dsc_support !=
|
||||
+ INTEL_DP_PANEL_REPLAY_DSC_SELECTIVE_UPDATE) {
|
||||
+ drm_dbg_kms(display->drm,
|
||||
+ "Selective update with Panel Replay not enabled because it's not supported with DSC\n");
|
||||
+ goto unsupported;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (crtc_state->crc_enabled) {
|
||||
drm_dbg_kms(display->drm,
|
||||
@@ -1685,6 +1740,14 @@ _panel_replay_compute_config(struct intel_dp *intel_dp,
|
||||
return false;
|
||||
}
|
||||
|
||||
+ if (intel_dsc_enabled_on_link(crtc_state) &&
|
||||
+ intel_dp->psr.sink_panel_replay_dsc_support ==
|
||||
+ INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED) {
|
||||
+ drm_dbg_kms(display->drm,
|
||||
+ "Panel Replay not enabled because it's not supported with DSC\n");
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
if (!intel_dp_is_edp(intel_dp))
|
||||
return true;
|
||||
|
||||
@@ -1790,6 +1853,8 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
|
||||
return;
|
||||
}
|
||||
|
||||
+ /* Only used for state verification. */
|
||||
+ crtc_state->panel_replay_dsc_support = intel_dp->psr.sink_panel_replay_dsc_support;
|
||||
crtc_state->has_panel_replay = _panel_replay_compute_config(intel_dp,
|
||||
crtc_state,
|
||||
conn_state);
|
||||
@@ -2991,6 +3056,20 @@ void intel_psr_pre_plane_update(struct intel_atomic_state *state,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+verify_panel_replay_dsc_state(const struct intel_crtc_state *crtc_state)
|
||||
+{
|
||||
+ struct intel_display *display = to_intel_display(crtc_state);
|
||||
+
|
||||
+ if (!crtc_state->has_panel_replay)
|
||||
+ return;
|
||||
+
|
||||
+ drm_WARN_ON(display->drm,
|
||||
+ intel_dsc_enabled_on_link(crtc_state) &&
|
||||
+ crtc_state->panel_replay_dsc_support ==
|
||||
+ INTEL_DP_PANEL_REPLAY_DSC_NOT_SUPPORTED);
|
||||
+}
|
||||
+
|
||||
void intel_psr_post_plane_update(struct intel_atomic_state *state,
|
||||
struct intel_crtc *crtc)
|
||||
{
|
||||
@@ -3002,6 +3081,8 @@ void intel_psr_post_plane_update(struct intel_atomic_state *state,
|
||||
if (!crtc_state->has_psr)
|
||||
return;
|
||||
|
||||
+ verify_panel_replay_dsc_state(crtc_state);
|
||||
+
|
||||
for_each_intel_encoder_mask_with_psr(state->base.dev, encoder,
|
||||
crtc_state->uapi.encoder_mask) {
|
||||
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
|
||||
@@ -4031,6 +4112,8 @@ static void intel_psr_sink_capability(struct intel_dp *intel_dp,
|
||||
seq_printf(m, ", Panel Replay = %s", str_yes_no(psr->sink_panel_replay_support));
|
||||
seq_printf(m, ", Panel Replay Selective Update = %s",
|
||||
str_yes_no(psr->sink_panel_replay_su_support));
|
||||
+ seq_printf(m, ", Panel Replay DSC support = %s",
|
||||
+ panel_replay_dsc_support_str(psr->sink_panel_replay_dsc_support));
|
||||
if (intel_dp->pr_dpcd[INTEL_PR_DPCD_INDEX(DP_PANEL_REPLAY_CAP_SUPPORT)] &
|
||||
DP_PANEL_REPLAY_EARLY_TRANSPORT_SUPPORT)
|
||||
seq_printf(m, " (Early Transport)");
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,65 +0,0 @@
|
||||
From af5918335a6b77434c851c87d24e75eb7f93b8cb Mon Sep 17 00:00:00 2001
|
||||
From: David Marlin <dmarlin@redhat.com>
|
||||
Date: Wed, 15 Apr 2026 22:49:21 -0500
|
||||
Subject: [PATCH] Bluetooth: SCO: Fix use-after-free in sco_recv_frame() due to
|
||||
missing sock_hold
|
||||
|
||||
JIRA: https://issues.redhat.com/browse/RHEL-157827
|
||||
|
||||
commit 598dbba9919c5e36c54fe1709b557d64120cb94b
|
||||
Author: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Date: Fri Mar 13 05:26:16 2026 +0900
|
||||
|
||||
Bluetooth: SCO: Fix use-after-free in sco_recv_frame() due to missing sock_hold
|
||||
|
||||
sco_recv_frame() reads conn->sk under sco_conn_lock() but immediately
|
||||
releases the lock without holding a reference to the socket. A concurrent
|
||||
close() can free the socket between the lock release and the subsequent
|
||||
sk->sk_state access, resulting in a use-after-free.
|
||||
|
||||
Other functions in the same file (sco_sock_timeout(), sco_conn_del())
|
||||
correctly use sco_sock_hold() to safely hold a reference under the lock.
|
||||
|
||||
Fix by using sco_sock_hold() to take a reference before releasing the
|
||||
lock, and adding sock_put() on all exit paths.
|
||||
|
||||
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
|
||||
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
|
||||
Signed-off-by: David Marlin <dmarlin@redhat.com>
|
||||
|
||||
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
|
||||
index 2b937df7a71f..6fc0914c74cb 100644
|
||||
--- a/net/bluetooth/sco.c
|
||||
+++ b/net/bluetooth/sco.c
|
||||
@@ -401,7 +401,7 @@ static void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
|
||||
struct sock *sk;
|
||||
|
||||
sco_conn_lock(conn);
|
||||
- sk = conn->sk;
|
||||
+ sk = sco_sock_hold(conn);
|
||||
sco_conn_unlock(conn);
|
||||
|
||||
if (!sk)
|
||||
@@ -410,11 +410,15 @@ static void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
|
||||
BT_DBG("sk %p len %u", sk, skb->len);
|
||||
|
||||
if (sk->sk_state != BT_CONNECTED)
|
||||
- goto drop;
|
||||
+ goto drop_put;
|
||||
|
||||
- if (!sock_queue_rcv_skb(sk, skb))
|
||||
+ if (!sock_queue_rcv_skb(sk, skb)) {
|
||||
+ sock_put(sk);
|
||||
return;
|
||||
+ }
|
||||
|
||||
+drop_put:
|
||||
+ sock_put(sk);
|
||||
drop:
|
||||
kfree_skb(skb);
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,98 +0,0 @@
|
||||
From b53cdfa3715c656f739adda6465bc405c536f37b Mon Sep 17 00:00:00 2001
|
||||
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
Date: Tue, 28 Apr 2026 14:00:04 +0200
|
||||
Subject: [PATCH] scsi: storvsc: Handle PERSISTENT_RESERVE_IN truncation for
|
||||
Hyper-V vFC
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-171460
|
||||
|
||||
commit 9cf351b289fb2be22491fa3964f99126db67aa08
|
||||
Author: Li Tian <litian@redhat.com>
|
||||
Date: Mon Apr 6 09:53:44 2026 +0800
|
||||
|
||||
scsi: storvsc: Handle PERSISTENT_RESERVE_IN truncation for Hyper-V vFC
|
||||
|
||||
The storvsc driver has become stricter in handling SRB status codes
|
||||
returned by the Hyper-V host. When using Virtual Fibre Channel (vFC)
|
||||
passthrough, the host may return SRB_STATUS_DATA_OVERRUN for
|
||||
PERSISTENT_RESERVE_IN commands if the allocation length in the CDB does
|
||||
not match the host's expected response size.
|
||||
|
||||
Currently, this status is treated as a fatal error, propagating
|
||||
Host_status=0x07 [DID_ERROR] to the SCSI mid-layer. This causes
|
||||
userspace storage utilities (such as sg_persist) to fail with transport
|
||||
errors, even when the host has actually returned the requested
|
||||
reservation data in the buffer.
|
||||
|
||||
Refactor the existing command-specific workarounds into a new helper
|
||||
function, storvsc_host_mishandles_cmd(), and add PERSISTENT_RESERVE_IN
|
||||
to the list of commands where SRB status errors should be suppressed for
|
||||
vFC devices. This ensures that the SCSI mid-layer processes the returned
|
||||
data buffer instead of terminating the command.
|
||||
|
||||
Signed-off-by: Li Tian <litian@redhat.com>
|
||||
Reviewed-by: Long Li <longli@microsoft.com>
|
||||
Reviewed-by: Laurence Oberman <loberman@redhat.com>
|
||||
Link: https://patch.msgid.link/20260406015344.12566-1-litian@redhat.com
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
|
||||
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
||||
|
||||
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
|
||||
index b47cda30e109..11e3aaae77be 100644
|
||||
--- a/drivers/scsi/storvsc_drv.c
|
||||
+++ b/drivers/scsi/storvsc_drv.c
|
||||
@@ -1131,6 +1131,26 @@ static void storvsc_command_completion(struct storvsc_cmd_request *cmd_request,
|
||||
kfree(payload);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * The current SCSI handling on the host side does not correctly handle:
|
||||
+ * INQUIRY with page code 0x80, MODE_SENSE / MODE_SENSE_10 with cmd[2] == 0x1c,
|
||||
+ * and (for FC) MAINTENANCE_IN / PERSISTENT_RESERVE_IN passthrough.
|
||||
+ */
|
||||
+static bool storvsc_host_mishandles_cmd(u8 opcode, struct hv_device *device)
|
||||
+{
|
||||
+ switch (opcode) {
|
||||
+ case INQUIRY:
|
||||
+ case MODE_SENSE:
|
||||
+ case MODE_SENSE_10:
|
||||
+ return true;
|
||||
+ case MAINTENANCE_IN:
|
||||
+ case PERSISTENT_RESERVE_IN:
|
||||
+ return hv_dev_is_fc(device);
|
||||
+ default:
|
||||
+ return false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void storvsc_on_io_completion(struct storvsc_device *stor_device,
|
||||
struct vstor_packet *vstor_packet,
|
||||
struct storvsc_cmd_request *request)
|
||||
@@ -1141,22 +1161,12 @@ static void storvsc_on_io_completion(struct storvsc_device *stor_device,
|
||||
stor_pkt = &request->vstor_packet;
|
||||
|
||||
/*
|
||||
- * The current SCSI handling on the host side does
|
||||
- * not correctly handle:
|
||||
- * INQUIRY command with page code parameter set to 0x80
|
||||
- * MODE_SENSE and MODE_SENSE_10 command with cmd[2] == 0x1c
|
||||
- * MAINTENANCE_IN is not supported by HyperV FC passthrough
|
||||
- *
|
||||
* Setup srb and scsi status so this won't be fatal.
|
||||
* We do this so we can distinguish truly fatal failues
|
||||
* (srb status == 0x4) and off-line the device in that case.
|
||||
*/
|
||||
|
||||
- if ((stor_pkt->vm_srb.cdb[0] == INQUIRY) ||
|
||||
- (stor_pkt->vm_srb.cdb[0] == MODE_SENSE) ||
|
||||
- (stor_pkt->vm_srb.cdb[0] == MODE_SENSE_10) ||
|
||||
- (stor_pkt->vm_srb.cdb[0] == MAINTENANCE_IN &&
|
||||
- hv_dev_is_fc(device))) {
|
||||
+ if (storvsc_host_mishandles_cmd(stor_pkt->vm_srb.cdb[0], device)) {
|
||||
vstor_packet->vm_srb.scsi_status = 0;
|
||||
vstor_packet->vm_srb.srb_status = SRB_STATUS_SUCCESS;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
From 288852ae095fabc060f4823784bec8cd5baf2edf Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Thu, 30 Apr 2026 12:54:18 +0800
|
||||
Subject: [PATCH] crypto: af-alg - fix NULL pointer dereference in scatterwalk
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
|
||||
Upstream Status: 62397b493e14107ae82d8b80938f293d95425bcb
|
||||
|
||||
commit 62397b493e14107ae82d8b80938f293d95425bcb
|
||||
Author: Norbert Szetei <norbert@doyensec.com>
|
||||
Date: Wed Mar 25 18:26:13 2026 +0100
|
||||
|
||||
crypto: af-alg - fix NULL pointer dereference in scatterwalk
|
||||
|
||||
The AF_ALG interface fails to unmark the end of a Scatter/Gather List (SGL)
|
||||
when chaining a new af_alg_tsgl structure. If a sendmsg() fills an SGL
|
||||
exactly to MAX_SGL_ENTS, the last entry is marked as the end. A subsequent
|
||||
sendmsg() allocates a new SGL and chains it, but fails to clear the end
|
||||
marker on the previous SGL's last data entry.
|
||||
|
||||
This causes the crypto scatterwalk to hit a premature end, returning NULL
|
||||
on sg_next() and leading to a kernel panic during dereference.
|
||||
|
||||
Fix this by explicitly unmarking the end of the previous SGL when
|
||||
performing sg_chain() in af_alg_alloc_tsgl().
|
||||
|
||||
Fixes: 8ff590903d5f ("crypto: algif_skcipher - User-space interface for skcipher operations")
|
||||
Signed-off-by: Norbert Szetei <norbert@doyensec.com>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
|
||||
index 0da7c1ac778a..1594a2dd9222 100644
|
||||
--- a/crypto/af_alg.c
|
||||
+++ b/crypto/af_alg.c
|
||||
@@ -623,8 +623,10 @@ static int af_alg_alloc_tsgl(struct sock *sk)
|
||||
sg_init_table(sgl->sg, MAX_SGL_ENTS + 1);
|
||||
sgl->cur = 0;
|
||||
|
||||
- if (sg)
|
||||
+ if (sg) {
|
||||
+ sg_unmark_end(sg + MAX_SGL_ENTS - 1);
|
||||
sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg);
|
||||
+ }
|
||||
|
||||
list_add_tail(&sgl->list, &ctx->tsgl_list);
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,327 +0,0 @@
|
||||
From 290aaf22a335e76982159d1cb5eec8566628fa40 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Thu, 30 Apr 2026 20:52:06 +0800
|
||||
Subject: [PATCH] crypto: algif_aead - Revert to operating out-of-place
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
CVE: CVE-2026-31431
|
||||
|
||||
Upstream Status: a664bf3d603dc3bdcf9ae47cc21e0daec706d7a5
|
||||
|
||||
commit a664bf3d603dc3bdcf9ae47cc21e0daec706d7a5
|
||||
Author: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Date: Thu Mar 26 15:30:20 2026 +0900
|
||||
|
||||
crypto: algif_aead - Revert to operating out-of-place
|
||||
|
||||
This mostly reverts commit 72548b093ee3 except for the copying of
|
||||
the associated data.
|
||||
|
||||
There is no benefit in operating in-place in algif_aead since the
|
||||
source and destination come from different mappings. Get rid of
|
||||
all the complexity added for in-place operation and just copy the
|
||||
AD directly.
|
||||
|
||||
Fixes: 72548b093ee3 ("crypto: algif_aead - copy AAD from src to dst")
|
||||
Reported-by: Taeyang Lee <0wn@theori.io>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
|
||||
index 1594a2dd9222..b2fe28992ebf 100644
|
||||
--- a/crypto/af_alg.c
|
||||
+++ b/crypto/af_alg.c
|
||||
@@ -637,15 +637,13 @@ static int af_alg_alloc_tsgl(struct sock *sk)
|
||||
/**
|
||||
* af_alg_count_tsgl - Count number of TX SG entries
|
||||
*
|
||||
- * The counting starts from the beginning of the SGL to @bytes. If
|
||||
- * an @offset is provided, the counting of the SG entries starts at the @offset.
|
||||
+ * The counting starts from the beginning of the SGL to @bytes.
|
||||
*
|
||||
* @sk: socket of connection to user space
|
||||
* @bytes: Count the number of SG entries holding given number of bytes.
|
||||
- * @offset: Start the counting of SG entries from the given offset.
|
||||
* Return: Number of TX SG entries found given the constraints
|
||||
*/
|
||||
-unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset)
|
||||
+unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes)
|
||||
{
|
||||
const struct alg_sock *ask = alg_sk(sk);
|
||||
const struct af_alg_ctx *ctx = ask->private;
|
||||
@@ -660,25 +658,11 @@ unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset)
|
||||
const struct scatterlist *sg = sgl->sg;
|
||||
|
||||
for (i = 0; i < sgl->cur; i++) {
|
||||
- size_t bytes_count;
|
||||
-
|
||||
- /* Skip offset */
|
||||
- if (offset >= sg[i].length) {
|
||||
- offset -= sg[i].length;
|
||||
- bytes -= sg[i].length;
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- bytes_count = sg[i].length - offset;
|
||||
-
|
||||
- offset = 0;
|
||||
sgl_count++;
|
||||
-
|
||||
- /* If we have seen requested number of bytes, stop */
|
||||
- if (bytes_count >= bytes)
|
||||
+ if (sg[i].length >= bytes)
|
||||
return sgl_count;
|
||||
|
||||
- bytes -= bytes_count;
|
||||
+ bytes -= sg[i].length;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -690,19 +674,14 @@ EXPORT_SYMBOL_GPL(af_alg_count_tsgl);
|
||||
* af_alg_pull_tsgl - Release the specified buffers from TX SGL
|
||||
*
|
||||
* If @dst is non-null, reassign the pages to @dst. The caller must release
|
||||
- * the pages. If @dst_offset is given only reassign the pages to @dst starting
|
||||
- * at the @dst_offset (byte). The caller must ensure that @dst is large
|
||||
- * enough (e.g. by using af_alg_count_tsgl with the same offset).
|
||||
+ * the pages.
|
||||
*
|
||||
* @sk: socket of connection to user space
|
||||
* @used: Number of bytes to pull from TX SGL
|
||||
* @dst: If non-NULL, buffer is reassigned to dst SGL instead of releasing. The
|
||||
* caller must release the buffers in dst.
|
||||
- * @dst_offset: Reassign the TX SGL from given offset. All buffers before
|
||||
- * reaching the offset is released.
|
||||
*/
|
||||
-void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
|
||||
- size_t dst_offset)
|
||||
+void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst)
|
||||
{
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
struct af_alg_ctx *ctx = ask->private;
|
||||
@@ -727,18 +706,10 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
|
||||
* SG entries in dst.
|
||||
*/
|
||||
if (dst) {
|
||||
- if (dst_offset >= plen) {
|
||||
- /* discard page before offset */
|
||||
- dst_offset -= plen;
|
||||
- } else {
|
||||
- /* reassign page to dst after offset */
|
||||
- get_page(page);
|
||||
- sg_set_page(dst + j, page,
|
||||
- plen - dst_offset,
|
||||
- sg[i].offset + dst_offset);
|
||||
- dst_offset = 0;
|
||||
- j++;
|
||||
- }
|
||||
+ /* reassign page to dst after offset */
|
||||
+ get_page(page);
|
||||
+ sg_set_page(dst + j, page, plen, sg[i].offset);
|
||||
+ j++;
|
||||
}
|
||||
|
||||
sg[i].length -= plen;
|
||||
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
|
||||
index 7d58cbbce4af..dff71bd753a7 100644
|
||||
--- a/crypto/algif_aead.c
|
||||
+++ b/crypto/algif_aead.c
|
||||
@@ -96,9 +96,8 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
struct aead_tfm *aeadc = pask->private;
|
||||
struct crypto_aead *tfm = aeadc->aead;
|
||||
struct crypto_sync_skcipher *null_tfm = aeadc->null_tfm;
|
||||
- unsigned int i, as = crypto_aead_authsize(tfm);
|
||||
+ unsigned int as = crypto_aead_authsize(tfm);
|
||||
struct af_alg_async_req *areq;
|
||||
- struct af_alg_tsgl *tsgl, *tmp;
|
||||
struct scatterlist *rsgl_src, *tsgl_src = NULL;
|
||||
int err = 0;
|
||||
size_t used = 0; /* [in] TX bufs to be en/decrypted */
|
||||
@@ -178,23 +177,24 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
outlen -= less;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * Create a per request TX SGL for this request which tracks the
|
||||
+ * SG entries from the global TX SGL.
|
||||
+ */
|
||||
processed = used + ctx->aead_assoclen;
|
||||
- list_for_each_entry_safe(tsgl, tmp, &ctx->tsgl_list, list) {
|
||||
- for (i = 0; i < tsgl->cur; i++) {
|
||||
- struct scatterlist *process_sg = tsgl->sg + i;
|
||||
-
|
||||
- if (!(process_sg->length) || !sg_page(process_sg))
|
||||
- continue;
|
||||
- tsgl_src = process_sg;
|
||||
- break;
|
||||
- }
|
||||
- if (tsgl_src)
|
||||
- break;
|
||||
- }
|
||||
- if (processed && !tsgl_src) {
|
||||
- err = -EFAULT;
|
||||
+ areq->tsgl_entries = af_alg_count_tsgl(sk, processed);
|
||||
+ if (!areq->tsgl_entries)
|
||||
+ areq->tsgl_entries = 1;
|
||||
+ areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl),
|
||||
+ areq->tsgl_entries),
|
||||
+ GFP_KERNEL);
|
||||
+ if (!areq->tsgl) {
|
||||
+ err = -ENOMEM;
|
||||
goto free;
|
||||
}
|
||||
+ sg_init_table(areq->tsgl, areq->tsgl_entries);
|
||||
+ af_alg_pull_tsgl(sk, processed, areq->tsgl);
|
||||
+ tsgl_src = areq->tsgl;
|
||||
|
||||
/*
|
||||
* Copy of AAD from source to destination
|
||||
@@ -203,83 +203,18 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
* when user space uses an in-place cipher operation, the kernel
|
||||
* will copy the data as it does not see whether such in-place operation
|
||||
* is initiated.
|
||||
- *
|
||||
- * To ensure efficiency, the following implementation ensure that the
|
||||
- * ciphers are invoked to perform a crypto operation in-place. This
|
||||
- * is achieved by memory management specified as follows.
|
||||
*/
|
||||
|
||||
/* Use the RX SGL as source (and destination) for crypto op. */
|
||||
rsgl_src = areq->first_rsgl.sgl.sgt.sgl;
|
||||
|
||||
- if (ctx->enc) {
|
||||
- /*
|
||||
- * Encryption operation - The in-place cipher operation is
|
||||
- * achieved by the following operation:
|
||||
- *
|
||||
- * TX SGL: AAD || PT
|
||||
- * | |
|
||||
- * | copy |
|
||||
- * v v
|
||||
- * RX SGL: AAD || PT || Tag
|
||||
- */
|
||||
- err = crypto_aead_copy_sgl(null_tfm, tsgl_src,
|
||||
- areq->first_rsgl.sgl.sgt.sgl,
|
||||
- processed);
|
||||
- if (err)
|
||||
- goto free;
|
||||
- af_alg_pull_tsgl(sk, processed, NULL, 0);
|
||||
- } else {
|
||||
- /*
|
||||
- * Decryption operation - To achieve an in-place cipher
|
||||
- * operation, the following SGL structure is used:
|
||||
- *
|
||||
- * TX SGL: AAD || CT || Tag
|
||||
- * | | ^
|
||||
- * | copy | | Create SGL link.
|
||||
- * v v |
|
||||
- * RX SGL: AAD || CT ----+
|
||||
- */
|
||||
-
|
||||
- /* Copy AAD || CT to RX SGL buffer for in-place operation. */
|
||||
- err = crypto_aead_copy_sgl(null_tfm, tsgl_src,
|
||||
- areq->first_rsgl.sgl.sgt.sgl,
|
||||
- outlen);
|
||||
- if (err)
|
||||
- goto free;
|
||||
-
|
||||
- /* Create TX SGL for tag and chain it to RX SGL. */
|
||||
- areq->tsgl_entries = af_alg_count_tsgl(sk, processed,
|
||||
- processed - as);
|
||||
- if (!areq->tsgl_entries)
|
||||
- areq->tsgl_entries = 1;
|
||||
- areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl),
|
||||
- areq->tsgl_entries),
|
||||
- GFP_KERNEL);
|
||||
- if (!areq->tsgl) {
|
||||
- err = -ENOMEM;
|
||||
- goto free;
|
||||
- }
|
||||
- sg_init_table(areq->tsgl, areq->tsgl_entries);
|
||||
-
|
||||
- /* Release TX SGL, except for tag data and reassign tag data. */
|
||||
- af_alg_pull_tsgl(sk, processed, areq->tsgl, processed - as);
|
||||
-
|
||||
- /* chain the areq TX SGL holding the tag with RX SGL */
|
||||
- if (usedpages) {
|
||||
- /* RX SGL present */
|
||||
- struct af_alg_sgl *sgl_prev = &areq->last_rsgl->sgl;
|
||||
- struct scatterlist *sg = sgl_prev->sgt.sgl;
|
||||
-
|
||||
- sg_unmark_end(sg + sgl_prev->sgt.nents - 1);
|
||||
- sg_chain(sg, sgl_prev->sgt.nents + 1, areq->tsgl);
|
||||
- } else
|
||||
- /* no RX SGL present (e.g. authentication only) */
|
||||
- rsgl_src = areq->tsgl;
|
||||
- }
|
||||
+ err = crypto_aead_copy_sgl(null_tfm, tsgl_src, rsgl_src,
|
||||
+ ctx->aead_assoclen);
|
||||
+ if (err)
|
||||
+ goto free;
|
||||
|
||||
/* Initialize the crypto operation */
|
||||
- aead_request_set_crypt(&areq->cra_u.aead_req, rsgl_src,
|
||||
+ aead_request_set_crypt(&areq->cra_u.aead_req, tsgl_src,
|
||||
areq->first_rsgl.sgl.sgt.sgl, used, ctx->iv);
|
||||
aead_request_set_ad(&areq->cra_u.aead_req, ctx->aead_assoclen);
|
||||
aead_request_set_tfm(&areq->cra_u.aead_req, tfm);
|
||||
@@ -514,7 +449,7 @@ static void aead_sock_destruct(struct sock *sk)
|
||||
struct crypto_aead *tfm = aeadc->aead;
|
||||
unsigned int ivlen = crypto_aead_ivsize(tfm);
|
||||
|
||||
- af_alg_pull_tsgl(sk, ctx->used, NULL, 0);
|
||||
+ af_alg_pull_tsgl(sk, ctx->used, NULL);
|
||||
sock_kzfree_s(sk, ctx->iv, ivlen);
|
||||
sock_kfree_s(sk, ctx, ctx->len);
|
||||
af_alg_release_parent(sk);
|
||||
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
|
||||
index 125d395c5e00..82735e51be10 100644
|
||||
--- a/crypto/algif_skcipher.c
|
||||
+++ b/crypto/algif_skcipher.c
|
||||
@@ -138,7 +138,7 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
* Create a per request TX SGL for this request which tracks the
|
||||
* SG entries from the global TX SGL.
|
||||
*/
|
||||
- areq->tsgl_entries = af_alg_count_tsgl(sk, len, 0);
|
||||
+ areq->tsgl_entries = af_alg_count_tsgl(sk, len);
|
||||
if (!areq->tsgl_entries)
|
||||
areq->tsgl_entries = 1;
|
||||
areq->tsgl = sock_kmalloc(sk, array_size(sizeof(*areq->tsgl),
|
||||
@@ -149,7 +149,7 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
goto free;
|
||||
}
|
||||
sg_init_table(areq->tsgl, areq->tsgl_entries);
|
||||
- af_alg_pull_tsgl(sk, len, areq->tsgl, 0);
|
||||
+ af_alg_pull_tsgl(sk, len, areq->tsgl);
|
||||
|
||||
/* Initialize the crypto operation */
|
||||
skcipher_request_set_tfm(&areq->cra_u.skcipher_req, tfm);
|
||||
@@ -363,7 +363,7 @@ static void skcipher_sock_destruct(struct sock *sk)
|
||||
struct alg_sock *pask = alg_sk(psk);
|
||||
struct crypto_skcipher *tfm = pask->private;
|
||||
|
||||
- af_alg_pull_tsgl(sk, ctx->used, NULL, 0);
|
||||
+ af_alg_pull_tsgl(sk, ctx->used, NULL);
|
||||
sock_kzfree_s(sk, ctx->iv, crypto_skcipher_ivsize(tfm));
|
||||
if (ctx->state)
|
||||
sock_kzfree_s(sk, ctx->state, crypto_skcipher_statesize(tfm));
|
||||
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h
|
||||
index f7b3b93f3a49..b32d1ef827e7 100644
|
||||
--- a/include/crypto/if_alg.h
|
||||
+++ b/include/crypto/if_alg.h
|
||||
@@ -228,9 +228,8 @@ static inline bool af_alg_readable(struct sock *sk)
|
||||
return PAGE_SIZE <= af_alg_rcvbuf(sk);
|
||||
}
|
||||
|
||||
-unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset);
|
||||
-void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
|
||||
- size_t dst_offset);
|
||||
+unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes);
|
||||
+void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst);
|
||||
void af_alg_wmem_wakeup(struct sock *sk);
|
||||
int af_alg_wait_for_data(struct sock *sk, unsigned flags, unsigned min);
|
||||
int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,73 +0,0 @@
|
||||
From ea7f6a374f53f1ecba89d146c138bf71df660ae9 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Fri, 1 May 2026 21:43:21 +0800
|
||||
Subject: [PATCH] crypto: af_alg - limit RX SG extraction by receive buffer
|
||||
budget
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
CVE: CVE-2026-31677
|
||||
|
||||
Upstream Status: 8eceab19eba9dcbfd2a0daec72e1bf48aa100170
|
||||
|
||||
commit 8eceab19eba9dcbfd2a0daec72e1bf48aa100170
|
||||
Author: Douya Le <ldy3087146292@gmail.com>
|
||||
Date: Thu Apr 2 23:34:55 2026 +0800
|
||||
|
||||
crypto: af_alg - limit RX SG extraction by receive buffer budget
|
||||
|
||||
Make af_alg_get_rsgl() limit each RX scatterlist extraction to the
|
||||
remaining receive buffer budget.
|
||||
|
||||
af_alg_get_rsgl() currently uses af_alg_readable() only as a gate
|
||||
before extracting data into the RX scatterlist. Limit each extraction
|
||||
to the remaining af_alg_rcvbuf(sk) budget so that receive-side
|
||||
accounting matches the amount of data attached to the request.
|
||||
|
||||
If skcipher cannot obtain enough RX space for at least one chunk while
|
||||
more data remains to be processed, reject the recvmsg call instead of
|
||||
rounding the request length down to zero.
|
||||
|
||||
Fixes: e870456d8e7c8d57c059ea479b5aadbb55ff4c3a ("crypto: algif_skcipher - overhaul memory management")
|
||||
Reported-by: Yifan Wu <yifanwucs@gmail.com>
|
||||
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
|
||||
Co-developed-by: Yuan Tan <yuantan098@gmail.com>
|
||||
Signed-off-by: Yuan Tan <yuantan098@gmail.com>
|
||||
Suggested-by: Xin Liu <bird@lzu.edu.cn>
|
||||
Signed-off-by: Douya Le <ldy3087146292@gmail.com>
|
||||
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
|
||||
index b2fe28992ebf..fbb669c9478c 100644
|
||||
--- a/crypto/af_alg.c
|
||||
+++ b/crypto/af_alg.c
|
||||
@@ -1222,6 +1222,8 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
|
||||
|
||||
seglen = min_t(size_t, (maxsize - len),
|
||||
msg_data_left(msg));
|
||||
+ /* Never pin more pages than the remaining RX accounting budget. */
|
||||
+ seglen = min_t(size_t, seglen, af_alg_rcvbuf(sk));
|
||||
|
||||
if (list_empty(&areq->rsgl_list)) {
|
||||
rsgl = &areq->first_rsgl;
|
||||
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
|
||||
index 82735e51be10..ba0a17fd95ac 100644
|
||||
--- a/crypto/algif_skcipher.c
|
||||
+++ b/crypto/algif_skcipher.c
|
||||
@@ -130,6 +130,11 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
* full block size buffers.
|
||||
*/
|
||||
if (ctx->more || len < ctx->used) {
|
||||
+ if (len < bs) {
|
||||
+ err = -EINVAL;
|
||||
+ goto free;
|
||||
+ }
|
||||
+
|
||||
len -= len % bs;
|
||||
cflags |= CRYPTO_SKCIPHER_REQ_NOTFINAL;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,49 +0,0 @@
|
||||
From 1921edf676419a881548b4779c4556dc936b10f2 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Thu, 30 Apr 2026 20:10:09 +0800
|
||||
Subject: [PATCH] crypto: af_alg - Fix page reassignment overflow in
|
||||
af_alg_pull_tsgl
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
|
||||
Upstream Status: 31d00156e50ecad37f2cb6cbf04aaa9a260505ef
|
||||
|
||||
commit 31d00156e50ecad37f2cb6cbf04aaa9a260505ef
|
||||
Author: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Date: Sat Apr 4 08:29:58 2026 +0800
|
||||
|
||||
crypto: af_alg - Fix page reassignment overflow in af_alg_pull_tsgl
|
||||
|
||||
When page reassignment was added to af_alg_pull_tsgl the original
|
||||
loop wasn't updated so it may try to reassign one more page than
|
||||
necessary.
|
||||
|
||||
Add the check to the reassignment so that this does not happen.
|
||||
|
||||
Also update the comment which still refers to the obsolete offset
|
||||
argument.
|
||||
|
||||
Reported-by: syzbot+d23888375c2737c17ba5@syzkaller.appspotmail.com
|
||||
Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory management")
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
|
||||
index fbb669c9478c..4c94448e4659 100644
|
||||
--- a/crypto/af_alg.c
|
||||
+++ b/crypto/af_alg.c
|
||||
@@ -705,8 +705,8 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst)
|
||||
* Assumption: caller created af_alg_count_tsgl(len)
|
||||
* SG entries in dst.
|
||||
*/
|
||||
- if (dst) {
|
||||
- /* reassign page to dst after offset */
|
||||
+ if (dst && plen) {
|
||||
+ /* reassign page to dst */
|
||||
get_page(page);
|
||||
sg_set_page(dst + j, page, plen, sg[i].offset);
|
||||
j++;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
From 501c9d9404330aa57a3efe128e0e16dc98f4475f Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Fri, 1 May 2026 21:43:58 +0800
|
||||
Subject: [PATCH] crypto: authencesn - reject too-short AAD (assoclen<8) to
|
||||
match ESP/ESN spec
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
CVE: CVE-2026-23060
|
||||
|
||||
Upstream Status: 2397e9264676be7794f8f7f1e9763d90bd3c7335
|
||||
|
||||
commit 2397e9264676be7794f8f7f1e9763d90bd3c7335
|
||||
Author: Taeyang Lee <0wn@theori.io>
|
||||
Date: Fri Jan 16 16:03:58 2026 +0900
|
||||
|
||||
crypto: authencesn - reject too-short AAD (assoclen<8) to match ESP/ESN spec
|
||||
|
||||
authencesn assumes an ESP/ESN-formatted AAD. When assoclen is shorter than
|
||||
the minimum expected length, crypto_authenc_esn_decrypt() can advance past
|
||||
the end of the destination scatterlist and trigger a NULL pointer dereference
|
||||
in scatterwalk_map_and_copy(), leading to a kernel panic (DoS).
|
||||
|
||||
Add a minimum AAD length check to fail fast on invalid inputs.
|
||||
|
||||
Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD interface")
|
||||
Reported-By: Taeyang Lee <0wn@theori.io>
|
||||
Signed-off-by: Taeyang Lee <0wn@theori.io>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/authencesn.c b/crypto/authencesn.c
|
||||
index 2cc933e2f790..e08032e80f18 100644
|
||||
--- a/crypto/authencesn.c
|
||||
+++ b/crypto/authencesn.c
|
||||
@@ -185,6 +185,9 @@ static int crypto_authenc_esn_encrypt(struct aead_request *req)
|
||||
struct scatterlist *src, *dst;
|
||||
int err;
|
||||
|
||||
+ if (assoclen < 8)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
sg_init_table(areq_ctx->src, 2);
|
||||
src = scatterwalk_ffwd(areq_ctx->src, req->src, assoclen);
|
||||
dst = src;
|
||||
@@ -275,6 +278,9 @@ static int crypto_authenc_esn_decrypt(struct aead_request *req)
|
||||
u32 tmp[2];
|
||||
int err;
|
||||
|
||||
+ if (assoclen < 8)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
cryptlen -= authsize;
|
||||
|
||||
if (req->src != dst) {
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,172 +0,0 @@
|
||||
From 1508578044aa2d26ae287927419505ad8c1ef8f1 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Thu, 30 Apr 2026 20:16:25 +0800
|
||||
Subject: [PATCH] crypto: authencesn - Do not place hiseq at end of dst for
|
||||
out-of-place decryption
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
CVE: CVE-2026-31431
|
||||
|
||||
Upstream Status: e02494114ebf7c8b42777c6cd6982f113bfdbec7
|
||||
|
||||
commit e02494114ebf7c8b42777c6cd6982f113bfdbec7
|
||||
Author: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Date: Fri Mar 27 15:04:17 2026 +0900
|
||||
|
||||
crypto: authencesn - Do not place hiseq at end of dst for out-of-place decryption
|
||||
|
||||
When decrypting data that is not in-place (src != dst), there is
|
||||
no need to save the high-order sequence bits in dst as it could
|
||||
simply be re-copied from the source.
|
||||
|
||||
However, the data to be hashed need to be rearranged accordingly.
|
||||
|
||||
Reported-by: Taeyang Lee <0wn@theori.io>
|
||||
Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD interface")
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Thanks,
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/authencesn.c b/crypto/authencesn.c
|
||||
index e08032e80f18..b262e7e3f8d7 100644
|
||||
--- a/crypto/authencesn.c
|
||||
+++ b/crypto/authencesn.c
|
||||
@@ -158,7 +158,10 @@ static void crypto_authenc_esn_encrypt_done(void *data, int err)
|
||||
authenc_esn_request_complete(areq, err);
|
||||
}
|
||||
|
||||
-static int crypto_authenc_esn_copy(struct aead_request *req, unsigned int len)
|
||||
+static int crypto_authenc_esn_copy_sg(struct aead_request *req,
|
||||
+ struct scatterlist *src,
|
||||
+ struct scatterlist *dst,
|
||||
+ unsigned int len)
|
||||
{
|
||||
struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req);
|
||||
struct crypto_authenc_esn_ctx *ctx = crypto_aead_ctx(authenc_esn);
|
||||
@@ -167,11 +170,16 @@ static int crypto_authenc_esn_copy(struct aead_request *req, unsigned int len)
|
||||
skcipher_request_set_sync_tfm(skreq, ctx->null);
|
||||
skcipher_request_set_callback(skreq, aead_request_flags(req),
|
||||
NULL, NULL);
|
||||
- skcipher_request_set_crypt(skreq, req->src, req->dst, len, NULL);
|
||||
+ skcipher_request_set_crypt(skreq, src, dst, len, NULL);
|
||||
|
||||
return crypto_skcipher_encrypt(skreq);
|
||||
}
|
||||
|
||||
+static int crypto_authenc_esn_copy(struct aead_request *req, unsigned int len)
|
||||
+{
|
||||
+ return crypto_authenc_esn_copy_sg(req, req->src, req->dst, len);
|
||||
+}
|
||||
+
|
||||
static int crypto_authenc_esn_encrypt(struct aead_request *req)
|
||||
{
|
||||
struct crypto_aead *authenc_esn = crypto_aead_reqtfm(req);
|
||||
@@ -226,30 +234,39 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,
|
||||
u8 *ohash = areq_ctx->tail;
|
||||
unsigned int cryptlen = req->cryptlen - authsize;
|
||||
unsigned int assoclen = req->assoclen;
|
||||
+ struct scatterlist *src = req->src;
|
||||
struct scatterlist *dst = req->dst;
|
||||
u8 *ihash = ohash + crypto_ahash_digestsize(auth);
|
||||
u32 tmp[2];
|
||||
+ int err;
|
||||
|
||||
if (!authsize)
|
||||
goto decrypt;
|
||||
|
||||
- /* Move high-order bits of sequence number back. */
|
||||
- scatterwalk_map_and_copy(tmp, dst, 4, 4, 0);
|
||||
- scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0);
|
||||
- scatterwalk_map_and_copy(tmp, dst, 0, 8, 1);
|
||||
+ if (src == dst) {
|
||||
+ /* Move high-order bits of sequence number back. */
|
||||
+ scatterwalk_map_and_copy(tmp, dst, 4, 4, 0);
|
||||
+ scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 0);
|
||||
+ scatterwalk_map_and_copy(tmp, dst, 0, 8, 1);
|
||||
+ } else {
|
||||
+ err = crypto_authenc_esn_copy(req, assoclen);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ }
|
||||
|
||||
if (crypto_memneq(ihash, ohash, authsize))
|
||||
return -EBADMSG;
|
||||
|
||||
decrypt:
|
||||
|
||||
- sg_init_table(areq_ctx->dst, 2);
|
||||
+ if (src != dst)
|
||||
+ src = scatterwalk_ffwd(areq_ctx->src, src, assoclen);
|
||||
dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);
|
||||
|
||||
skcipher_request_set_tfm(skreq, ctx->enc);
|
||||
skcipher_request_set_callback(skreq, flags,
|
||||
req->base.complete, req->base.data);
|
||||
- skcipher_request_set_crypt(skreq, dst, dst, cryptlen, req->iv);
|
||||
+ skcipher_request_set_crypt(skreq, src, dst, cryptlen, req->iv);
|
||||
|
||||
return crypto_skcipher_decrypt(skreq);
|
||||
}
|
||||
@@ -274,6 +291,7 @@ static int crypto_authenc_esn_decrypt(struct aead_request *req)
|
||||
unsigned int assoclen = req->assoclen;
|
||||
unsigned int cryptlen = req->cryptlen;
|
||||
u8 *ihash = ohash + crypto_ahash_digestsize(auth);
|
||||
+ struct scatterlist *src = req->src;
|
||||
struct scatterlist *dst = req->dst;
|
||||
u32 tmp[2];
|
||||
int err;
|
||||
@@ -281,27 +299,31 @@ static int crypto_authenc_esn_decrypt(struct aead_request *req)
|
||||
if (assoclen < 8)
|
||||
return -EINVAL;
|
||||
|
||||
- cryptlen -= authsize;
|
||||
-
|
||||
- if (req->src != dst) {
|
||||
- err = crypto_authenc_esn_copy(req, assoclen + cryptlen);
|
||||
- if (err)
|
||||
- return err;
|
||||
- }
|
||||
+ if (!authsize)
|
||||
+ goto tail;
|
||||
|
||||
+ cryptlen -= authsize;
|
||||
scatterwalk_map_and_copy(ihash, req->src, assoclen + cryptlen,
|
||||
authsize, 0);
|
||||
|
||||
- if (!authsize)
|
||||
- goto tail;
|
||||
-
|
||||
/* Move high-order bits of sequence number to the end. */
|
||||
- scatterwalk_map_and_copy(tmp, dst, 0, 8, 0);
|
||||
- scatterwalk_map_and_copy(tmp, dst, 4, 4, 1);
|
||||
- scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1);
|
||||
-
|
||||
- sg_init_table(areq_ctx->dst, 2);
|
||||
- dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);
|
||||
+ scatterwalk_map_and_copy(tmp, src, 0, 8, 0);
|
||||
+ if (src == dst) {
|
||||
+ scatterwalk_map_and_copy(tmp, dst, 4, 4, 1);
|
||||
+ scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen, 4, 1);
|
||||
+ dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);
|
||||
+ } else {
|
||||
+ scatterwalk_map_and_copy(tmp, dst, 0, 4, 1);
|
||||
+ scatterwalk_map_and_copy(tmp + 1, dst, assoclen + cryptlen - 4, 4, 1);
|
||||
+
|
||||
+ src = scatterwalk_ffwd(areq_ctx->src, src, 8);
|
||||
+ dst = scatterwalk_ffwd(areq_ctx->dst, dst, 4);
|
||||
+ err = crypto_authenc_esn_copy_sg(req, src, dst,
|
||||
+ assoclen + cryptlen - 8);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ dst = req->dst;
|
||||
+ }
|
||||
|
||||
ahash_request_set_tfm(ahreq, auth);
|
||||
ahash_request_set_crypt(ahreq, dst, ohash, assoclen + cryptlen);
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
From dadc0c1bbccad48022e400debc3341597a0f2cf5 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Thu, 30 Apr 2026 19:56:24 +0800
|
||||
Subject: [PATCH] crypto: authencesn - Fix src offset when decrypting in-place
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
|
||||
Upstream Status: 1f48ad3b19a9dfc947868edda0bb8e48e5b5a8fa
|
||||
|
||||
commit 1f48ad3b19a9dfc947868edda0bb8e48e5b5a8fa
|
||||
Author: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Date: Wed Apr 15 07:39:06 2026 +0800
|
||||
|
||||
crypto: authencesn - Fix src offset when decrypting in-place
|
||||
|
||||
The src SG list offset wasn't set properly when decrypting in-place,
|
||||
fix it.
|
||||
|
||||
Reported-by: Wolfgang Walter <linux@stwm.de>
|
||||
Fixes: e02494114ebf ("crypto: authencesn - Do not place hiseq at end of dst for out-of-place decryption")
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/authencesn.c b/crypto/authencesn.c
|
||||
index b262e7e3f8d7..d96da934674e 100644
|
||||
--- a/crypto/authencesn.c
|
||||
+++ b/crypto/authencesn.c
|
||||
@@ -259,9 +259,11 @@ static int crypto_authenc_esn_decrypt_tail(struct aead_request *req,
|
||||
|
||||
decrypt:
|
||||
|
||||
- if (src != dst)
|
||||
- src = scatterwalk_ffwd(areq_ctx->src, src, assoclen);
|
||||
dst = scatterwalk_ffwd(areq_ctx->dst, dst, assoclen);
|
||||
+ if (req->src == req->dst)
|
||||
+ src = dst;
|
||||
+ else
|
||||
+ src = scatterwalk_ffwd(areq_ctx->src, src, assoclen);
|
||||
|
||||
skcipher_request_set_tfm(skreq, ctx->enc);
|
||||
skcipher_request_set_callback(skreq, flags,
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
From 027fb22445c4faad4693db4c096b0674fe09f712 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Thu, 30 Apr 2026 20:02:19 +0800
|
||||
Subject: [PATCH] crypto: authencesn - reject short ahash digests during
|
||||
instance creation
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
|
||||
Upstream Status: cryptodev
|
||||
|
||||
commit 5db6ef9847717329f12c5ea8aba7e9f588a980c0
|
||||
Author: Yucheng Lu <kanolyc@gmail.com>
|
||||
Date: Wed Apr 22 21:45:04 2026 +0800
|
||||
|
||||
crypto: authencesn - reject short ahash digests during instance creation
|
||||
|
||||
authencesn requires either a zero authsize or an authsize of at least
|
||||
4 bytes because the ESN encrypt/decrypt paths always move 4 bytes of
|
||||
high-order sequence number data at the end of the authenticated data.
|
||||
|
||||
While crypto_authenc_esn_setauthsize() already rejects explicit
|
||||
non-zero authsizes in the range 1..3, crypto_authenc_esn_create()
|
||||
still copied auth->digestsize into inst->alg.maxauthsize without
|
||||
validating it. The AEAD core then initialized the tfm's default
|
||||
authsize from that value.
|
||||
|
||||
As a result, selecting an ahash with digest size 1..3, such as
|
||||
cbcmac(cipher_null), exposed authencesn instances whose default
|
||||
authsize was invalid even though setauthsize() would have rejected the
|
||||
same value. AF_ALG could then trigger the ESN tail handling with a
|
||||
too-short tag and hit an out-of-bounds access.
|
||||
|
||||
Reject authencesn instances whose ahash digest size is in the invalid
|
||||
non-zero range 1..3 so that no tfm can inherit an unsupported default
|
||||
authsize.
|
||||
|
||||
Fixes: f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver")
|
||||
Cc: stable@kernel.org
|
||||
Reported-by: Yifan Wu <yifanwucs@gmail.com>
|
||||
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
|
||||
Co-developed-by: Yuan Tan <yuantan098@gmail.com>
|
||||
Signed-off-by: Yuan Tan <yuantan098@gmail.com>
|
||||
Suggested-by: Xin Liu <bird@lzu.edu.cn>
|
||||
Tested-by: Yuhang Zheng <z1652074432@gmail.com>
|
||||
Reviewed-by: Eric Biggers <ebiggers@kernel.org>
|
||||
Signed-off-by: Yucheng Lu <kanolyc@gmail.com>
|
||||
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/authencesn.c b/crypto/authencesn.c
|
||||
index d96da934674e..8b94a34c6ab4 100644
|
||||
--- a/crypto/authencesn.c
|
||||
+++ b/crypto/authencesn.c
|
||||
@@ -434,6 +434,11 @@ static int crypto_authenc_esn_create(struct crypto_template *tmpl,
|
||||
auth = crypto_spawn_ahash_alg(&ctx->auth);
|
||||
auth_base = &auth->base;
|
||||
|
||||
+ if (auth->digestsize > 0 && auth->digestsize < 4) {
|
||||
+ err = -EINVAL;
|
||||
+ goto err_free_inst;
|
||||
+ }
|
||||
+
|
||||
err = crypto_grab_skcipher(&ctx->enc, aead_crypto_instance(inst),
|
||||
crypto_attr_alg_name(tb[2]), 0, mask);
|
||||
if (err)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
From 51c927390f506ab91a571fff14994406e8a43fb4 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Fri, 1 May 2026 21:45:28 +0800
|
||||
Subject: [PATCH] crypto: algif_aead - Fix minimum RX size check for decryption
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
|
||||
Upstream Status: 3d14bd48e3a77091cbce637a12c2ae31b4a1687c
|
||||
|
||||
commit 3d14bd48e3a77091cbce637a12c2ae31b4a1687c
|
||||
Author: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
Date: Sun Apr 12 13:32:21 2026 +0800
|
||||
|
||||
crypto: algif_aead - Fix minimum RX size check for decryption
|
||||
|
||||
The check for the minimum receive buffer size did not take the
|
||||
tag size into account during decryption. Fix this by adding the
|
||||
required extra length.
|
||||
|
||||
Reported-by: syzbot+aa11561819dc42ebbc7c@syzkaller.appspotmail.com
|
||||
Reported-by: Daniel Pouzzner <douzzer@mega.nu>
|
||||
Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management")
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
|
||||
index dff71bd753a7..93a7cb4f269c 100644
|
||||
--- a/crypto/algif_aead.c
|
||||
+++ b/crypto/algif_aead.c
|
||||
@@ -169,7 +169,7 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
if (usedpages < outlen) {
|
||||
size_t less = outlen - usedpages;
|
||||
|
||||
- if (used < less) {
|
||||
+ if (used < less + (ctx->enc ? 0 : as)) {
|
||||
err = -EINVAL;
|
||||
goto free;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
From 5ee3f090629291d2a9c229c0371b6410cd480826 Mon Sep 17 00:00:00 2001
|
||||
From: Herbert Xu <herbert.xu@redhat.com>
|
||||
Date: Thu, 30 Apr 2026 20:03:29 +0800
|
||||
Subject: [PATCH] crypto: algif_aead - snapshot IV for async AEAD requests
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-172216
|
||||
|
||||
Upstream Status: 5aa58c3a572b3e3b6c786953339f7978b845cc52
|
||||
|
||||
commit 5aa58c3a572b3e3b6c786953339f7978b845cc52
|
||||
Author: Douya Le <ldy3087146292@gmail.com>
|
||||
Date: Sun Apr 19 16:52:59 2026 +0800
|
||||
|
||||
crypto: algif_aead - snapshot IV for async AEAD requests
|
||||
|
||||
AF_ALG AEAD AIO requests currently use the socket-wide IV buffer during
|
||||
request processing. For async requests, later socket activity can
|
||||
update that shared state before the original request has fully
|
||||
completed, which can lead to inconsistent IV handling.
|
||||
|
||||
Snapshot the IV into per-request storage when preparing the AEAD
|
||||
request, so in-flight operations no longer depend on mutable socket
|
||||
state.
|
||||
|
||||
Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management")
|
||||
Cc: stable@kernel.org
|
||||
Reported-by: Yuan Tan <yuantan098@gmail.com>
|
||||
Reported-by: Yifan Wu <yifanwucs@gmail.com>
|
||||
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
|
||||
Reported-by: Xin Liu <bird@lzu.edu.cn>
|
||||
Co-developed-by: Luxing Yin <tr0jan@lzu.edu.cn>
|
||||
Signed-off-by: Luxing Yin <tr0jan@lzu.edu.cn>
|
||||
Tested-by: Yucheng Lu <kanolyc@gmail.com>
|
||||
Signed-off-by: Douya Le <ldy3087146292@gmail.com>
|
||||
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
|
||||
Signed-off-by: Herbert Xu <herbert.xu@redhat.com>
|
||||
|
||||
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
|
||||
index 93a7cb4f269c..fcf86e5c6494 100644
|
||||
--- a/crypto/algif_aead.c
|
||||
+++ b/crypto/algif_aead.c
|
||||
@@ -97,8 +97,10 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
struct crypto_aead *tfm = aeadc->aead;
|
||||
struct crypto_sync_skcipher *null_tfm = aeadc->null_tfm;
|
||||
unsigned int as = crypto_aead_authsize(tfm);
|
||||
+ unsigned int ivsize = crypto_aead_ivsize(tfm);
|
||||
struct af_alg_async_req *areq;
|
||||
struct scatterlist *rsgl_src, *tsgl_src = NULL;
|
||||
+ void *iv;
|
||||
int err = 0;
|
||||
size_t used = 0; /* [in] TX bufs to be en/decrypted */
|
||||
size_t outlen = 0; /* [out] RX bufs produced by kernel */
|
||||
@@ -150,10 +152,14 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
|
||||
/* Allocate cipher request for current operation. */
|
||||
areq = af_alg_alloc_areq(sk, sizeof(struct af_alg_async_req) +
|
||||
- crypto_aead_reqsize(tfm));
|
||||
+ crypto_aead_reqsize(tfm) + ivsize);
|
||||
if (IS_ERR(areq))
|
||||
return PTR_ERR(areq);
|
||||
|
||||
+ iv = (u8 *)aead_request_ctx(&areq->cra_u.aead_req) +
|
||||
+ crypto_aead_reqsize(tfm);
|
||||
+ memcpy(iv, ctx->iv, ivsize);
|
||||
+
|
||||
/* convert iovecs of output buffers into RX SGL */
|
||||
err = af_alg_get_rsgl(sk, msg, flags, areq, outlen, &usedpages);
|
||||
if (err)
|
||||
@@ -215,7 +221,7 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||
|
||||
/* Initialize the crypto operation */
|
||||
aead_request_set_crypt(&areq->cra_u.aead_req, tsgl_src,
|
||||
- areq->first_rsgl.sgl.sgt.sgl, used, ctx->iv);
|
||||
+ areq->first_rsgl.sgl.sgt.sgl, used, iv);
|
||||
aead_request_set_ad(&areq->cra_u.aead_req, ctx->aead_assoclen);
|
||||
aead_request_set_tfm(&areq->cra_u.aead_req, tfm);
|
||||
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,108 +0,0 @@
|
||||
From fec7c33519761c90689c4e41f169885a4dc6e729 Mon Sep 17 00:00:00 2001
|
||||
From: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Date: Thu, 7 May 2026 19:48:51 +0000
|
||||
Subject: [PATCH] xfrm: esp: avoid in-place decrypt on shared skb frags
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-174522
|
||||
CVE: CVE-2026-43284
|
||||
|
||||
commit f4c50a4034e62ab75f1d5cdd191dd5f9c77fdff4
|
||||
Author: Kuan-Ting Chen <h3xrabbit@gmail.com>
|
||||
Date: Mon May 4 23:27:12 2026 +0800
|
||||
|
||||
xfrm: esp: avoid in-place decrypt on shared skb frags
|
||||
|
||||
MSG_SPLICE_PAGES can attach pages from a pipe directly to an skb. TCP
|
||||
marks such skbs with SKBFL_SHARED_FRAG after skb_splice_from_iter(),
|
||||
so later paths that may modify packet data can first make a private
|
||||
copy. The IPv4/IPv6 datagram append paths did not set this flag when
|
||||
splicing pages into UDP skbs.
|
||||
|
||||
That leaves an ESP-in-UDP packet made from shared pipe pages looking
|
||||
like an ordinary uncloned nonlinear skb. ESP input then takes the no-COW
|
||||
fast path for uncloned skbs without a frag_list and decrypts in place
|
||||
over data that is not owned privately by the skb.
|
||||
|
||||
Mark IPv4/IPv6 datagram splice frags with SKBFL_SHARED_FRAG, matching
|
||||
TCP. Also make ESP input fall back to skb_cow_data() when the flag is
|
||||
present, so ESP does not decrypt externally backed frags in place.
|
||||
Private nonlinear skb frags still use the existing fast path.
|
||||
|
||||
This intentionally does not change ESP output. In esp_output_head(),
|
||||
the path that appends the ESP trailer to existing skb tailroom without
|
||||
calling skb_cow_data() is not reachable for nonlinear skbs:
|
||||
skb_tailroom() returns zero when skb->data_len is nonzero, while ESP
|
||||
tailen is positive. Thus ESP output will either use the separate
|
||||
destination-frag path or fall back to skb_cow_data().
|
||||
|
||||
Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible")
|
||||
Fixes: 03e2a30f6a27 ("esp6: Avoid skb_cow_data whenever possible")
|
||||
Fixes: 7da0dde68486 ("ip, udp: Support MSG_SPLICE_PAGES")
|
||||
Fixes: 6d8192bd69bb ("ip6, udp6: Support MSG_SPLICE_PAGES")
|
||||
Reported-by: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Reported-by: Kuan-Ting Chen <h3xrabbit@gmail.com>
|
||||
Tested-by: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Kuan-Ting Chen <h3xrabbit@gmail.com>
|
||||
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
|
||||
|
||||
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Signed-off-by: Sabrina Dubroca <sdubroca@redhat.com>
|
||||
|
||||
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
|
||||
index b8c7c8b42c0a..0c5cd78991d9 100644
|
||||
--- a/net/ipv4/esp4.c
|
||||
+++ b/net/ipv4/esp4.c
|
||||
@@ -869,7 +869,8 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
nfrags = 1;
|
||||
|
||||
goto skip_cow;
|
||||
- } else if (!skb_has_frag_list(skb)) {
|
||||
+ } else if (!skb_has_frag_list(skb) &&
|
||||
+ !skb_has_shared_frag(skb)) {
|
||||
nfrags = skb_shinfo(skb)->nr_frags;
|
||||
nfrags++;
|
||||
|
||||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
|
||||
index 14d7d98fa417..58f155e70049 100644
|
||||
--- a/net/ipv4/ip_output.c
|
||||
+++ b/net/ipv4/ip_output.c
|
||||
@@ -1236,6 +1236,8 @@ static int __ip_append_data(struct sock *sk,
|
||||
if (err < 0)
|
||||
goto error;
|
||||
copy = err;
|
||||
+ if (!(flags & MSG_NO_SHARED_FRAGS))
|
||||
+ skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
|
||||
wmem_alloc_delta += copy;
|
||||
} else if (!zc) {
|
||||
int i = skb_shinfo(skb)->nr_frags;
|
||||
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
|
||||
index 9c4c7b1f2955..0ecbb54bbdf0 100644
|
||||
--- a/net/ipv6/esp6.c
|
||||
+++ b/net/ipv6/esp6.c
|
||||
@@ -911,7 +911,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
nfrags = 1;
|
||||
|
||||
goto skip_cow;
|
||||
- } else if (!skb_has_frag_list(skb)) {
|
||||
+ } else if (!skb_has_frag_list(skb) &&
|
||||
+ !skb_has_shared_frag(skb)) {
|
||||
nfrags = skb_shinfo(skb)->nr_frags;
|
||||
nfrags++;
|
||||
|
||||
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
|
||||
index ca5853d5298a..2ba9df0262c9 100644
|
||||
--- a/net/ipv6/ip6_output.c
|
||||
+++ b/net/ipv6/ip6_output.c
|
||||
@@ -1772,6 +1772,8 @@ static int __ip6_append_data(struct sock *sk,
|
||||
if (err < 0)
|
||||
goto error;
|
||||
copy = err;
|
||||
+ if (!(flags & MSG_NO_SHARED_FRAGS))
|
||||
+ skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG;
|
||||
wmem_alloc_delta += copy;
|
||||
} else if (!zc) {
|
||||
int i = skb_shinfo(skb)->nr_frags;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,86 +0,0 @@
|
||||
From 8d155e2d1c4102f74f82a2bf9c016164bb0f7384 Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Rebello <nathan.c.rebello@gmail.com>
|
||||
Date: Thu, 2 Apr 2026 04:52:59 -0400
|
||||
Subject: [PATCH] usbip: validate number_of_packets in usbip_pack_ret_submit()
|
||||
|
||||
commit 2ab833a16a825373aad2ba7d54b572b277e95b71 upstream.
|
||||
|
||||
When a USB/IP client receives a RET_SUBMIT response,
|
||||
usbip_pack_ret_submit() unconditionally overwrites
|
||||
urb->number_of_packets from the network PDU. This value is
|
||||
subsequently used as the loop bound in usbip_recv_iso() and
|
||||
usbip_pad_iso() to iterate over urb->iso_frame_desc[], a flexible
|
||||
array whose size was fixed at URB allocation time based on the
|
||||
*original* number_of_packets from the CMD_SUBMIT.
|
||||
|
||||
A malicious USB/IP server can set number_of_packets in the response
|
||||
to a value larger than what was originally submitted, causing a heap
|
||||
out-of-bounds write when usbip_recv_iso() writes to
|
||||
urb->iso_frame_desc[i] beyond the allocated region.
|
||||
|
||||
KASAN confirmed this with kernel 7.0.0-rc5:
|
||||
|
||||
BUG: KASAN: slab-out-of-bounds in usbip_recv_iso+0x46a/0x640
|
||||
Write of size 4 at addr ffff888106351d40 by task vhci_rx/69
|
||||
|
||||
The buggy address is located 0 bytes to the right of
|
||||
allocated 320-byte region [ffff888106351c00, ffff888106351d40)
|
||||
|
||||
The server side (stub_rx.c) and gadget side (vudc_rx.c) already
|
||||
validate number_of_packets in the CMD_SUBMIT path since commits
|
||||
c6688ef9f297 ("usbip: fix stub_rx: harden CMD_SUBMIT path to handle
|
||||
malicious input") and b78d830f0049 ("usbip: fix vudc_rx: harden
|
||||
CMD_SUBMIT path to handle malicious input"). The server side validates
|
||||
against USBIP_MAX_ISO_PACKETS because no URB exists yet at that point.
|
||||
On the client side we have the original URB, so we can use the tighter
|
||||
bound: the response must not exceed the original number_of_packets.
|
||||
|
||||
This mirrors the existing validation of actual_length against
|
||||
transfer_buffer_length in usbip_recv_xbuff(), which checks the
|
||||
response value against the original allocation size.
|
||||
|
||||
Kelvin Mbogo's series ("usb: usbip: fix integer overflow in
|
||||
usbip_recv_iso()", v2) hardens the receive-side functions themselves;
|
||||
this patch complements that work by catching the bad value at its
|
||||
source -- in usbip_pack_ret_submit() before the overwrite -- and
|
||||
using the tighter per-URB allocation bound rather than the global
|
||||
USBIP_MAX_ISO_PACKETS limit.
|
||||
|
||||
Fix this by checking rpdu->number_of_packets against
|
||||
urb->number_of_packets in usbip_pack_ret_submit() before the
|
||||
overwrite. On violation, clamp to zero so that usbip_recv_iso() and
|
||||
usbip_pad_iso() safely return early.
|
||||
|
||||
Fixes: 1325f85fa49f ("staging: usbip: bugfix add number of packets for isochronous frames")
|
||||
Cc: stable <stable@kernel.org>
|
||||
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
|
||||
Signed-off-by: Nathan Rebello <nathan.c.rebello@gmail.com>
|
||||
Link: https://patch.msgid.link/20260402085259.234-1-nathan.c.rebello@gmail.com
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c
|
||||
index a2b2da1255dd..ba9e7c616e12 100644
|
||||
--- a/drivers/usb/usbip/usbip_common.c
|
||||
+++ b/drivers/usb/usbip/usbip_common.c
|
||||
@@ -470,6 +470,18 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb,
|
||||
urb->status = rpdu->status;
|
||||
urb->actual_length = rpdu->actual_length;
|
||||
urb->start_frame = rpdu->start_frame;
|
||||
+ /*
|
||||
+ * The number_of_packets field determines the length of
|
||||
+ * iso_frame_desc[], which is a flexible array allocated
|
||||
+ * at URB creation time. A response must never claim more
|
||||
+ * packets than originally submitted; doing so would cause
|
||||
+ * an out-of-bounds write in usbip_recv_iso() and
|
||||
+ * usbip_pad_iso(). Clamp to zero on violation so both
|
||||
+ * functions safely return early.
|
||||
+ */
|
||||
+ if (rpdu->number_of_packets < 0 ||
|
||||
+ rpdu->number_of_packets > urb->number_of_packets)
|
||||
+ rpdu->number_of_packets = 0;
|
||||
urb->number_of_packets = rpdu->number_of_packets;
|
||||
urb->error_count = rpdu->error_count;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
From c9e16b3352bcbb7a12a4ec6237721659201843f7 Mon Sep 17 00:00:00 2001
|
||||
From: Kamal Heib <kheib@redhat.com>
|
||||
Date: Tue, 7 Apr 2026 21:44:30 -0400
|
||||
Subject: [PATCH] RDMA/umem: Fix double dma_buf_unpin in failure path
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-163515
|
||||
|
||||
commit 104016eb671e19709721c1b0048dd912dc2e96be
|
||||
Author: Jacob Moroni <jmoroni@google.com>
|
||||
Date: Tue Feb 24 23:41:53 2026 +0000
|
||||
|
||||
RDMA/umem: Fix double dma_buf_unpin in failure path
|
||||
|
||||
In ib_umem_dmabuf_get_pinned_with_dma_device(), the call to
|
||||
ib_umem_dmabuf_map_pages() can fail. If this occurs, the dmabuf
|
||||
is immediately unpinned but the umem_dmabuf->pinned flag is still
|
||||
set. Then, when ib_umem_release() is called, it calls
|
||||
ib_umem_dmabuf_revoke() which will call dma_buf_unpin() again.
|
||||
|
||||
Fix this by removing the immediate unpin upon failure and just let
|
||||
the ib_umem_release/revoke path handle it. This also ensures the
|
||||
proper unmap-unpin unwind ordering if the dmabuf_map_pages call
|
||||
happened to fail due to dma_resv_wait_timeout (and therefore has
|
||||
a non-NULL umem_dmabuf->sgt).
|
||||
|
||||
Fixes: 1e4df4a21c5a ("RDMA/umem: Allow pinned dmabuf umem usage")
|
||||
Signed-off-by: Jacob Moroni <jmoroni@google.com>
|
||||
Link: https://patch.msgid.link/20260224234153.1207849-1-jmoroni@google.com
|
||||
Signed-off-by: Leon Romanovsky <leon@kernel.org>
|
||||
|
||||
Signed-off-by: Kamal Heib <kheib@redhat.com>
|
||||
|
||||
diff --git a/drivers/infiniband/core/umem_dmabuf.c b/drivers/infiniband/core/umem_dmabuf.c
|
||||
index 939da49b0dcc..420ee3a495b5 100644
|
||||
--- a/drivers/infiniband/core/umem_dmabuf.c
|
||||
+++ b/drivers/infiniband/core/umem_dmabuf.c
|
||||
@@ -218,13 +218,11 @@ ib_umem_dmabuf_get_pinned_with_dma_device(struct ib_device *device,
|
||||
|
||||
err = ib_umem_dmabuf_map_pages(umem_dmabuf);
|
||||
if (err)
|
||||
- goto err_unpin;
|
||||
+ goto err_release;
|
||||
dma_resv_unlock(umem_dmabuf->attach->dmabuf->resv);
|
||||
|
||||
return umem_dmabuf;
|
||||
|
||||
-err_unpin:
|
||||
- dma_buf_unpin(umem_dmabuf->attach);
|
||||
err_release:
|
||||
dma_resv_unlock(umem_dmabuf->attach->dmabuf->resv);
|
||||
ib_umem_release(&umem_dmabuf->umem);
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
|
||||
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
||||
index fb22590..b7b2ea6 100644
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
@@ -981,6 +981,9 @@ struct task_struct {
|
||||
unsigned sched_migrated:1;
|
||||
unsigned sched_task_hot:1;
|
||||
|
||||
+ /* Save user-dumpable when mm goes away */
|
||||
+ RH_KABI_FILL_HOLE(unsigned user_dumpable:1)
|
||||
+
|
||||
/* Force alignment to the next boundary: */
|
||||
unsigned :0;
|
||||
|
||||
diff --git a/kernel/exit.c b/kernel/exit.c
|
||||
index 86df8fa..a310ea8 100644
|
||||
--- a/kernel/exit.c
|
||||
+++ b/kernel/exit.c
|
||||
@@ -563,6 +563,7 @@ static void exit_mm(void)
|
||||
*/
|
||||
smp_mb__after_spinlock();
|
||||
local_irq_disable();
|
||||
+ current->user_dumpable = (get_dumpable(mm) == SUID_DUMP_USER);
|
||||
current->mm = NULL;
|
||||
membarrier_update_current_mm(NULL);
|
||||
enter_lazy_tlb(mm, current);
|
||||
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
|
||||
index d5f89f9..75bcc15 100644
|
||||
--- a/kernel/ptrace.c
|
||||
+++ b/kernel/ptrace.c
|
||||
@@ -272,11 +272,24 @@ static bool ptrace_has_cap(struct user_namespace *ns, unsigned int mode)
|
||||
return ns_capable(ns, CAP_SYS_PTRACE);
|
||||
}
|
||||
|
||||
+static bool task_still_dumpable(struct task_struct *task, unsigned int mode)
|
||||
+{
|
||||
+ struct mm_struct *mm = task->mm;
|
||||
+ if (mm) {
|
||||
+ if (get_dumpable(mm) == SUID_DUMP_USER)
|
||||
+ return true;
|
||||
+ return ptrace_has_cap(mm->user_ns, mode);
|
||||
+ }
|
||||
+
|
||||
+ if (task->user_dumpable)
|
||||
+ return true;
|
||||
+ return ptrace_has_cap(&init_user_ns, mode);
|
||||
+}
|
||||
+
|
||||
/* Returns 0 on success, -errno on denial. */
|
||||
static int __ptrace_may_access(struct task_struct *task, unsigned int mode)
|
||||
{
|
||||
const struct cred *cred = current_cred(), *tcred;
|
||||
- struct mm_struct *mm;
|
||||
kuid_t caller_uid;
|
||||
kgid_t caller_gid;
|
||||
|
||||
@@ -337,11 +350,8 @@ static int __ptrace_may_access(struct task_struct *task, unsigned int mode)
|
||||
* Pairs with a write barrier in commit_creds().
|
||||
*/
|
||||
smp_rmb();
|
||||
- mm = task->mm;
|
||||
- if (mm &&
|
||||
- ((get_dumpable(mm) != SUID_DUMP_USER) &&
|
||||
- !ptrace_has_cap(mm->user_ns, mode)))
|
||||
- return -EPERM;
|
||||
+ if (!task_still_dumpable(task, mode))
|
||||
+ return -EPERM;
|
||||
|
||||
return security_ptrace_access_check(task, mode);
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
From 760e1addc27ba1a7beb4a0a7e8b3e9ec49e7a34e Mon Sep 17 00:00:00 2001
|
||||
From: William Bowling <vakzz@zellic.io>
|
||||
Date: Wed, 13 May 2026 04:16:35 +0000
|
||||
Subject: [PATCH] net: skbuff: preserve shared-frag marker during coalescing
|
||||
|
||||
commit f84eca5817390257cef78013d0112481c503b4a3 upstream.
|
||||
|
||||
skb_try_coalesce() can attach paged frags from @from to @to. If @from
|
||||
has SKBFL_SHARED_FRAG set, the resulting @to skb can contain the same
|
||||
externally-owned or page-cache-backed frags, but the shared-frag marker
|
||||
is currently lost.
|
||||
|
||||
That breaks the invariant relied on by later in-place writers. In
|
||||
particular, ESP input checks skb_has_shared_frag() before deciding
|
||||
whether an uncloned nonlinear skb can skip skb_cow_data(). If TCP
|
||||
receive coalescing has moved shared frags into an unmarked skb, ESP can
|
||||
see skb_has_shared_frag() as false and decrypt in place over page-cache
|
||||
backed frags.
|
||||
|
||||
Propagate SKBFL_SHARED_FRAG when skb_try_coalesce() transfers paged
|
||||
frags. The tailroom copy path does not need the marker because it copies
|
||||
bytes into @to's linear data rather than transferring frag descriptors.
|
||||
|
||||
Fixes: cef401de7be8 ("net: fix possible wrong checksum generation")
|
||||
Fixes: f4c50a4034e6 ("xfrm: esp: avoid in-place decrypt on shared skb frags")
|
||||
Signed-off-by: William Bowling <vakzz@zellic.io>
|
||||
Reviewed-by: Eric Dumazet <edumazet@google.com>
|
||||
Tested-by: Jiayuan Chen <jiayuan.chen@linux.dev>
|
||||
Link: https://patch.msgid.link/20260513041635.1289541-1-vakzz@zellic.io
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
|
||||
index a753d01b587b..00d60588fb09 100644
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -6066,6 +6066,8 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
|
||||
from_shinfo->frags,
|
||||
from_shinfo->nr_frags * sizeof(skb_frag_t));
|
||||
to_shinfo->nr_frags += from_shinfo->nr_frags;
|
||||
+ if (from_shinfo->nr_frags)
|
||||
+ to_shinfo->flags |= from_shinfo->flags & SKBFL_SHARED_FRAG;
|
||||
|
||||
if (!skb_cloned(from))
|
||||
from_shinfo->nr_frags = 0;
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,152 +0,0 @@
|
||||
From fc6eb39c55e97df2f94ad974b8a5bbcd019da2c8 Mon Sep 17 00:00:00 2001
|
||||
From: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Date: Sat, 16 May 2026 07:28:53 +0900
|
||||
Subject: [PATCH] net: skbuff: propagate shared-frag marker through
|
||||
frag-transfer helpers
|
||||
|
||||
commit 48f6a5356a33dd78e7144ae1faef95ffc990aae0 upstream.
|
||||
|
||||
Two frag-transfer helpers (__pskb_copy_fclone() and skb_shift()) fail
|
||||
to propagate the SKBFL_SHARED_FRAG bit in skb_shinfo()->flags when
|
||||
moving frags from source to destination. __pskb_copy_fclone() defers
|
||||
the rest of the shinfo metadata to skb_copy_header() after copying
|
||||
frag descriptors, but that helper only carries over gso_{size,segs,
|
||||
type} and never touches skb_shinfo()->flags; skb_shift() moves frag
|
||||
descriptors directly and leaves flags untouched. As a result, the
|
||||
destination skb keeps a reference to the same externally-owned or
|
||||
page-cache-backed pages while reporting skb_has_shared_frag() as
|
||||
false.
|
||||
|
||||
The mismatch is harmful in any in-place writer that uses
|
||||
skb_has_shared_frag() to decide whether shared pages must be detoured
|
||||
through skb_cow_data(). ESP input is one such writer (esp4.c,
|
||||
esp6.c), and a single nft 'dup to <local>' rule -- or any other
|
||||
nf_dup_ipv4() / xt_TEE caller -- is enough to land a pskb_copy()'d
|
||||
skb in esp_input() with the marker stripped, letting an unprivileged
|
||||
user write into the page cache of a root-owned read-only file via
|
||||
authencesn-ESN stray writes.
|
||||
|
||||
Set SKBFL_SHARED_FRAG on the destination whenever frag descriptors
|
||||
were actually moved from the source. skb_copy() and skb_copy_expand()
|
||||
share skb_copy_header() too but linearize all paged data into freshly
|
||||
allocated head storage and emerge with nr_frags == 0, so
|
||||
skb_has_shared_frag() returns false on its own; they need no change.
|
||||
|
||||
The same omission exists in skb_gro_receive() and skb_gro_receive_list().
|
||||
The former moves the incoming skb's frag descriptors into the
|
||||
accumulator's last sub-skb via two paths (a direct frag-move loop and
|
||||
the head_frag + memcpy path); the latter chains the incoming skb whole
|
||||
onto p's frag_list. Downstream skb_segment() reads only
|
||||
skb_shinfo(p)->flags, and skb_segment_list() reuses each sub-skb's
|
||||
shinfo as the nskb -- both p and lp must carry the marker.
|
||||
|
||||
The same omission also exists in tcp_clone_payload(), which builds an
|
||||
MTU probe skb by moving frag descriptors from skbs on sk_write_queue
|
||||
into a freshly allocated nskb. The helper falls into the same family
|
||||
and warrants the same fix for consistency; no TCP TX-side in-place
|
||||
writer is currently known to reach a user page through this gap, but
|
||||
a future consumer depending on the marker would regress silently.
|
||||
|
||||
The same omission exists in skb_segment(): the per-iteration flag
|
||||
merge takes only head_skb's flag, and the inner switch that rebinds
|
||||
frag_skb to list_skb on head_skb-frags exhaustion does not fold the
|
||||
new frag_skb's flag into nskb. Fold frag_skb's flag at both sites
|
||||
so segments drawing frags from frag_list members carry the marker.
|
||||
|
||||
Fixes: cef401de7be8 ("net: fix possible wrong checksum generation")
|
||||
Fixes: f4c50a4034e6 ("xfrm: esp: avoid in-place decrypt on shared skb frags")
|
||||
Suggested-by: Sabrina Dubroca <sd@queasysnail.net>
|
||||
Suggested-by: Sultan Alsawaf <sultan@kerneltoast.com>
|
||||
Suggested-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
Suggested-by: Lin Ma <malin89@huawei.com>
|
||||
Suggested-by: Jingguo Tan <tanjingguo@huawei.com>
|
||||
Suggested-by: Aaron Esau <aaron1esau@gmail.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
|
||||
Tested-by: Rajat Gupta <rajat.gupta@oss.qualcomm.com>
|
||||
Link: https://patch.msgid.link/ageeJfJHwgzmKXbh@v4bel
|
||||
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
diff --git a/net/core/gro.c b/net/core/gro.c
|
||||
index ac498c9f82cf..f5c80c2f69df 100644
|
||||
--- a/net/core/gro.c
|
||||
+++ b/net/core/gro.c
|
||||
@@ -214,10 +214,12 @@ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb)
|
||||
p->data_len += len;
|
||||
p->truesize += delta_truesize;
|
||||
p->len += len;
|
||||
+ skb_shinfo(p)->flags |= skbinfo->flags & SKBFL_SHARED_FRAG;
|
||||
if (lp != p) {
|
||||
lp->data_len += len;
|
||||
lp->truesize += delta_truesize;
|
||||
lp->len += len;
|
||||
+ skb_shinfo(lp)->flags |= skbinfo->flags & SKBFL_SHARED_FRAG;
|
||||
}
|
||||
NAPI_GRO_CB(skb)->same_flow = 1;
|
||||
return 0;
|
||||
@@ -245,6 +247,8 @@ int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb)
|
||||
p->truesize += skb->truesize;
|
||||
p->len += skb->len;
|
||||
|
||||
+ skb_shinfo(p)->flags |= skb_shinfo(skb)->flags & SKBFL_SHARED_FRAG;
|
||||
+
|
||||
NAPI_GRO_CB(skb)->same_flow = 1;
|
||||
|
||||
return 0;
|
||||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
|
||||
index 00d60588fb09..aa9e91488473 100644
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -2214,6 +2214,7 @@ struct sk_buff *__pskb_copy_fclone(struct sk_buff *skb, int headroom,
|
||||
skb_frag_ref(skb, i);
|
||||
}
|
||||
skb_shinfo(n)->nr_frags = i;
|
||||
+ skb_shinfo(n)->flags |= skb_shinfo(skb)->flags & SKBFL_SHARED_FRAG;
|
||||
}
|
||||
|
||||
if (skb_has_frag_list(skb)) {
|
||||
@@ -4289,6 +4290,8 @@ int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen)
|
||||
tgt->ip_summed = CHECKSUM_PARTIAL;
|
||||
skb->ip_summed = CHECKSUM_PARTIAL;
|
||||
|
||||
+ skb_shinfo(tgt)->flags |= skb_shinfo(skb)->flags & SKBFL_SHARED_FRAG;
|
||||
+
|
||||
skb_len_add(skb, -shiftlen);
|
||||
skb_len_add(tgt, shiftlen);
|
||||
|
||||
@@ -4899,7 +4902,8 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
|
||||
skb_copy_from_linear_data_offset(head_skb, offset,
|
||||
skb_put(nskb, hsize), hsize);
|
||||
|
||||
- skb_shinfo(nskb)->flags |= skb_shinfo(head_skb)->flags &
|
||||
+ skb_shinfo(nskb)->flags |= (skb_shinfo(head_skb)->flags |
|
||||
+ skb_shinfo(frag_skb)->flags) &
|
||||
SKBFL_SHARED_FRAG;
|
||||
|
||||
if (skb_zerocopy_clone(nskb, frag_skb, GFP_ATOMIC))
|
||||
@@ -4916,6 +4920,9 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
|
||||
nfrags = skb_shinfo(list_skb)->nr_frags;
|
||||
frag = skb_shinfo(list_skb)->frags;
|
||||
frag_skb = list_skb;
|
||||
+
|
||||
+ skb_shinfo(nskb)->flags |= skb_shinfo(frag_skb)->flags & SKBFL_SHARED_FRAG;
|
||||
+
|
||||
if (!skb_headlen(list_skb)) {
|
||||
BUG_ON(!nfrags);
|
||||
} else {
|
||||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
|
||||
index 33c2fb60d056..c76672f544be 100644
|
||||
--- a/net/ipv4/tcp_output.c
|
||||
+++ b/net/ipv4/tcp_output.c
|
||||
@@ -2391,6 +2391,7 @@ static int tcp_clone_payload(struct sock *sk, struct sk_buff *to,
|
||||
todo = min_t(int, skb_frag_size(fragfrom),
|
||||
probe_size - len);
|
||||
len += todo;
|
||||
+ skb_shinfo(to)->flags |= skb_shinfo(skb)->flags & SKBFL_SHARED_FRAG;
|
||||
if (lastfrag &&
|
||||
skb_frag_page(fragfrom) == skb_frag_page(lastfrag) &&
|
||||
skb_frag_off(fragfrom) == skb_frag_off(lastfrag) +
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
From 7e3955b282eae20d61c75e499c75eade51c20060 Mon Sep 17 00:00:00 2001
|
||||
From: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
Date: Tue, 17 Mar 2026 20:00:26 +0100
|
||||
Subject: [PATCH] netfilter: nf_tables: release flowtable after rcu grace
|
||||
period on error
|
||||
|
||||
[ Upstream commit d73f4b53aaaea4c95f245e491aa5eeb8a21874ce ]
|
||||
|
||||
Call synchronize_rcu() after unregistering the hooks from error path,
|
||||
since a hook that already refers to this flowtable can be already
|
||||
registered, exposing this flowtable to packet path and nfnetlink_hook
|
||||
control plane.
|
||||
|
||||
This error path is rare, it should only happen by reaching the maximum
|
||||
number hooks or by failing to set up to hardware offload, just call
|
||||
synchronize_rcu().
|
||||
|
||||
There is a check for already used device hooks by different flowtable
|
||||
that could result in EEXIST at this late stage. The hook parser can be
|
||||
updated to perform this check earlier to this error path really becomes
|
||||
rarely exercised.
|
||||
|
||||
Uncovered by KASAN reported as use-after-free from nfnetlink_hook path
|
||||
when dumping hooks.
|
||||
|
||||
Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend")
|
||||
Reported-by: Yiming Qian <yimingqian591@gmail.com>
|
||||
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
Signed-off-by: Florian Westphal <fw@strlen.de>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
|
||||
index 0c12560e94f3..663c06413518 100644
|
||||
--- a/net/netfilter/nf_tables_api.c
|
||||
+++ b/net/netfilter/nf_tables_api.c
|
||||
@@ -8966,6 +8966,7 @@ static int nf_tables_newflowtable(struct sk_buff *skb,
|
||||
return 0;
|
||||
|
||||
err_flowtable_hooks:
|
||||
+ synchronize_rcu();
|
||||
nft_trans_destroy(trans);
|
||||
err_flowtable_trans:
|
||||
nft_hooks_destroy(&flowtable->hook_list);
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
From 68fceb143b635cdc59fed3896d5910aff38f345e Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Antipov <dmantipov@yandex.ru>
|
||||
Date: Tue, 5 Nov 2024 12:48:23 +0300
|
||||
Subject: [PATCH] can: j1939: j1939_session_new(): fix skb reference counting
|
||||
|
||||
[ Upstream commit a8c695005bfe6569acd73d777ca298ddddd66105 ]
|
||||
|
||||
Since j1939_session_skb_queue() does an extra skb_get() for each new
|
||||
skb, do the same for the initial one in j1939_session_new() to avoid
|
||||
refcount underflow.
|
||||
|
||||
Reported-by: syzbot+d4e8dc385d9258220c31@syzkaller.appspotmail.com
|
||||
Closes: https://syzkaller.appspot.com/bug?extid=d4e8dc385d9258220c31
|
||||
Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
|
||||
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
|
||||
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
|
||||
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
|
||||
Link: https://patch.msgid.link/20241105094823.2403806-1-dmantipov@yandex.ru
|
||||
[mkl: clean up commit message]
|
||||
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
diff --git a/net/can/j1939/transport.c b/net/can/j1939/transport.c
|
||||
index 319f47df3330..95f7a7e65a73 100644
|
||||
--- a/net/can/j1939/transport.c
|
||||
+++ b/net/can/j1939/transport.c
|
||||
@@ -1505,7 +1505,7 @@ static struct j1939_session *j1939_session_new(struct j1939_priv *priv,
|
||||
session->state = J1939_SESSION_NEW;
|
||||
|
||||
skb_queue_head_init(&session->skb_queue);
|
||||
- skb_queue_tail(&session->skb_queue, skb);
|
||||
+ skb_queue_tail(&session->skb_queue, skb_get(skb));
|
||||
|
||||
skcb = j1939_skb_to_cb(skb);
|
||||
memcpy(&session->skcb, skcb, sizeof(session->skcb));
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,159 +0,0 @@
|
||||
From 3c673dcebb6ae37885e3bf6960cac602bb0ae089 Mon Sep 17 00:00:00 2001
|
||||
From: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
Date: Tue, 21 Apr 2026 10:10:02 +0000
|
||||
Subject: [PATCH] ima: don't clear IMA_DIGSIG flag when setting or removing
|
||||
non-IMA xattr
|
||||
|
||||
JIRA: https://redhat.atlassian.net/browse/RHEL-169737
|
||||
CVE: CVE-2025-68183
|
||||
|
||||
commit 88b4cbcf6b041ae0f2fc8a34554a5b6a83a2b7cd
|
||||
Author: Coiby Xu <coxu@redhat.com>
|
||||
Date: Mon Sep 15 13:55:23 2025 +0800
|
||||
|
||||
ima: don't clear IMA_DIGSIG flag when setting or removing non-IMA xattr
|
||||
|
||||
Currently when both IMA and EVM are in fix mode, the IMA signature will
|
||||
be reset to IMA hash if a program first stores IMA signature in
|
||||
security.ima and then writes/removes some other security xattr for the
|
||||
file.
|
||||
|
||||
For example, on Fedora, after booting the kernel with "ima_appraise=fix
|
||||
evm=fix ima_policy=appraise_tcb" and installing rpm-plugin-ima,
|
||||
installing/reinstalling a package will not make good reference IMA
|
||||
signature generated. Instead IMA hash is generated,
|
||||
|
||||
# getfattr -m - -d -e hex /usr/bin/bash
|
||||
# file: usr/bin/bash
|
||||
security.ima=0x0404...
|
||||
|
||||
This happens because when setting security.selinux, the IMA_DIGSIG flag
|
||||
that had been set early was cleared. As a result, IMA hash is generated
|
||||
when the file is closed.
|
||||
|
||||
Similarly, IMA signature can be cleared on file close after removing
|
||||
security xattr like security.evm or setting/removing ACL.
|
||||
|
||||
Prevent replacing the IMA file signature with a file hash, by preventing
|
||||
the IMA_DIGSIG flag from being reset.
|
||||
|
||||
Here's a minimal C reproducer which sets security.selinux as the last
|
||||
step which can also replaced by removing security.evm or setting ACL,
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main() {
|
||||
const char* file_path = "/usr/sbin/test_binary";
|
||||
const char* hex_string = "030204d33204490066306402304";
|
||||
int length = strlen(hex_string);
|
||||
char* ima_attr_value;
|
||||
int fd;
|
||||
|
||||
fd = open(file_path, O_WRONLY|O_CREAT|O_EXCL, 0644);
|
||||
if (fd == -1) {
|
||||
perror("Error opening file");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ima_attr_value = (char*)malloc(length / 2 );
|
||||
for (int i = 0, j = 0; i < length; i += 2, j++) {
|
||||
sscanf(hex_string + i, "%2hhx", &ima_attr_value[j]);
|
||||
}
|
||||
|
||||
if (fsetxattr(fd, "security.ima", ima_attr_value, length/2, 0) == -1) {
|
||||
perror("Error setting extended attribute");
|
||||
close(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char* selinux_value= "system_u:object_r:bin_t:s0";
|
||||
if (fsetxattr(fd, "security.selinux", selinux_value, strlen(selinux_value), 0) == -1) {
|
||||
perror("Error setting extended attribute");
|
||||
close(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Signed-off-by: Coiby Xu <coxu@redhat.com>
|
||||
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
|
||||
|
||||
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>
|
||||
|
||||
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
|
||||
index 656c709b974f..f7770c24995b 100644
|
||||
--- a/security/integrity/ima/ima_appraise.c
|
||||
+++ b/security/integrity/ima/ima_appraise.c
|
||||
@@ -671,6 +671,15 @@ static int ima_protect_xattr(struct dentry *dentry, const char *xattr_name,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * ima_reset_appraise_flags - reset ima_iint_cache flags
|
||||
+ *
|
||||
+ * @digsig: whether to clear/set IMA_DIGSIG flag, tristate values
|
||||
+ * 0: clear IMA_DIGSIG
|
||||
+ * 1: set IMA_DIGSIG
|
||||
+ * -1: don't change IMA_DIGSIG
|
||||
+ *
|
||||
+ */
|
||||
static void ima_reset_appraise_flags(struct inode *inode, int digsig)
|
||||
{
|
||||
struct ima_iint_cache *iint;
|
||||
@@ -683,9 +692,9 @@ static void ima_reset_appraise_flags(struct inode *inode, int digsig)
|
||||
return;
|
||||
iint->measured_pcrs = 0;
|
||||
set_bit(IMA_CHANGE_XATTR, &iint->atomic_flags);
|
||||
- if (digsig)
|
||||
+ if (digsig == 1)
|
||||
set_bit(IMA_DIGSIG, &iint->atomic_flags);
|
||||
- else
|
||||
+ else if (digsig == 0)
|
||||
clear_bit(IMA_DIGSIG, &iint->atomic_flags);
|
||||
}
|
||||
|
||||
@@ -771,6 +780,8 @@ static int ima_inode_setxattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
digsig = (xvalue->type == EVM_IMA_XATTR_DIGSIG);
|
||||
} else if (!strcmp(xattr_name, XATTR_NAME_EVM) && xattr_value_len > 0) {
|
||||
digsig = (xvalue->type == EVM_XATTR_PORTABLE_DIGSIG);
|
||||
+ } else {
|
||||
+ digsig = -1;
|
||||
}
|
||||
if (result == 1 || evm_revalidate_status(xattr_name)) {
|
||||
ima_reset_appraise_flags(d_backing_inode(dentry), digsig);
|
||||
@@ -784,7 +795,7 @@ static int ima_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
const char *acl_name, struct posix_acl *kacl)
|
||||
{
|
||||
if (evm_revalidate_status(acl_name))
|
||||
- ima_reset_appraise_flags(d_backing_inode(dentry), 0);
|
||||
+ ima_reset_appraise_flags(d_backing_inode(dentry), -1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -792,11 +803,13 @@ static int ima_inode_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
static int ima_inode_removexattr(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
const char *xattr_name)
|
||||
{
|
||||
- int result;
|
||||
+ int result, digsig = -1;
|
||||
|
||||
result = ima_protect_xattr(dentry, xattr_name, NULL, 0);
|
||||
if (result == 1 || evm_revalidate_status(xattr_name)) {
|
||||
- ima_reset_appraise_flags(d_backing_inode(dentry), 0);
|
||||
+ if (!strcmp(xattr_name, XATTR_NAME_IMA))
|
||||
+ digsig = 0;
|
||||
+ ima_reset_appraise_flags(d_backing_inode(dentry), digsig);
|
||||
if (result == 1)
|
||||
result = 0;
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,43 +0,0 @@
|
||||
From 633e8f87dad32263f6a57dccdb873f042c062111 Mon Sep 17 00:00:00 2001
|
||||
From: Jenny Guanni Qu <qguanni@gmail.com>
|
||||
Date: Thu, 12 Mar 2026 14:49:50 +0000
|
||||
Subject: [PATCH] netfilter: nf_conntrack_h323: check for zero length in
|
||||
DecodeQ931()
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
[ Upstream commit f173d0f4c0f689173f8cdac79991043a4a89bf66 ]
|
||||
|
||||
In DecodeQ931(), the UserUserIE code path reads a 16-bit length from
|
||||
the packet, then decrements it by 1 to skip the protocol discriminator
|
||||
byte before passing it to DecodeH323_UserInformation(). If the encoded
|
||||
length is 0, the decrement wraps to -1, which is then passed as a
|
||||
large value to the decoder, leading to an out-of-bounds read.
|
||||
|
||||
Add a check to ensure len is positive after the decrement.
|
||||
|
||||
Fixes: 5e35941d9901 ("[NETFILTER]: Add H.323 conntrack/NAT helper")
|
||||
Reported-by: Klaudia Kloc <klaudia@vidocsecurity.com>
|
||||
Reported-by: Dawid Moczadło <dawid@vidocsecurity.com>
|
||||
Tested-by: Jenny Guanni Qu <qguanni@gmail.com>
|
||||
Signed-off-by: Jenny Guanni Qu <qguanni@gmail.com>
|
||||
Signed-off-by: Florian Westphal <fw@strlen.de>
|
||||
Signed-off-by: Sasha Levin <sashal@kernel.org>
|
||||
|
||||
diff --git a/net/netfilter/nf_conntrack_h323_asn1.c b/net/netfilter/nf_conntrack_h323_asn1.c
|
||||
index c972e9488e16..7b1497ed97d2 100644
|
||||
--- a/net/netfilter/nf_conntrack_h323_asn1.c
|
||||
+++ b/net/netfilter/nf_conntrack_h323_asn1.c
|
||||
@@ -924,6 +924,8 @@ int DecodeQ931(unsigned char *buf, size_t sz, Q931 *q931)
|
||||
break;
|
||||
p++;
|
||||
len--;
|
||||
+ if (len <= 0)
|
||||
+ break;
|
||||
return DecodeH323_UserInformation(buf, p, len,
|
||||
&q931->UUIE);
|
||||
}
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Update lpfc version to 14.4.0.12"
|
||||
# reverse of cs10 14af547a198d243a0ef02f489884ffb113e8c54f
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
|
||||
index f3dada5bf7c1..31c3c5abdca6 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_version.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_version.h
|
||||
@@ -20,7 +20,7 @@
|
||||
* included with this package. *
|
||||
*******************************************************************/
|
||||
|
||||
-#define LPFC_DRIVER_VERSION "14.4.0.12"
|
||||
+#define LPFC_DRIVER_VERSION "14.4.0.11"
|
||||
#define LPFC_DRIVER_NAME "lpfc"
|
||||
|
||||
/* Used for SLI 2/3 */
|
||||
@ -1,329 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Add capability to register Platform Name ID to fabric"
|
||||
# reverse of cs10 71f3928a71657839d9362695e7446414fa25ebad
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
|
||||
index 8b6386e2e3a5..ad8f5dee23a3 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc.h
|
||||
@@ -634,7 +634,6 @@ struct lpfc_vport {
|
||||
#define FC_CT_RSPN_ID 0x8 /* RSPN_ID accepted by switch */
|
||||
#define FC_CT_RFT_ID 0x10 /* RFT_ID accepted by switch */
|
||||
#define FC_CT_RPRT_DEFER 0x20 /* Defer issuing FDMI RPRT */
|
||||
-#define FC_CT_RSPNI_PNI 0x40 /* RSPNI_PNI accepted by switch */
|
||||
|
||||
struct list_head fc_nodes;
|
||||
spinlock_t fc_nodes_list_lock; /* spinlock for fc_nodes list */
|
||||
@@ -1079,8 +1078,6 @@ struct lpfc_hba {
|
||||
|
||||
uint32_t nport_event_cnt; /* timestamp for nlplist entry */
|
||||
|
||||
- unsigned long pni; /* 64-bit Platform Name Identifier */
|
||||
-
|
||||
uint8_t wwnn[8];
|
||||
uint8_t wwpn[8];
|
||||
uint32_t RandomData[7];
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
|
||||
index 817b02901c9d..cc8af576f57c 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_ct.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_ct.c
|
||||
@@ -1742,28 +1742,6 @@ lpfc_cmpl_ct_cmd_rsnn_nn(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
return;
|
||||
}
|
||||
|
||||
-static void
|
||||
-lpfc_cmpl_ct_cmd_rspni_pni(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
- struct lpfc_iocbq *rspiocb)
|
||||
-{
|
||||
- struct lpfc_vport *vport;
|
||||
- struct lpfc_dmabuf *outp;
|
||||
- struct lpfc_sli_ct_request *ctrsp;
|
||||
- u32 ulp_status;
|
||||
-
|
||||
- vport = cmdiocb->vport;
|
||||
- ulp_status = get_job_ulpstatus(phba, rspiocb);
|
||||
-
|
||||
- if (ulp_status == IOSTAT_SUCCESS) {
|
||||
- outp = cmdiocb->rsp_dmabuf;
|
||||
- ctrsp = (struct lpfc_sli_ct_request *)outp->virt;
|
||||
- if (be16_to_cpu(ctrsp->CommandResponse.bits.CmdRsp) ==
|
||||
- SLI_CT_RESPONSE_FS_ACC)
|
||||
- vport->ct_flags |= FC_CT_RSPNI_PNI;
|
||||
- }
|
||||
- lpfc_cmpl_ct(phba, cmdiocb, rspiocb);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
lpfc_cmpl_ct_cmd_da_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
struct lpfc_iocbq *rspiocb)
|
||||
@@ -1978,8 +1956,6 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
|
||||
bpl->tus.f.bdeSize = RSPN_REQUEST_SZ;
|
||||
else if (cmdcode == SLI_CTNS_RSNN_NN)
|
||||
bpl->tus.f.bdeSize = RSNN_REQUEST_SZ;
|
||||
- else if (cmdcode == SLI_CTNS_RSPNI_PNI)
|
||||
- bpl->tus.f.bdeSize = RSPNI_REQUEST_SZ;
|
||||
else if (cmdcode == SLI_CTNS_DA_ID)
|
||||
bpl->tus.f.bdeSize = DA_ID_REQUEST_SZ;
|
||||
else if (cmdcode == SLI_CTNS_RFF_ID)
|
||||
@@ -2101,18 +2077,6 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode,
|
||||
CtReq->un.rsnn.symbname, size);
|
||||
cmpl = lpfc_cmpl_ct_cmd_rsnn_nn;
|
||||
break;
|
||||
- case SLI_CTNS_RSPNI_PNI:
|
||||
- vport->ct_flags &= ~FC_CT_RSPNI_PNI;
|
||||
- CtReq->CommandResponse.bits.CmdRsp =
|
||||
- cpu_to_be16(SLI_CTNS_RSPNI_PNI);
|
||||
- CtReq->un.rspni.pni = cpu_to_be64(phba->pni);
|
||||
- scnprintf(CtReq->un.rspni.symbname,
|
||||
- sizeof(CtReq->un.rspni.symbname), "OS Host Name::%s",
|
||||
- phba->os_host_name);
|
||||
- CtReq->un.rspni.len = strnlen(CtReq->un.rspni.symbname,
|
||||
- sizeof(CtReq->un.rspni.symbname));
|
||||
- cmpl = lpfc_cmpl_ct_cmd_rspni_pni;
|
||||
- break;
|
||||
case SLI_CTNS_DA_ID:
|
||||
/* Implement DA_ID Nameserver request */
|
||||
CtReq->CommandResponse.bits.CmdRsp =
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 009d72ed08b0..15c062c1566d 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -650,6 +650,8 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
ndlp->nlp_class_sup |= FC_COS_CLASS2;
|
||||
if (sp->cls3.classValid)
|
||||
ndlp->nlp_class_sup |= FC_COS_CLASS3;
|
||||
+ if (sp->cls4.classValid)
|
||||
+ ndlp->nlp_class_sup |= FC_COS_CLASS4;
|
||||
ndlp->nlp_maxframe = ((sp->cmn.bbRcvSizeMsb & 0x0F) << 8) |
|
||||
sp->cmn.bbRcvSizeLsb;
|
||||
|
||||
@@ -1354,14 +1356,6 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
/* Can't do SLI4 class2 without support sequence coalescing */
|
||||
sp->cls2.classValid = 0;
|
||||
sp->cls2.seqDelivery = 0;
|
||||
-
|
||||
- /* Fill out Auxiliary Parameter Data */
|
||||
- if (phba->pni) {
|
||||
- sp->aux.flags =
|
||||
- AUX_PARM_DATA_VALID | AUX_PARM_PNI_VALID;
|
||||
- sp->aux.pni = cpu_to_be64(phba->pni);
|
||||
- sp->aux.npiv_cnt = cpu_to_be16(phba->max_vpi - 1);
|
||||
- }
|
||||
} else {
|
||||
/* Historical, setting sequential-delivery bit for SLI3 */
|
||||
sp->cls2.seqDelivery = (sp->cls2.classValid) ? 1 : 0;
|
||||
@@ -5662,6 +5656,7 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
|
||||
sp->cls1.classValid = 0;
|
||||
sp->cls2.classValid = 0;
|
||||
sp->cls3.classValid = 0;
|
||||
+ sp->cls4.classValid = 0;
|
||||
|
||||
/* Copy our worldwide names */
|
||||
memcpy(&sp->portName, &vport->fc_sparam.portName,
|
||||
@@ -11515,13 +11510,6 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
sp->cls2.seqDelivery = 1;
|
||||
sp->cls3.seqDelivery = 1;
|
||||
|
||||
- /* Fill out Auxiliary Parameter Data */
|
||||
- if (phba->pni) {
|
||||
- sp->aux.flags =
|
||||
- AUX_PARM_DATA_VALID | AUX_PARM_PNI_VALID;
|
||||
- sp->aux.pni = cpu_to_be64(phba->pni);
|
||||
- }
|
||||
-
|
||||
pcmd += sizeof(uint32_t); /* CSP Word 2 */
|
||||
pcmd += sizeof(uint32_t); /* CSP Word 3 */
|
||||
pcmd += sizeof(uint32_t); /* CSP Word 4 */
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
index d0bc07fd58e1..dcf78ea77a7d 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
@@ -4373,8 +4373,6 @@ lpfc_mbx_cmpl_ns_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
||||
lpfc_ns_cmd(vport, SLI_CTNS_RNN_ID, 0, 0);
|
||||
lpfc_ns_cmd(vport, SLI_CTNS_RSNN_NN, 0, 0);
|
||||
lpfc_ns_cmd(vport, SLI_CTNS_RSPN_ID, 0, 0);
|
||||
- if (phba->pni)
|
||||
- lpfc_ns_cmd(vport, SLI_CTNS_RSPNI_PNI, 0, 0);
|
||||
lpfc_ns_cmd(vport, SLI_CTNS_RFT_ID, 0, 0);
|
||||
|
||||
if ((vport->cfg_enable_fc4_type == LPFC_ENABLE_BOTH) ||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
|
||||
index b2e353590ebb..3bc0efa7453e 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hw.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hw.h
|
||||
@@ -168,11 +168,6 @@ struct lpfc_sli_ct_request {
|
||||
uint8_t len;
|
||||
uint8_t symbname[255];
|
||||
} rspn;
|
||||
- struct rspni { /* For RSPNI_PNI requests */
|
||||
- __be64 pni;
|
||||
- u8 len;
|
||||
- u8 symbname[255];
|
||||
- } rspni;
|
||||
struct gff {
|
||||
uint32_t PortId;
|
||||
} gff;
|
||||
@@ -218,8 +213,6 @@ struct lpfc_sli_ct_request {
|
||||
sizeof(struct da_id))
|
||||
#define RSPN_REQUEST_SZ (offsetof(struct lpfc_sli_ct_request, un) + \
|
||||
sizeof(struct rspn))
|
||||
-#define RSPNI_REQUEST_SZ (offsetof(struct lpfc_sli_ct_request, un) + \
|
||||
- sizeof(struct rspni))
|
||||
|
||||
/*
|
||||
* FsType Definitions
|
||||
@@ -316,7 +309,6 @@ struct lpfc_sli_ct_request {
|
||||
#define SLI_CTNS_RIP_NN 0x0235
|
||||
#define SLI_CTNS_RIPA_NN 0x0236
|
||||
#define SLI_CTNS_RSNN_NN 0x0239
|
||||
-#define SLI_CTNS_RSPNI_PNI 0x0240
|
||||
#define SLI_CTNS_DA_ID 0x0300
|
||||
|
||||
/*
|
||||
@@ -520,21 +512,6 @@ struct class_parms {
|
||||
uint8_t word3Reserved2; /* Fc Word 3, bit 0: 7 */
|
||||
};
|
||||
|
||||
-enum aux_parm_flags {
|
||||
- AUX_PARM_PNI_VALID = 0x20, /* FC Word 0, bit 29 */
|
||||
- AUX_PARM_DATA_VALID = 0x40, /* FC Word 0, bit 30 */
|
||||
-};
|
||||
-
|
||||
-struct aux_parm {
|
||||
- u8 flags; /* FC Word 0, bit 31:24 */
|
||||
- u8 ext_feat[3]; /* FC Word 0, bit 23:0 */
|
||||
-
|
||||
- __be64 pni; /* FC Word 1 and 2, platform name identifier */
|
||||
-
|
||||
- __be16 rsvd; /* FC Word 3, bit 31:16 */
|
||||
- __be16 npiv_cnt; /* FC Word 3, bit 15:0 */
|
||||
-} __packed;
|
||||
-
|
||||
struct serv_parm { /* Structure is in Big Endian format */
|
||||
struct csp cmn;
|
||||
struct lpfc_name portName;
|
||||
@@ -542,7 +519,7 @@ struct serv_parm { /* Structure is in Big Endian format */
|
||||
struct class_parms cls1;
|
||||
struct class_parms cls2;
|
||||
struct class_parms cls3;
|
||||
- struct aux_parm aux;
|
||||
+ struct class_parms cls4;
|
||||
union {
|
||||
uint8_t vendorVersion[16];
|
||||
struct {
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
index 9e785bbf6785..e16370da3e45 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
@@ -432,6 +432,8 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
ndlp->nlp_class_sup |= FC_COS_CLASS2;
|
||||
if (sp->cls3.classValid)
|
||||
ndlp->nlp_class_sup |= FC_COS_CLASS3;
|
||||
+ if (sp->cls4.classValid)
|
||||
+ ndlp->nlp_class_sup |= FC_COS_CLASS4;
|
||||
ndlp->nlp_maxframe =
|
||||
((sp->cmn.bbRcvSizeMsb & 0x0F) << 8) | sp->cmn.bbRcvSizeLsb;
|
||||
/* if already logged in, do implicit logout */
|
||||
@@ -1415,6 +1417,8 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
|
||||
ndlp->nlp_class_sup |= FC_COS_CLASS2;
|
||||
if (sp->cls3.classValid)
|
||||
ndlp->nlp_class_sup |= FC_COS_CLASS3;
|
||||
+ if (sp->cls4.classValid)
|
||||
+ ndlp->nlp_class_sup |= FC_COS_CLASS4;
|
||||
ndlp->nlp_maxframe =
|
||||
((sp->cmn.bbRcvSizeMsb & 0x0F) << 8) | sp->cmn.bbRcvSizeLsb;
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index a4ae0e5c0bfa..8b9fcd9c0d36 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -27,8 +27,6 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/lockdep.h>
|
||||
-#include <linux/dmi.h>
|
||||
-#include <linux/of.h>
|
||||
|
||||
#include <scsi/scsi.h>
|
||||
#include <scsi/scsi_cmnd.h>
|
||||
@@ -8441,70 +8439,6 @@ lpfc_set_host_tm(struct lpfc_hba *phba)
|
||||
return rc;
|
||||
}
|
||||
|
||||
-/**
|
||||
- * lpfc_get_platform_uuid - Attempts to extract a platform uuid
|
||||
- * @phba: pointer to lpfc hba data structure.
|
||||
- *
|
||||
- * This routine attempts to first read SMBIOS DMI data for the System
|
||||
- * Information structure offset 08h called System UUID. Else, no platform
|
||||
- * UUID will be advertised.
|
||||
- **/
|
||||
-static void
|
||||
-lpfc_get_platform_uuid(struct lpfc_hba *phba)
|
||||
-{
|
||||
- int rc;
|
||||
- const char *uuid;
|
||||
- char pni[17] = {0}; /* 16 characters + '\0' */
|
||||
- bool is_ff = true, is_00 = true;
|
||||
- u8 i;
|
||||
-
|
||||
- /* First attempt SMBIOS DMI */
|
||||
- uuid = dmi_get_system_info(DMI_PRODUCT_UUID);
|
||||
- if (uuid) {
|
||||
- lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
||||
- "2088 SMBIOS UUID %s\n",
|
||||
- uuid);
|
||||
- } else {
|
||||
- lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
||||
- "2099 Could not extract UUID\n");
|
||||
- }
|
||||
-
|
||||
- if (uuid && uuid_is_valid(uuid)) {
|
||||
- /* Generate PNI from UUID format.
|
||||
- *
|
||||
- * 1.) Extract lower 64 bits from UUID format.
|
||||
- * 2.) Set 3h for NAA Locally Assigned Name Identifier format.
|
||||
- *
|
||||
- * e.g. xxxxxxxx-xxxx-xxxx-yyyy-yyyyyyyyyyyy
|
||||
- *
|
||||
- * extract the yyyy-yyyyyyyyyyyy portion
|
||||
- * final PNI 3yyyyyyyyyyyyyyy
|
||||
- */
|
||||
- scnprintf(pni, sizeof(pni), "3%c%c%c%s",
|
||||
- uuid[20], uuid[21], uuid[22], &uuid[24]);
|
||||
-
|
||||
- /* Sanitize the converted PNI */
|
||||
- for (i = 1; i < 16 && (is_ff || is_00); i++) {
|
||||
- if (pni[i] != '0')
|
||||
- is_00 = false;
|
||||
- if (pni[i] != 'f' && pni[i] != 'F')
|
||||
- is_ff = false;
|
||||
- }
|
||||
-
|
||||
- /* Convert from char* to unsigned long */
|
||||
- rc = kstrtoul(pni, 16, &phba->pni);
|
||||
- if (!rc && !is_ff && !is_00) {
|
||||
- lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
||||
- "2100 PNI 0x%016lx\n", phba->pni);
|
||||
- } else {
|
||||
- lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
|
||||
- "2101 PNI %s generation status %d\n",
|
||||
- pni, rc);
|
||||
- phba->pni = 0;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* lpfc_sli4_hba_setup - SLI4 device initialization PCI function
|
||||
* @phba: Pointer to HBA context object.
|
||||
@@ -8588,10 +8522,6 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
|
||||
clear_bit(HBA_FCOE_MODE, &phba->hba_flag);
|
||||
}
|
||||
|
||||
- /* Obtain platform UUID, only for SLI4 FC adapters */
|
||||
- if (!test_bit(HBA_FCOE_MODE, &phba->hba_flag))
|
||||
- lpfc_get_platform_uuid(phba);
|
||||
-
|
||||
if (bf_get(lpfc_mbx_rd_rev_cee_ver, &mqe->un.read_rev) ==
|
||||
LPFC_DCBX_CEE_MODE)
|
||||
set_bit(HBA_FIP_SUPPORT, &phba->hba_flag);
|
||||
@ -1,27 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Allow support for BB credit recovery in point-to-point topology"
|
||||
# reverse of cs10 db29ff738106f5cd68a5fd5299f937c124aaef2a
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 15c062c1566d..ef6e4ee9b608 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -2279,8 +2279,7 @@ lpfc_issue_els_plogi(struct lpfc_vport *vport, uint32_t did, uint8_t retry)
|
||||
|
||||
sp->cmn.valid_vendor_ver_level = 0;
|
||||
memset(sp->un.vendorVersion, 0, sizeof(sp->un.vendorVersion));
|
||||
- if (!test_bit(FC_PT2PT, &vport->fc_flag))
|
||||
- sp->cmn.bbRcvSizeMsb &= 0xF;
|
||||
+ sp->cmn.bbRcvSizeMsb &= 0xF;
|
||||
|
||||
/* Check if the destination port supports VMID */
|
||||
ndlp->vmid_support = 0;
|
||||
@@ -5670,8 +5669,7 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag,
|
||||
sp->cmn.valid_vendor_ver_level = 0;
|
||||
memset(sp->un.vendorVersion, 0,
|
||||
sizeof(sp->un.vendorVersion));
|
||||
- if (!test_bit(FC_PT2PT, &vport->fc_flag))
|
||||
- sp->cmn.bbRcvSizeMsb &= 0xF;
|
||||
+ sp->cmn.bbRcvSizeMsb &= 0xF;
|
||||
|
||||
/* If our firmware supports this feature, convey that
|
||||
* info to the target using the vendor specific field.
|
||||
@ -1,101 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Fix reusing an ndlp that is marked NLP_DROPPED during FLOGI"
|
||||
# reverse of cs10 a1229adf21035776936072b77d724e9e79cdf813
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index ef6e4ee9b608..f8df66009c35 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -934,15 +934,10 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
/* Check to see if link went down during discovery */
|
||||
if (lpfc_els_chk_latt(vport)) {
|
||||
/* One additional decrement on node reference count to
|
||||
- * trigger the release of the node. Make sure the ndlp
|
||||
- * is marked NLP_DROPPED.
|
||||
+ * trigger the release of the node
|
||||
*/
|
||||
- if (!test_bit(NLP_IN_DEV_LOSS, &ndlp->nlp_flag) &&
|
||||
- !test_bit(NLP_DROPPED, &ndlp->nlp_flag) &&
|
||||
- !(ndlp->fc4_xpt_flags & SCSI_XPT_REGD)) {
|
||||
- set_bit(NLP_DROPPED, &ndlp->nlp_flag);
|
||||
+ if (!(ndlp->fc4_xpt_flags & SCSI_XPT_REGD))
|
||||
lpfc_nlp_put(ndlp);
|
||||
- }
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -1000,10 +995,9 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
IOERR_LOOP_OPEN_FAILURE)))
|
||||
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
|
||||
"2858 FLOGI Status:x%x/x%x TMO"
|
||||
- ":x%x Data x%lx x%x x%lx x%x\n",
|
||||
+ ":x%x Data x%lx x%x\n",
|
||||
ulp_status, ulp_word4, tmo,
|
||||
- phba->hba_flag, phba->fcf.fcf_flag,
|
||||
- ndlp->nlp_flag, ndlp->fc4_xpt_flags);
|
||||
+ phba->hba_flag, phba->fcf.fcf_flag);
|
||||
|
||||
/* Check for retry */
|
||||
if (lpfc_els_retry(phba, cmdiocb, rspiocb)) {
|
||||
@@ -1021,17 +1015,14 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
* reference to trigger node release.
|
||||
*/
|
||||
if (!test_bit(NLP_IN_DEV_LOSS, &ndlp->nlp_flag) &&
|
||||
- !test_bit(NLP_DROPPED, &ndlp->nlp_flag) &&
|
||||
- !(ndlp->fc4_xpt_flags & SCSI_XPT_REGD)) {
|
||||
- set_bit(NLP_DROPPED, &ndlp->nlp_flag);
|
||||
+ !(ndlp->fc4_xpt_flags & SCSI_XPT_REGD))
|
||||
lpfc_nlp_put(ndlp);
|
||||
- }
|
||||
|
||||
lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS,
|
||||
"0150 FLOGI Status:x%x/x%x "
|
||||
- "xri x%x iotag x%x TMO:x%x refcnt %d\n",
|
||||
+ "xri x%x TMO:x%x refcnt %d\n",
|
||||
ulp_status, ulp_word4, cmdiocb->sli4_xritag,
|
||||
- cmdiocb->iotag, tmo, kref_read(&ndlp->kref));
|
||||
+ tmo, kref_read(&ndlp->kref));
|
||||
|
||||
/* If this is not a loop open failure, bail out */
|
||||
if (!(ulp_status == IOSTAT_LOCAL_REJECT &&
|
||||
@@ -1288,19 +1279,6 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
uint32_t tmo, did;
|
||||
int rc;
|
||||
|
||||
- /* It's possible for lpfc to reissue a FLOGI on an ndlp that is marked
|
||||
- * NLP_DROPPED. This happens when the FLOGI completed with the XB bit
|
||||
- * set causing lpfc to reference the ndlp until the XRI_ABORTED CQE is
|
||||
- * issued. The time window for the XRI_ABORTED CQE can be as much as
|
||||
- * 2*2*RA_TOV allowing for ndlp reuse of this type when the link is
|
||||
- * cycling quickly. When true, restore the initial reference and remove
|
||||
- * the NLP_DROPPED flag as lpfc is retrying.
|
||||
- */
|
||||
- if (test_and_clear_bit(NLP_DROPPED, &ndlp->nlp_flag)) {
|
||||
- if (!lpfc_nlp_get(ndlp))
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
cmdsize = (sizeof(uint32_t) + sizeof(struct serv_parm));
|
||||
elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
|
||||
ndlp->nlp_DID, ELS_CMD_FLOGI);
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
index dcf78ea77a7d..1510ed28f5a4 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
@@ -424,7 +424,6 @@ lpfc_check_nlp_post_devloss(struct lpfc_vport *vport,
|
||||
struct lpfc_nodelist *ndlp)
|
||||
{
|
||||
if (test_and_clear_bit(NLP_IN_RECOV_POST_DEV_LOSS, &ndlp->save_flags)) {
|
||||
- clear_bit(NLP_DROPPED, &ndlp->nlp_flag);
|
||||
lpfc_nlp_get(ndlp);
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY | LOG_NODE,
|
||||
"8438 Devloss timeout reversed on DID x%x "
|
||||
@@ -567,8 +566,7 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp)
|
||||
return fcf_inuse;
|
||||
}
|
||||
|
||||
- if (!test_and_set_bit(NLP_DROPPED, &ndlp->nlp_flag))
|
||||
- lpfc_nlp_put(ndlp);
|
||||
+ lpfc_nlp_put(ndlp);
|
||||
return fcf_inuse;
|
||||
}
|
||||
|
||||
@ -1,231 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Modify kref handling for Fabric Controller ndlps"
|
||||
# reverse of cs10 4cdd701db602453946844b4900c2da8637acc343
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index f8df66009c35..fea93a585fc9 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -3390,21 +3390,11 @@ lpfc_cmpl_els_disc_cmd(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
lpfc_cmpl_els_edc(phba, cmdiocb, rspiocb);
|
||||
return;
|
||||
}
|
||||
-
|
||||
if (ulp_status) {
|
||||
/* ELS discovery cmd completes with error */
|
||||
lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS | LOG_CGN_MGMT,
|
||||
"4203 ELS cmd x%x error: x%x x%X\n", cmd,
|
||||
ulp_status, ulp_word4);
|
||||
-
|
||||
- /* In the case where the ELS cmd completes with an error and
|
||||
- * the node does not have RPI registered, the node is
|
||||
- * outstanding and should put its initial reference.
|
||||
- */
|
||||
- if ((cmd == ELS_CMD_SCR || cmd == ELS_CMD_RDF) &&
|
||||
- !(ndlp->fc4_xpt_flags & SCSI_XPT_REGD) &&
|
||||
- !test_and_set_bit(NLP_DROPPED, &ndlp->nlp_flag))
|
||||
- lpfc_nlp_put(ndlp);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -3473,7 +3463,6 @@ lpfc_issue_els_scr(struct lpfc_vport *vport, uint8_t retry)
|
||||
uint8_t *pcmd;
|
||||
uint16_t cmdsize;
|
||||
struct lpfc_nodelist *ndlp;
|
||||
- bool node_created = false;
|
||||
|
||||
cmdsize = (sizeof(uint32_t) + sizeof(SCR));
|
||||
|
||||
@@ -3483,21 +3472,21 @@ lpfc_issue_els_scr(struct lpfc_vport *vport, uint8_t retry)
|
||||
if (!ndlp)
|
||||
return 1;
|
||||
lpfc_enqueue_node(vport, ndlp);
|
||||
- node_created = true;
|
||||
}
|
||||
|
||||
elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
|
||||
ndlp->nlp_DID, ELS_CMD_SCR);
|
||||
if (!elsiocb)
|
||||
- goto out_node_created;
|
||||
+ return 1;
|
||||
|
||||
if (phba->sli_rev == LPFC_SLI_REV4) {
|
||||
rc = lpfc_reg_fab_ctrl_node(vport, ndlp);
|
||||
if (rc) {
|
||||
+ lpfc_els_free_iocb(phba, elsiocb);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE,
|
||||
"0937 %s: Failed to reg fc node, rc %d\n",
|
||||
__func__, rc);
|
||||
- goto out_free_iocb;
|
||||
+ return 1;
|
||||
}
|
||||
}
|
||||
pcmd = (uint8_t *)elsiocb->cmd_dmabuf->virt;
|
||||
@@ -3516,27 +3505,23 @@ lpfc_issue_els_scr(struct lpfc_vport *vport, uint8_t retry)
|
||||
phba->fc_stat.elsXmitSCR++;
|
||||
elsiocb->cmd_cmpl = lpfc_cmpl_els_disc_cmd;
|
||||
elsiocb->ndlp = lpfc_nlp_get(ndlp);
|
||||
- if (!elsiocb->ndlp)
|
||||
- goto out_free_iocb;
|
||||
+ if (!elsiocb->ndlp) {
|
||||
+ lpfc_els_free_iocb(phba, elsiocb);
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
|
||||
"Issue SCR: did:x%x refcnt %d",
|
||||
ndlp->nlp_DID, kref_read(&ndlp->kref), 0);
|
||||
|
||||
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
||||
- if (rc == IOCB_ERROR)
|
||||
- goto out_iocb_error;
|
||||
+ if (rc == IOCB_ERROR) {
|
||||
+ lpfc_els_free_iocb(phba, elsiocb);
|
||||
+ lpfc_nlp_put(ndlp);
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
-
|
||||
-out_iocb_error:
|
||||
- lpfc_nlp_put(ndlp);
|
||||
-out_free_iocb:
|
||||
- lpfc_els_free_iocb(phba, elsiocb);
|
||||
-out_node_created:
|
||||
- if (node_created)
|
||||
- lpfc_nlp_put(ndlp);
|
||||
- return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3749,12 +3734,7 @@ lpfc_issue_els_farpr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
|
||||
*
|
||||
* Return code
|
||||
* 0 - Successfully issued rdf command
|
||||
- * < 0 - Failed to issue rdf command
|
||||
- * -EACCES - RDF not required for NPIV_PORT
|
||||
- * -ENODEV - No fabric controller device available
|
||||
- * -ENOMEM - No available memory
|
||||
- * -EIO - The mailbox failed to complete successfully.
|
||||
- *
|
||||
+ * 1 - Failed to issue rdf command
|
||||
**/
|
||||
int
|
||||
lpfc_issue_els_rdf(struct lpfc_vport *vport, uint8_t retry)
|
||||
@@ -3765,30 +3745,25 @@ lpfc_issue_els_rdf(struct lpfc_vport *vport, uint8_t retry)
|
||||
struct lpfc_nodelist *ndlp;
|
||||
uint16_t cmdsize;
|
||||
int rc;
|
||||
- bool node_created = false;
|
||||
- int err;
|
||||
|
||||
cmdsize = sizeof(*prdf);
|
||||
|
||||
- /* RDF ELS is not required on an NPIV VN_Port. */
|
||||
- if (vport->port_type == LPFC_NPIV_PORT)
|
||||
- return -EACCES;
|
||||
-
|
||||
ndlp = lpfc_findnode_did(vport, Fabric_Cntl_DID);
|
||||
if (!ndlp) {
|
||||
ndlp = lpfc_nlp_init(vport, Fabric_Cntl_DID);
|
||||
if (!ndlp)
|
||||
return -ENODEV;
|
||||
lpfc_enqueue_node(vport, ndlp);
|
||||
- node_created = true;
|
||||
}
|
||||
|
||||
+ /* RDF ELS is not required on an NPIV VN_Port. */
|
||||
+ if (vport->port_type == LPFC_NPIV_PORT)
|
||||
+ return -EACCES;
|
||||
+
|
||||
elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
|
||||
ndlp->nlp_DID, ELS_CMD_RDF);
|
||||
- if (!elsiocb) {
|
||||
- err = -ENOMEM;
|
||||
- goto out_node_created;
|
||||
- }
|
||||
+ if (!elsiocb)
|
||||
+ return -ENOMEM;
|
||||
|
||||
/* Configure the payload for the supported FPIN events. */
|
||||
prdf = (struct lpfc_els_rdf_req *)elsiocb->cmd_dmabuf->virt;
|
||||
@@ -3814,8 +3789,8 @@ lpfc_issue_els_rdf(struct lpfc_vport *vport, uint8_t retry)
|
||||
elsiocb->cmd_cmpl = lpfc_cmpl_els_disc_cmd;
|
||||
elsiocb->ndlp = lpfc_nlp_get(ndlp);
|
||||
if (!elsiocb->ndlp) {
|
||||
- err = -EIO;
|
||||
- goto out_free_iocb;
|
||||
+ lpfc_els_free_iocb(phba, elsiocb);
|
||||
+ return -EIO;
|
||||
}
|
||||
|
||||
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
|
||||
@@ -3824,19 +3799,11 @@ lpfc_issue_els_rdf(struct lpfc_vport *vport, uint8_t retry)
|
||||
|
||||
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
||||
if (rc == IOCB_ERROR) {
|
||||
- err = -EIO;
|
||||
- goto out_iocb_error;
|
||||
+ lpfc_els_free_iocb(phba, elsiocb);
|
||||
+ lpfc_nlp_put(ndlp);
|
||||
+ return -EIO;
|
||||
}
|
||||
return 0;
|
||||
-
|
||||
-out_iocb_error:
|
||||
- lpfc_nlp_put(ndlp);
|
||||
-out_free_iocb:
|
||||
- lpfc_els_free_iocb(phba, elsiocb);
|
||||
-out_node_created:
|
||||
- if (node_created)
|
||||
- lpfc_nlp_put(ndlp);
|
||||
- return err;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3857,23 +3824,19 @@ static int
|
||||
lpfc_els_rcv_rdf(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
||||
struct lpfc_nodelist *ndlp)
|
||||
{
|
||||
- int rc;
|
||||
-
|
||||
- rc = lpfc_els_rsp_acc(vport, ELS_CMD_RDF, cmdiocb, ndlp, NULL);
|
||||
/* Send LS_ACC */
|
||||
- if (rc) {
|
||||
+ if (lpfc_els_rsp_acc(vport, ELS_CMD_RDF, cmdiocb, ndlp, NULL)) {
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS | LOG_CGN_MGMT,
|
||||
- "1623 Failed to RDF_ACC from x%x for x%x Data: %d\n",
|
||||
- ndlp->nlp_DID, vport->fc_myDID, rc);
|
||||
+ "1623 Failed to RDF_ACC from x%x for x%x\n",
|
||||
+ ndlp->nlp_DID, vport->fc_myDID);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
- rc = lpfc_issue_els_rdf(vport, 0);
|
||||
/* Issue new RDF for reregistering */
|
||||
- if (rc) {
|
||||
+ if (lpfc_issue_els_rdf(vport, 0)) {
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS | LOG_CGN_MGMT,
|
||||
- "2623 Failed to re register RDF for x%x Data: %d\n",
|
||||
- vport->fc_myDID, rc);
|
||||
+ "2623 Failed to re register RDF for x%x\n",
|
||||
+ vport->fc_myDID);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
|
||||
index f9682ad0b888..e4f627eeb707 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_init.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_init.c
|
||||
@@ -3057,6 +3057,12 @@ lpfc_cleanup(struct lpfc_vport *vport)
|
||||
lpfc_vmid_vport_cleanup(vport);
|
||||
|
||||
list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
|
||||
+ if (ndlp->nlp_DID == Fabric_Cntl_DID &&
|
||||
+ ndlp->nlp_state == NLP_STE_UNUSED_NODE) {
|
||||
+ lpfc_nlp_put(ndlp);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
/* Fabric Ports not in UNMAPPED state are cleaned up in the
|
||||
* DEVICE_RM event.
|
||||
*/
|
||||
@ -1,166 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Fix leaked ndlp krefs when in point-to-point topology"
|
||||
# reverse of cs10 6613865f84be09ec32bee8199827f6bc7f9a36b8
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
|
||||
index ad8f5dee23a3..a3d1ba92c07c 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc.h
|
||||
@@ -312,6 +312,7 @@ struct lpfc_defer_flogi_acc {
|
||||
u16 rx_id;
|
||||
u16 ox_id;
|
||||
struct lpfc_nodelist *ndlp;
|
||||
+
|
||||
};
|
||||
|
||||
#define LPFC_VMID_TIMER 300 /* timer interval in seconds */
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_disc.h b/drivers/scsi/lpfc/lpfc_disc.h
|
||||
index 51cb8571c049..3d47dc7458d1 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_disc.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_disc.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2013 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
@@ -208,7 +208,6 @@ enum lpfc_nlp_flag {
|
||||
NPR list */
|
||||
NLP_RM_DFLT_RPI = 26, /* need to remove leftover dflt RPI */
|
||||
NLP_NODEV_REMOVE = 27, /* Defer removal till discovery ends */
|
||||
- NLP_FLOGI_DFR_ACC = 28, /* FLOGI LS_ACC was Deferred */
|
||||
NLP_SC_REQ = 29, /* Target requires authentication */
|
||||
NLP_FIRSTBURST = 30, /* Target supports FirstBurst */
|
||||
NLP_RPI_REGISTERED = 31 /* nlp_rpi is valid */
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index fea93a585fc9..79688e12bae2 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -1413,12 +1413,11 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
phba->defer_flogi_acc.ox_id;
|
||||
}
|
||||
|
||||
- /* The LS_ACC completion needs to drop the initial reference.
|
||||
- * This is a special case for Pt2Pt because both FLOGIs need
|
||||
- * to complete and lpfc defers the LS_ACC when the remote
|
||||
- * FLOGI arrives before the driver's FLOGI.
|
||||
- */
|
||||
- set_bit(NLP_FLOGI_DFR_ACC, &ndlp->nlp_flag);
|
||||
+ lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
+ "3354 Xmit deferred FLOGI ACC: rx_id: x%x,"
|
||||
+ " ox_id: x%x, hba_flag x%lx\n",
|
||||
+ phba->defer_flogi_acc.rx_id,
|
||||
+ phba->defer_flogi_acc.ox_id, phba->hba_flag);
|
||||
|
||||
/* Send deferred FLOGI ACC */
|
||||
lpfc_els_rsp_acc(vport, ELS_CMD_FLOGI, &defer_flogi_acc,
|
||||
@@ -1434,14 +1433,6 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
phba->defer_flogi_acc.ndlp = NULL;
|
||||
}
|
||||
|
||||
- lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
- "3354 Xmit deferred FLOGI ACC: rx_id: x%x,"
|
||||
- " ox_id: x%x, ndlp x%px hba_flag x%lx\n",
|
||||
- phba->defer_flogi_acc.rx_id,
|
||||
- phba->defer_flogi_acc.ox_id,
|
||||
- phba->defer_flogi_acc.ndlp,
|
||||
- phba->hba_flag);
|
||||
-
|
||||
vport->fc_myDID = did;
|
||||
}
|
||||
|
||||
@@ -5310,12 +5301,11 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
IOCB_t *irsp;
|
||||
LPFC_MBOXQ_t *mbox = NULL;
|
||||
u32 ulp_status, ulp_word4, tmo, did, iotag;
|
||||
- u32 cmd;
|
||||
|
||||
if (!vport) {
|
||||
lpfc_printf_log(phba, KERN_WARNING, LOG_ELS,
|
||||
"3177 null vport in ELS rsp\n");
|
||||
- goto release;
|
||||
+ goto out;
|
||||
}
|
||||
if (cmdiocb->context_un.mbox)
|
||||
mbox = cmdiocb->context_un.mbox;
|
||||
@@ -5425,7 +5415,7 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
* these conditions because it doesn't need the login.
|
||||
*/
|
||||
if (phba->sli_rev == LPFC_SLI_REV4 &&
|
||||
- vport->port_type == LPFC_NPIV_PORT &&
|
||||
+ vport && vport->port_type == LPFC_NPIV_PORT &&
|
||||
!(ndlp->fc4_xpt_flags & SCSI_XPT_REGD)) {
|
||||
if (ndlp->nlp_state != NLP_STE_PLOGI_ISSUE &&
|
||||
ndlp->nlp_state != NLP_STE_REG_LOGIN_ISSUE &&
|
||||
@@ -5441,27 +5431,6 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
}
|
||||
}
|
||||
|
||||
- /* The driver's unsolicited deferred FLOGI ACC in Pt2Pt needs to
|
||||
- * release the initial reference because the put after the free_iocb
|
||||
- * call removes only the reference from the defer logic. This FLOGI
|
||||
- * is never registered with the SCSI transport.
|
||||
- */
|
||||
- if (test_bit(FC_PT2PT, &vport->fc_flag) &&
|
||||
- test_and_clear_bit(NLP_FLOGI_DFR_ACC, &ndlp->nlp_flag)) {
|
||||
- lpfc_printf_vlog(vport, KERN_INFO,
|
||||
- LOG_ELS | LOG_NODE | LOG_DISCOVERY,
|
||||
- "3357 Pt2Pt Defer FLOGI ACC ndlp x%px, "
|
||||
- "nflags x%lx, fc_flag x%lx\n",
|
||||
- ndlp, ndlp->nlp_flag,
|
||||
- vport->fc_flag);
|
||||
- cmd = *((u32 *)cmdiocb->cmd_dmabuf->virt);
|
||||
- if (cmd == ELS_CMD_ACC) {
|
||||
- if (!test_and_set_bit(NLP_DROPPED, &ndlp->nlp_flag))
|
||||
- lpfc_nlp_put(ndlp);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
-release:
|
||||
/* Release the originating I/O reference. */
|
||||
lpfc_els_free_iocb(phba, cmdiocb);
|
||||
lpfc_nlp_put(ndlp);
|
||||
@@ -8430,6 +8399,13 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
||||
&wqe->xmit_els_rsp.wqe_com);
|
||||
|
||||
vport->fc_myDID = did;
|
||||
+
|
||||
+ lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
+ "3344 Deferring FLOGI ACC: rx_id: x%x,"
|
||||
+ " ox_id: x%x, hba_flag x%lx\n",
|
||||
+ phba->defer_flogi_acc.rx_id,
|
||||
+ phba->defer_flogi_acc.ox_id, phba->hba_flag);
|
||||
+
|
||||
phba->defer_flogi_acc.flag = true;
|
||||
|
||||
/* This nlp_get is paired with nlp_puts that reset the
|
||||
@@ -8438,14 +8414,6 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
||||
* processed or cancelled.
|
||||
*/
|
||||
phba->defer_flogi_acc.ndlp = lpfc_nlp_get(ndlp);
|
||||
-
|
||||
- lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
- "3344 Deferring FLOGI ACC: rx_id: x%x,"
|
||||
- " ox_id: x%x, ndlp x%px, hba_flag x%lx\n",
|
||||
- phba->defer_flogi_acc.rx_id,
|
||||
- phba->defer_flogi_acc.ox_id,
|
||||
- phba->defer_flogi_acc.ndlp,
|
||||
- phba->hba_flag);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10386,8 +10354,11 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
||||
* Do not process any unsolicited ELS commands
|
||||
* if the ndlp is in DEV_LOSS
|
||||
*/
|
||||
- if (test_bit(NLP_IN_DEV_LOSS, &ndlp->nlp_flag))
|
||||
+ if (test_bit(NLP_IN_DEV_LOSS, &ndlp->nlp_flag)) {
|
||||
+ if (newnode)
|
||||
+ lpfc_nlp_put(ndlp);
|
||||
goto dropit;
|
||||
+ }
|
||||
|
||||
elsiocb->ndlp = lpfc_nlp_get(ndlp);
|
||||
if (!elsiocb->ndlp)
|
||||
@ -1,51 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Ensure unregistration of rpis for received PLOGIs"
|
||||
# reverse of cs10 f695221fbfe2235768a0d33cce97523eb1d12399
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 79688e12bae2..458b46374189 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -3263,7 +3263,7 @@ lpfc_reg_fab_ctrl_node(struct lpfc_vport *vport, struct lpfc_nodelist *fc_ndlp)
|
||||
return -ENOMEM;
|
||||
}
|
||||
rc = lpfc_reg_rpi(phba, vport->vpi, fc_ndlp->nlp_DID,
|
||||
- (u8 *)&ns_ndlp->fc_sparam, mbox, fc_ndlp->nlp_rpi);
|
||||
+ (u8 *)&vport->fc_sparam, mbox, fc_ndlp->nlp_rpi);
|
||||
if (rc) {
|
||||
rc = -EACCES;
|
||||
goto out;
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
index e16370da3e45..99aefc54ac35 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
@@ -452,7 +452,18 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
*/
|
||||
if (!(ndlp->nlp_type & NLP_FABRIC) &&
|
||||
!(phba->nvmet_support)) {
|
||||
- break;
|
||||
+ /* Clear ndlp info, since follow up PRLI may have
|
||||
+ * updated ndlp information
|
||||
+ */
|
||||
+ ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
|
||||
+ ndlp->nlp_type &= ~(NLP_NVME_TARGET | NLP_NVME_INITIATOR);
|
||||
+ ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
|
||||
+ ndlp->nlp_nvme_info &= ~NLP_NVME_NSLER;
|
||||
+ clear_bit(NLP_FIRSTBURST, &ndlp->nlp_flag);
|
||||
+
|
||||
+ lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, cmdiocb,
|
||||
+ ndlp, NULL);
|
||||
+ return 1;
|
||||
}
|
||||
if (nlp_portwwn != 0 &&
|
||||
nlp_portwwn != wwn_to_u64(sp->portName.u.wwn))
|
||||
@@ -474,9 +485,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
|
||||
break;
|
||||
}
|
||||
- /* Clear ndlp info, since follow up processes may have
|
||||
- * updated ndlp information
|
||||
- */
|
||||
+
|
||||
ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
|
||||
ndlp->nlp_type &= ~(NLP_NVME_TARGET | NLP_NVME_INITIATOR);
|
||||
ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
|
||||
@ -1,22 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Remove redundant NULL ptr assignment in lpfc_els_free_iocb()"
|
||||
# reverse of cs10 834ef5ff877b17409e754a04a433e05441938a3d
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 458b46374189..073c4c69d646 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -5158,12 +5158,14 @@ lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
|
||||
} else {
|
||||
buf_ptr1 = elsiocb->cmd_dmabuf;
|
||||
lpfc_els_free_data(phba, buf_ptr1);
|
||||
+ elsiocb->cmd_dmabuf = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (elsiocb->bpl_dmabuf) {
|
||||
buf_ptr = elsiocb->bpl_dmabuf;
|
||||
lpfc_els_free_bpl(phba, buf_ptr);
|
||||
+ elsiocb->bpl_dmabuf = NULL;
|
||||
}
|
||||
lpfc_sli_release_iocbq(phba, elsiocb);
|
||||
return 0;
|
||||
@ -1,104 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Revise discovery related function headers and comments"
|
||||
# reverse of cs10 5e8d3ec786a04644f14f881e4017a450c305f786
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 073c4c69d646..f9a08704b78e 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -3024,7 +3024,6 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
ndlp->nlp_DID, ulp_status,
|
||||
ulp_word4);
|
||||
|
||||
- /* Call NLP_EVT_DEVICE_RM if link is down or LOGO is aborted */
|
||||
if (lpfc_error_lost_link(vport, ulp_status, ulp_word4))
|
||||
skip_recovery = 1;
|
||||
}
|
||||
@@ -3307,8 +3306,7 @@ lpfc_reg_fab_ctrl_node(struct lpfc_vport *vport, struct lpfc_nodelist *fc_ndlp)
|
||||
*
|
||||
* This routine is a generic completion callback function for Discovery ELS cmd.
|
||||
* Currently used by the ELS command issuing routines for the ELS State Change
|
||||
- * Request (SCR), lpfc_issue_els_scr(), Exchange Diagnostic Capabilities (EDC),
|
||||
- * lpfc_issue_els_edc() and the ELS RDF, lpfc_issue_els_rdf().
|
||||
+ * Request (SCR), lpfc_issue_els_scr() and the ELS RDF, lpfc_issue_els_rdf().
|
||||
* These commands will be retried once only for ELS timeout errors.
|
||||
**/
|
||||
static void
|
||||
@@ -3707,7 +3705,10 @@ lpfc_issue_els_farpr(struct lpfc_vport *vport, uint32_t nportid, uint8_t retry)
|
||||
lpfc_nlp_put(ndlp);
|
||||
return 1;
|
||||
}
|
||||
-
|
||||
+ /* This will cause the callback-function lpfc_cmpl_els_cmd to
|
||||
+ * trigger the release of the node.
|
||||
+ */
|
||||
+ /* Don't release reference count as RDF is likely outstanding */
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4298,7 +4299,7 @@ lpfc_issue_els_edc(struct lpfc_vport *vport, uint8_t retry)
|
||||
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
||||
if (rc == IOCB_ERROR) {
|
||||
/* The additional lpfc_nlp_put will cause the following
|
||||
- * lpfc_els_free_iocb routine to trigger the release of
|
||||
+ * lpfc_els_free_iocb routine to trigger the rlease of
|
||||
* the node.
|
||||
*/
|
||||
lpfc_els_free_iocb(phba, elsiocb);
|
||||
@@ -5125,7 +5126,7 @@ lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb)
|
||||
{
|
||||
struct lpfc_dmabuf *buf_ptr, *buf_ptr1;
|
||||
|
||||
- /* The I/O iocb is complete. Clear the node and first dmabuf */
|
||||
+ /* The I/O iocb is complete. Clear the node and first dmbuf */
|
||||
elsiocb->ndlp = NULL;
|
||||
|
||||
/* cmd_dmabuf = cmd, cmd_dmabuf->next = rsp, bpl_dmabuf = bpl */
|
||||
@@ -8733,7 +8734,7 @@ lpfc_els_rcv_rls(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
||||
* @cmdiocb: pointer to lpfc command iocb data structure.
|
||||
* @ndlp: pointer to a node-list data structure.
|
||||
*
|
||||
- * This routine processes Read Timeout Value (RTV) IOCB received as an
|
||||
+ * This routine processes Read Timout Value (RTV) IOCB received as an
|
||||
* ELS unsolicited event. It first checks the remote port state. If the
|
||||
* remote port is not in NLP_STE_UNMAPPED_NODE state or NLP_STE_MAPPED_NODE
|
||||
* state, it invokes the lpfc_els_rsl_reject() routine to send the reject
|
||||
@@ -10842,7 +10843,7 @@ lpfc_els_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
||||
lpfc_els_unsol_buffer(phba, pring, vport, elsiocb);
|
||||
/*
|
||||
* The different unsolicited event handlers would tell us
|
||||
- * if they are done with "mp" by setting cmd_dmabuf/bpl_dmabuf to NULL.
|
||||
+ * if they are done with "mp" by setting cmd_dmabuf to NULL.
|
||||
*/
|
||||
if (elsiocb->cmd_dmabuf) {
|
||||
lpfc_in_buf_free(phba, elsiocb->cmd_dmabuf);
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index 8b9fcd9c0d36..08d16552c4b7 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -19857,15 +19857,13 @@ lpfc_sli4_remove_rpis(struct lpfc_hba *phba)
|
||||
}
|
||||
|
||||
/**
|
||||
- * lpfc_sli4_resume_rpi - Resume traffic relative to an RPI
|
||||
+ * lpfc_sli4_resume_rpi - Remove the rpi bitmask region
|
||||
* @ndlp: pointer to lpfc nodelist data structure.
|
||||
* @cmpl: completion call-back.
|
||||
* @iocbq: data to load as mbox ctx_u information
|
||||
*
|
||||
- * Return codes
|
||||
- * 0 - successful
|
||||
- * -ENOMEM - No available memory
|
||||
- * -EIO - The mailbox failed to complete successfully.
|
||||
+ * This routine is invoked to remove the memory region that
|
||||
+ * provided rpi via a bitmask.
|
||||
**/
|
||||
int
|
||||
lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,
|
||||
@@ -19895,6 +19893,7 @@ lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
+ /* Post all rpi memory regions to the port. */
|
||||
lpfc_resume_rpi(mboxq, ndlp);
|
||||
if (cmpl) {
|
||||
mboxq->mbox_cmpl = cmpl;
|
||||
@ -1,44 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Update various NPIV diagnostic log messaging"
|
||||
# reverse of cs10 a4b8d188c3e27a0335f85a2cfb877d3f684df5c9
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index f9a08704b78e..9a20a08f4bd9 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -2367,7 +2367,7 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
mode = KERN_INFO;
|
||||
|
||||
/* Warn PRLI status */
|
||||
- lpfc_vlog_msg(vport, mode, LOG_ELS,
|
||||
+ lpfc_printf_vlog(vport, mode, LOG_ELS,
|
||||
"2754 PRLI DID:%06X Status:x%x/x%x, "
|
||||
"data: x%x x%x x%lx\n",
|
||||
ndlp->nlp_DID, ulp_status,
|
||||
@@ -3597,8 +3597,8 @@ lpfc_issue_els_rscn(struct lpfc_vport *vport, uint8_t retry)
|
||||
}
|
||||
|
||||
lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD,
|
||||
- "Issue RSCN: did:x%x refcnt %d",
|
||||
- ndlp->nlp_DID, kref_read(&ndlp->kref), 0);
|
||||
+ "Issue RSCN: did:x%x",
|
||||
+ ndlp->nlp_DID, 0, 0);
|
||||
|
||||
rc = lpfc_sli_issue_iocb(phba, LPFC_ELS_RING, elsiocb, 0);
|
||||
if (rc == IOCB_ERROR) {
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
|
||||
index e4f627eeb707..fd4317b9484c 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_init.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_init.c
|
||||
@@ -9082,9 +9082,9 @@ lpfc_setup_fdmi_mask(struct lpfc_vport *vport)
|
||||
vport->fdmi_port_mask = LPFC_FDMI2_PORT_ATTR;
|
||||
}
|
||||
|
||||
- lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY,
|
||||
- "6077 Setup FDMI mask: hba x%x port x%x\n",
|
||||
- vport->fdmi_hba_mask, vport->fdmi_port_mask);
|
||||
+ lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY,
|
||||
+ "6077 Setup FDMI mask: hba x%x port x%x\n",
|
||||
+ vport->fdmi_hba_mask, vport->fdmi_port_mask);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1,55 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Copyright updates for 14.4.0.11 patches"
|
||||
# reverse of cs10 80c5e57a6da70af590e98e8e30455e83bd70d3a2
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
|
||||
index a3d1ba92c07c..426a0e8d5731 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
index a1464f8ac331..566dd84e0677 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2022 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2007-2011 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
|
||||
index 3bc0efa7453e..b287d39ad033 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hw.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hw.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
index 99aefc54ac35..1e331b76dff4 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
@ -1,16 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Update lpfc version to 14.4.0.11"
|
||||
# reverse of cs10 a34163398eef02a5c95e52c2be3e2025799273e7
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
|
||||
index 31c3c5abdca6..9ee3a3a4ec4d 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_version.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_version.h
|
||||
@@ -20,7 +20,7 @@
|
||||
* included with this package. *
|
||||
*******************************************************************/
|
||||
|
||||
-#define LPFC_DRIVER_VERSION "14.4.0.11"
|
||||
+#define LPFC_DRIVER_VERSION "14.4.0.10"
|
||||
#define LPFC_DRIVER_NAME "lpfc"
|
||||
|
||||
/* Used for SLI 2/3 */
|
||||
@ -1,89 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Convert debugfs directory counts from atomic to unsigned int"
|
||||
# reverse of cs10 91f7d8fdec311ec1d75aa4cc8d76ffd65da74689
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
|
||||
index 426a0e8d5731..1293d145b94e 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc.h
|
||||
@@ -1333,7 +1333,7 @@ struct lpfc_hba {
|
||||
unsigned long last_ramp_down_time;
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
struct dentry *hba_debugfs_root;
|
||||
- unsigned int debugfs_vport_count;
|
||||
+ atomic_t debugfs_vport_count;
|
||||
|
||||
struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
|
||||
atomic_t nvmeio_trc_cnt;
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
index 92b5b2dbe847..eaedbaff5a78 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
@@ -5752,7 +5752,7 @@ static const struct file_operations lpfc_debugfs_op_slow_ring_trc = {
|
||||
};
|
||||
|
||||
static struct dentry *lpfc_debugfs_root = NULL;
|
||||
-static unsigned int lpfc_debugfs_hba_count;
|
||||
+static atomic_t lpfc_debugfs_hba_count;
|
||||
|
||||
/*
|
||||
* File operations for the iDiag debugfs
|
||||
@@ -6074,7 +6074,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
/* Setup lpfc root directory */
|
||||
if (!lpfc_debugfs_root) {
|
||||
lpfc_debugfs_root = debugfs_create_dir("lpfc", NULL);
|
||||
- lpfc_debugfs_hba_count = 0;
|
||||
+ atomic_set(&lpfc_debugfs_hba_count, 0);
|
||||
if (IS_ERR(lpfc_debugfs_root)) {
|
||||
lpfc_vlog_msg(vport, KERN_WARNING, LOG_INIT,
|
||||
"0527 Cannot create debugfs lpfc\n");
|
||||
@@ -6090,13 +6090,13 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
pport_setup = true;
|
||||
phba->hba_debugfs_root =
|
||||
debugfs_create_dir(name, lpfc_debugfs_root);
|
||||
- phba->debugfs_vport_count = 0;
|
||||
+ atomic_set(&phba->debugfs_vport_count, 0);
|
||||
if (IS_ERR(phba->hba_debugfs_root)) {
|
||||
lpfc_vlog_msg(vport, KERN_WARNING, LOG_INIT,
|
||||
"0528 Cannot create debugfs %s\n", name);
|
||||
return;
|
||||
}
|
||||
- lpfc_debugfs_hba_count++;
|
||||
+ atomic_inc(&lpfc_debugfs_hba_count);
|
||||
|
||||
/* Multi-XRI pools */
|
||||
debugfs_create_file("multixripools", 0644,
|
||||
@@ -6268,7 +6268,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
"0529 Cannot create debugfs %s\n", name);
|
||||
return;
|
||||
}
|
||||
- phba->debugfs_vport_count++;
|
||||
+ atomic_inc(&phba->debugfs_vport_count);
|
||||
}
|
||||
|
||||
if (lpfc_debugfs_max_disc_trc) {
|
||||
@@ -6402,10 +6402,10 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
|
||||
if (vport->vport_debugfs_root) {
|
||||
debugfs_remove(vport->vport_debugfs_root); /* vportX */
|
||||
vport->vport_debugfs_root = NULL;
|
||||
- phba->debugfs_vport_count--;
|
||||
+ atomic_dec(&phba->debugfs_vport_count);
|
||||
}
|
||||
|
||||
- if (!phba->debugfs_vport_count) {
|
||||
+ if (atomic_read(&phba->debugfs_vport_count) == 0) {
|
||||
kfree(phba->slow_ring_trc);
|
||||
phba->slow_ring_trc = NULL;
|
||||
|
||||
@@ -6415,10 +6415,10 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
|
||||
if (phba->hba_debugfs_root) {
|
||||
debugfs_remove(phba->hba_debugfs_root); /* fnX */
|
||||
phba->hba_debugfs_root = NULL;
|
||||
- lpfc_debugfs_hba_count--;
|
||||
+ atomic_dec(&lpfc_debugfs_hba_count);
|
||||
}
|
||||
|
||||
- if (!lpfc_debugfs_hba_count) {
|
||||
+ if (atomic_read(&lpfc_debugfs_hba_count) == 0) {
|
||||
debugfs_remove(lpfc_debugfs_root); /* lpfc */
|
||||
lpfc_debugfs_root = NULL;
|
||||
}
|
||||
@ -1,680 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Clean up extraneous phba dentries"
|
||||
# reverse of cs10 0602f03214fe3d617fa735dfdc7aace47c0d2f54
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
|
||||
index 1293d145b94e..9389e3def94e 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc.h
|
||||
@@ -742,6 +742,12 @@ struct lpfc_vport {
|
||||
struct lpfc_vmid_priority_info vmid_priority;
|
||||
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
+ struct dentry *debug_disc_trc;
|
||||
+ struct dentry *debug_nodelist;
|
||||
+ struct dentry *debug_nvmestat;
|
||||
+ struct dentry *debug_scsistat;
|
||||
+ struct dentry *debug_ioktime;
|
||||
+ struct dentry *debug_hdwqstat;
|
||||
struct dentry *vport_debugfs_root;
|
||||
struct lpfc_debugfs_trc *disc_trc;
|
||||
atomic_t disc_trc_cnt;
|
||||
@@ -1334,8 +1340,29 @@ struct lpfc_hba {
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
struct dentry *hba_debugfs_root;
|
||||
atomic_t debugfs_vport_count;
|
||||
-
|
||||
+ struct dentry *debug_multixri_pools;
|
||||
+ struct dentry *debug_hbqinfo;
|
||||
+ struct dentry *debug_dumpHostSlim;
|
||||
+ struct dentry *debug_dumpHBASlim;
|
||||
+ struct dentry *debug_InjErrLBA; /* LBA to inject errors at */
|
||||
+ struct dentry *debug_InjErrNPortID; /* NPortID to inject errors at */
|
||||
+ struct dentry *debug_InjErrWWPN; /* WWPN to inject errors at */
|
||||
+ struct dentry *debug_writeGuard; /* inject write guard_tag errors */
|
||||
+ struct dentry *debug_writeApp; /* inject write app_tag errors */
|
||||
+ struct dentry *debug_writeRef; /* inject write ref_tag errors */
|
||||
+ struct dentry *debug_readGuard; /* inject read guard_tag errors */
|
||||
+ struct dentry *debug_readApp; /* inject read app_tag errors */
|
||||
+ struct dentry *debug_readRef; /* inject read ref_tag errors */
|
||||
+
|
||||
+ struct dentry *debug_nvmeio_trc;
|
||||
struct lpfc_debugfs_nvmeio_trc *nvmeio_trc;
|
||||
+ struct dentry *debug_hdwqinfo;
|
||||
+#ifdef LPFC_HDWQ_LOCK_STAT
|
||||
+ struct dentry *debug_lockstat;
|
||||
+#endif
|
||||
+ struct dentry *debug_cgn_buffer;
|
||||
+ struct dentry *debug_rx_monitor;
|
||||
+ struct dentry *debug_ras_log;
|
||||
atomic_t nvmeio_trc_cnt;
|
||||
uint32_t nvmeio_trc_size;
|
||||
uint32_t nvmeio_trc_output_idx;
|
||||
@@ -1352,10 +1379,19 @@ struct lpfc_hba {
|
||||
sector_t lpfc_injerr_lba;
|
||||
#define LPFC_INJERR_LBA_OFF (sector_t)(-1)
|
||||
|
||||
+ struct dentry *debug_slow_ring_trc;
|
||||
struct lpfc_debugfs_trc *slow_ring_trc;
|
||||
atomic_t slow_ring_trc_cnt;
|
||||
/* iDiag debugfs sub-directory */
|
||||
struct dentry *idiag_root;
|
||||
+ struct dentry *idiag_pci_cfg;
|
||||
+ struct dentry *idiag_bar_acc;
|
||||
+ struct dentry *idiag_que_info;
|
||||
+ struct dentry *idiag_que_acc;
|
||||
+ struct dentry *idiag_drb_acc;
|
||||
+ struct dentry *idiag_ctl_acc;
|
||||
+ struct dentry *idiag_mbx_acc;
|
||||
+ struct dentry *idiag_ext_acc;
|
||||
uint8_t lpfc_idiag_last_eq;
|
||||
#endif
|
||||
uint16_t nvmeio_trc_on;
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
index eaedbaff5a78..691314c68b59 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
@@ -6075,11 +6075,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
if (!lpfc_debugfs_root) {
|
||||
lpfc_debugfs_root = debugfs_create_dir("lpfc", NULL);
|
||||
atomic_set(&lpfc_debugfs_hba_count, 0);
|
||||
- if (IS_ERR(lpfc_debugfs_root)) {
|
||||
- lpfc_vlog_msg(vport, KERN_WARNING, LOG_INIT,
|
||||
- "0527 Cannot create debugfs lpfc\n");
|
||||
- return;
|
||||
- }
|
||||
}
|
||||
if (!lpfc_debugfs_start_time)
|
||||
lpfc_debugfs_start_time = jiffies;
|
||||
@@ -6090,96 +6085,150 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
pport_setup = true;
|
||||
phba->hba_debugfs_root =
|
||||
debugfs_create_dir(name, lpfc_debugfs_root);
|
||||
- atomic_set(&phba->debugfs_vport_count, 0);
|
||||
- if (IS_ERR(phba->hba_debugfs_root)) {
|
||||
- lpfc_vlog_msg(vport, KERN_WARNING, LOG_INIT,
|
||||
- "0528 Cannot create debugfs %s\n", name);
|
||||
- return;
|
||||
- }
|
||||
atomic_inc(&lpfc_debugfs_hba_count);
|
||||
+ atomic_set(&phba->debugfs_vport_count, 0);
|
||||
|
||||
/* Multi-XRI pools */
|
||||
- debugfs_create_file("multixripools", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- &lpfc_debugfs_op_multixripools);
|
||||
+ snprintf(name, sizeof(name), "multixripools");
|
||||
+ phba->debug_multixri_pools =
|
||||
+ debugfs_create_file(name, S_IFREG | 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba,
|
||||
+ &lpfc_debugfs_op_multixripools);
|
||||
+ if (IS_ERR(phba->debug_multixri_pools)) {
|
||||
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
+ "0527 Cannot create debugfs multixripools\n");
|
||||
+ goto debug_failed;
|
||||
+ }
|
||||
|
||||
/* Congestion Info Buffer */
|
||||
- debugfs_create_file("cgn_buffer", 0644, phba->hba_debugfs_root,
|
||||
- phba, &lpfc_cgn_buffer_op);
|
||||
+ scnprintf(name, sizeof(name), "cgn_buffer");
|
||||
+ phba->debug_cgn_buffer =
|
||||
+ debugfs_create_file(name, S_IFREG | 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_cgn_buffer_op);
|
||||
+ if (IS_ERR(phba->debug_cgn_buffer)) {
|
||||
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
+ "6527 Cannot create debugfs "
|
||||
+ "cgn_buffer\n");
|
||||
+ goto debug_failed;
|
||||
+ }
|
||||
|
||||
/* RX Monitor */
|
||||
- debugfs_create_file("rx_monitor", 0644, phba->hba_debugfs_root,
|
||||
- phba, &lpfc_rx_monitor_op);
|
||||
+ scnprintf(name, sizeof(name), "rx_monitor");
|
||||
+ phba->debug_rx_monitor =
|
||||
+ debugfs_create_file(name, S_IFREG | 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_rx_monitor_op);
|
||||
+ if (IS_ERR(phba->debug_rx_monitor)) {
|
||||
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
+ "6528 Cannot create debugfs "
|
||||
+ "rx_monitor\n");
|
||||
+ goto debug_failed;
|
||||
+ }
|
||||
|
||||
/* RAS log */
|
||||
- debugfs_create_file("ras_log", 0644, phba->hba_debugfs_root,
|
||||
- phba, &lpfc_debugfs_ras_log);
|
||||
+ snprintf(name, sizeof(name), "ras_log");
|
||||
+ phba->debug_ras_log =
|
||||
+ debugfs_create_file(name, 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_debugfs_ras_log);
|
||||
+ if (IS_ERR(phba->debug_ras_log)) {
|
||||
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
+ "6148 Cannot create debugfs"
|
||||
+ " ras_log\n");
|
||||
+ goto debug_failed;
|
||||
+ }
|
||||
|
||||
/* Setup hbqinfo */
|
||||
- debugfs_create_file("hbqinfo", 0644, phba->hba_debugfs_root,
|
||||
- phba, &lpfc_debugfs_op_hbqinfo);
|
||||
+ snprintf(name, sizeof(name), "hbqinfo");
|
||||
+ phba->debug_hbqinfo =
|
||||
+ debugfs_create_file(name, S_IFREG | 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_debugfs_op_hbqinfo);
|
||||
|
||||
#ifdef LPFC_HDWQ_LOCK_STAT
|
||||
/* Setup lockstat */
|
||||
- debugfs_create_file("lockstat", 0644, phba->hba_debugfs_root,
|
||||
- phba, &lpfc_debugfs_op_lockstat);
|
||||
+ snprintf(name, sizeof(name), "lockstat");
|
||||
+ phba->debug_lockstat =
|
||||
+ debugfs_create_file(name, S_IFREG | 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_debugfs_op_lockstat);
|
||||
+ if (IS_ERR(phba->debug_lockstat)) {
|
||||
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
+ "4610 Can't create debugfs lockstat\n");
|
||||
+ goto debug_failed;
|
||||
+ }
|
||||
#endif
|
||||
+
|
||||
+ /* Setup dumpHBASlim */
|
||||
if (phba->sli_rev < LPFC_SLI_REV4) {
|
||||
- /* Setup dumpHBASlim */
|
||||
- debugfs_create_file("dumpHBASlim", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- &lpfc_debugfs_op_dumpHBASlim);
|
||||
- }
|
||||
+ snprintf(name, sizeof(name), "dumpHBASlim");
|
||||
+ phba->debug_dumpHBASlim =
|
||||
+ debugfs_create_file(name,
|
||||
+ S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_debugfs_op_dumpHBASlim);
|
||||
+ } else
|
||||
+ phba->debug_dumpHBASlim = NULL;
|
||||
|
||||
+ /* Setup dumpHostSlim */
|
||||
if (phba->sli_rev < LPFC_SLI_REV4) {
|
||||
- /* Setup dumpHostSlim */
|
||||
- debugfs_create_file("dumpHostSlim", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- &lpfc_debugfs_op_dumpHostSlim);
|
||||
- }
|
||||
+ snprintf(name, sizeof(name), "dumpHostSlim");
|
||||
+ phba->debug_dumpHostSlim =
|
||||
+ debugfs_create_file(name,
|
||||
+ S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_debugfs_op_dumpHostSlim);
|
||||
+ } else
|
||||
+ phba->debug_dumpHostSlim = NULL;
|
||||
|
||||
/* Setup DIF Error Injections */
|
||||
- debugfs_create_file_aux_num("InjErrLBA", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- InjErrLBA,
|
||||
- &lpfc_debugfs_op_dif_err);
|
||||
+ phba->debug_InjErrLBA =
|
||||
+ debugfs_create_file_aux_num("InjErrLBA", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, InjErrLBA, &lpfc_debugfs_op_dif_err);
|
||||
phba->lpfc_injerr_lba = LPFC_INJERR_LBA_OFF;
|
||||
|
||||
- debugfs_create_file_aux_num("InjErrNPortID", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- InjErrNPortID,
|
||||
- &lpfc_debugfs_op_dif_err);
|
||||
-
|
||||
- debugfs_create_file_aux_num("InjErrWWPN", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- InjErrWWPN,
|
||||
- &lpfc_debugfs_op_dif_err);
|
||||
-
|
||||
- debugfs_create_file_aux_num("writeGuardInjErr", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- writeGuard,
|
||||
- &lpfc_debugfs_op_dif_err);
|
||||
-
|
||||
- debugfs_create_file_aux_num("writeAppInjErr", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- writeApp, &lpfc_debugfs_op_dif_err);
|
||||
-
|
||||
- debugfs_create_file_aux_num("writeRefInjErr", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- writeRef, &lpfc_debugfs_op_dif_err);
|
||||
-
|
||||
- debugfs_create_file_aux_num("readGuardInjErr", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- readGuard,
|
||||
- &lpfc_debugfs_op_dif_err);
|
||||
-
|
||||
- debugfs_create_file_aux_num("readAppInjErr", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- readApp, &lpfc_debugfs_op_dif_err);
|
||||
-
|
||||
- debugfs_create_file_aux_num("readRefInjErr", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- readRef, &lpfc_debugfs_op_dif_err);
|
||||
+ phba->debug_InjErrNPortID =
|
||||
+ debugfs_create_file_aux_num("InjErrNPortID", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, InjErrNPortID, &lpfc_debugfs_op_dif_err);
|
||||
+
|
||||
+ phba->debug_InjErrWWPN =
|
||||
+ debugfs_create_file_aux_num("InjErrWWPN", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, InjErrWWPN, &lpfc_debugfs_op_dif_err);
|
||||
+
|
||||
+ phba->debug_writeGuard =
|
||||
+ debugfs_create_file_aux_num("writeGuardInjErr", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, writeGuard, &lpfc_debugfs_op_dif_err);
|
||||
+
|
||||
+ phba->debug_writeApp =
|
||||
+ debugfs_create_file_aux_num("writeAppInjErr", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, writeApp, &lpfc_debugfs_op_dif_err);
|
||||
+
|
||||
+ phba->debug_writeRef =
|
||||
+ debugfs_create_file_aux_num("writeRefInjErr", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, writeRef, &lpfc_debugfs_op_dif_err);
|
||||
+
|
||||
+ phba->debug_readGuard =
|
||||
+ debugfs_create_file_aux_num("readGuardInjErr", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, readGuard, &lpfc_debugfs_op_dif_err);
|
||||
+
|
||||
+ phba->debug_readApp =
|
||||
+ debugfs_create_file_aux_num("readAppInjErr", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, readApp, &lpfc_debugfs_op_dif_err);
|
||||
+
|
||||
+ phba->debug_readRef =
|
||||
+ debugfs_create_file_aux_num("readRefInjErr", 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, readRef, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
/* Setup slow ring trace */
|
||||
if (lpfc_debugfs_max_slow_ring_trc) {
|
||||
@@ -6199,9 +6248,11 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
}
|
||||
}
|
||||
|
||||
- debugfs_create_file("slow_ring_trace", 0644,
|
||||
- phba->hba_debugfs_root, phba,
|
||||
- &lpfc_debugfs_op_slow_ring_trc);
|
||||
+ snprintf(name, sizeof(name), "slow_ring_trace");
|
||||
+ phba->debug_slow_ring_trc =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_debugfs_op_slow_ring_trc);
|
||||
if (!phba->slow_ring_trc) {
|
||||
phba->slow_ring_trc = kcalloc(
|
||||
lpfc_debugfs_max_slow_ring_trc,
|
||||
@@ -6211,13 +6262,16 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
"0416 Cannot create debugfs "
|
||||
"slow_ring buffer\n");
|
||||
- goto out;
|
||||
+ goto debug_failed;
|
||||
}
|
||||
atomic_set(&phba->slow_ring_trc_cnt, 0);
|
||||
}
|
||||
|
||||
- debugfs_create_file("nvmeio_trc", 0644, phba->hba_debugfs_root,
|
||||
- phba, &lpfc_debugfs_op_nvmeio_trc);
|
||||
+ snprintf(name, sizeof(name), "nvmeio_trc");
|
||||
+ phba->debug_nvmeio_trc =
|
||||
+ debugfs_create_file(name, 0644,
|
||||
+ phba->hba_debugfs_root,
|
||||
+ phba, &lpfc_debugfs_op_nvmeio_trc);
|
||||
|
||||
atomic_set(&phba->nvmeio_trc_cnt, 0);
|
||||
if (lpfc_debugfs_max_nvmeio_trc) {
|
||||
@@ -6263,11 +6317,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
if (!vport->vport_debugfs_root) {
|
||||
vport->vport_debugfs_root =
|
||||
debugfs_create_dir(name, phba->hba_debugfs_root);
|
||||
- if (IS_ERR(vport->vport_debugfs_root)) {
|
||||
- lpfc_vlog_msg(vport, KERN_WARNING, LOG_INIT,
|
||||
- "0529 Cannot create debugfs %s\n", name);
|
||||
- return;
|
||||
- }
|
||||
atomic_inc(&phba->debugfs_vport_count);
|
||||
}
|
||||
|
||||
@@ -6295,27 +6344,54 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
"0418 Cannot create debugfs disc trace "
|
||||
"buffer\n");
|
||||
- goto out;
|
||||
+ goto debug_failed;
|
||||
}
|
||||
atomic_set(&vport->disc_trc_cnt, 0);
|
||||
|
||||
- debugfs_create_file("discovery_trace", 0644, vport->vport_debugfs_root,
|
||||
- vport, &lpfc_debugfs_op_disc_trc);
|
||||
-
|
||||
- debugfs_create_file("nodelist", 0644, vport->vport_debugfs_root, vport,
|
||||
- &lpfc_debugfs_op_nodelist);
|
||||
-
|
||||
- debugfs_create_file("nvmestat", 0644, vport->vport_debugfs_root, vport,
|
||||
- &lpfc_debugfs_op_nvmestat);
|
||||
-
|
||||
- debugfs_create_file("scsistat", 0644, vport->vport_debugfs_root, vport,
|
||||
- &lpfc_debugfs_op_scsistat);
|
||||
+ snprintf(name, sizeof(name), "discovery_trace");
|
||||
+ vport->debug_disc_trc =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ vport->vport_debugfs_root,
|
||||
+ vport, &lpfc_debugfs_op_disc_trc);
|
||||
+ snprintf(name, sizeof(name), "nodelist");
|
||||
+ vport->debug_nodelist =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ vport->vport_debugfs_root,
|
||||
+ vport, &lpfc_debugfs_op_nodelist);
|
||||
+
|
||||
+ snprintf(name, sizeof(name), "nvmestat");
|
||||
+ vport->debug_nvmestat =
|
||||
+ debugfs_create_file(name, 0644,
|
||||
+ vport->vport_debugfs_root,
|
||||
+ vport, &lpfc_debugfs_op_nvmestat);
|
||||
+
|
||||
+ snprintf(name, sizeof(name), "scsistat");
|
||||
+ vport->debug_scsistat =
|
||||
+ debugfs_create_file(name, 0644,
|
||||
+ vport->vport_debugfs_root,
|
||||
+ vport, &lpfc_debugfs_op_scsistat);
|
||||
+ if (IS_ERR(vport->debug_scsistat)) {
|
||||
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
+ "4611 Cannot create debugfs scsistat\n");
|
||||
+ goto debug_failed;
|
||||
+ }
|
||||
|
||||
- debugfs_create_file("ioktime", 0644, vport->vport_debugfs_root, vport,
|
||||
- &lpfc_debugfs_op_ioktime);
|
||||
+ snprintf(name, sizeof(name), "ioktime");
|
||||
+ vport->debug_ioktime =
|
||||
+ debugfs_create_file(name, 0644,
|
||||
+ vport->vport_debugfs_root,
|
||||
+ vport, &lpfc_debugfs_op_ioktime);
|
||||
+ if (IS_ERR(vport->debug_ioktime)) {
|
||||
+ lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
+ "0815 Cannot create debugfs ioktime\n");
|
||||
+ goto debug_failed;
|
||||
+ }
|
||||
|
||||
- debugfs_create_file("hdwqstat", 0644, vport->vport_debugfs_root, vport,
|
||||
- &lpfc_debugfs_op_hdwqstat);
|
||||
+ snprintf(name, sizeof(name), "hdwqstat");
|
||||
+ vport->debug_hdwqstat =
|
||||
+ debugfs_create_file(name, 0644,
|
||||
+ vport->vport_debugfs_root,
|
||||
+ vport, &lpfc_debugfs_op_hdwqstat);
|
||||
|
||||
/*
|
||||
* The following section is for additional directories/files for the
|
||||
@@ -6323,58 +6399,93 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
*/
|
||||
|
||||
if (!pport_setup)
|
||||
- return;
|
||||
+ goto debug_failed;
|
||||
|
||||
/*
|
||||
* iDiag debugfs root entry points for SLI4 device only
|
||||
*/
|
||||
if (phba->sli_rev < LPFC_SLI_REV4)
|
||||
- return;
|
||||
+ goto debug_failed;
|
||||
|
||||
+ snprintf(name, sizeof(name), "iDiag");
|
||||
if (!phba->idiag_root) {
|
||||
phba->idiag_root =
|
||||
- debugfs_create_dir("iDiag", phba->hba_debugfs_root);
|
||||
+ debugfs_create_dir(name, phba->hba_debugfs_root);
|
||||
/* Initialize iDiag data structure */
|
||||
memset(&idiag, 0, sizeof(idiag));
|
||||
}
|
||||
|
||||
/* iDiag read PCI config space */
|
||||
- debugfs_create_file("pciCfg", 0644, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_pciCfg);
|
||||
- idiag.offset.last_rd = 0;
|
||||
+ snprintf(name, sizeof(name), "pciCfg");
|
||||
+ if (!phba->idiag_pci_cfg) {
|
||||
+ phba->idiag_pci_cfg =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->idiag_root, phba, &lpfc_idiag_op_pciCfg);
|
||||
+ idiag.offset.last_rd = 0;
|
||||
+ }
|
||||
|
||||
/* iDiag PCI BAR access */
|
||||
- debugfs_create_file("barAcc", 0644, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_barAcc);
|
||||
- idiag.offset.last_rd = 0;
|
||||
+ snprintf(name, sizeof(name), "barAcc");
|
||||
+ if (!phba->idiag_bar_acc) {
|
||||
+ phba->idiag_bar_acc =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->idiag_root, phba, &lpfc_idiag_op_barAcc);
|
||||
+ idiag.offset.last_rd = 0;
|
||||
+ }
|
||||
|
||||
/* iDiag get PCI function queue information */
|
||||
- debugfs_create_file("queInfo", 0444, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_queInfo);
|
||||
+ snprintf(name, sizeof(name), "queInfo");
|
||||
+ if (!phba->idiag_que_info) {
|
||||
+ phba->idiag_que_info =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO,
|
||||
+ phba->idiag_root, phba, &lpfc_idiag_op_queInfo);
|
||||
+ }
|
||||
|
||||
/* iDiag access PCI function queue */
|
||||
- debugfs_create_file("queAcc", 0644, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_queAcc);
|
||||
+ snprintf(name, sizeof(name), "queAcc");
|
||||
+ if (!phba->idiag_que_acc) {
|
||||
+ phba->idiag_que_acc =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->idiag_root, phba, &lpfc_idiag_op_queAcc);
|
||||
+ }
|
||||
|
||||
/* iDiag access PCI function doorbell registers */
|
||||
- debugfs_create_file("drbAcc", 0644, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_drbAcc);
|
||||
+ snprintf(name, sizeof(name), "drbAcc");
|
||||
+ if (!phba->idiag_drb_acc) {
|
||||
+ phba->idiag_drb_acc =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->idiag_root, phba, &lpfc_idiag_op_drbAcc);
|
||||
+ }
|
||||
|
||||
/* iDiag access PCI function control registers */
|
||||
- debugfs_create_file("ctlAcc", 0644, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_ctlAcc);
|
||||
+ snprintf(name, sizeof(name), "ctlAcc");
|
||||
+ if (!phba->idiag_ctl_acc) {
|
||||
+ phba->idiag_ctl_acc =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->idiag_root, phba, &lpfc_idiag_op_ctlAcc);
|
||||
+ }
|
||||
|
||||
/* iDiag access mbox commands */
|
||||
- debugfs_create_file("mbxAcc", 0644, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_mbxAcc);
|
||||
+ snprintf(name, sizeof(name), "mbxAcc");
|
||||
+ if (!phba->idiag_mbx_acc) {
|
||||
+ phba->idiag_mbx_acc =
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->idiag_root, phba, &lpfc_idiag_op_mbxAcc);
|
||||
+ }
|
||||
|
||||
/* iDiag extents access commands */
|
||||
if (phba->sli4_hba.extents_in_use) {
|
||||
- debugfs_create_file("extAcc", 0644, phba->idiag_root, phba,
|
||||
- &lpfc_idiag_op_extAcc);
|
||||
+ snprintf(name, sizeof(name), "extAcc");
|
||||
+ if (!phba->idiag_ext_acc) {
|
||||
+ phba->idiag_ext_acc =
|
||||
+ debugfs_create_file(name,
|
||||
+ S_IFREG|S_IRUGO|S_IWUSR,
|
||||
+ phba->idiag_root, phba,
|
||||
+ &lpfc_idiag_op_extAcc);
|
||||
+ }
|
||||
}
|
||||
-out:
|
||||
- /* alloc'ed items are kfree'd in lpfc_debugfs_terminate */
|
||||
+
|
||||
+debug_failed:
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
@@ -6399,6 +6510,24 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
|
||||
kfree(vport->disc_trc);
|
||||
vport->disc_trc = NULL;
|
||||
|
||||
+ debugfs_remove(vport->debug_disc_trc); /* discovery_trace */
|
||||
+ vport->debug_disc_trc = NULL;
|
||||
+
|
||||
+ debugfs_remove(vport->debug_nodelist); /* nodelist */
|
||||
+ vport->debug_nodelist = NULL;
|
||||
+
|
||||
+ debugfs_remove(vport->debug_nvmestat); /* nvmestat */
|
||||
+ vport->debug_nvmestat = NULL;
|
||||
+
|
||||
+ debugfs_remove(vport->debug_scsistat); /* scsistat */
|
||||
+ vport->debug_scsistat = NULL;
|
||||
+
|
||||
+ debugfs_remove(vport->debug_ioktime); /* ioktime */
|
||||
+ vport->debug_ioktime = NULL;
|
||||
+
|
||||
+ debugfs_remove(vport->debug_hdwqstat); /* hdwqstat */
|
||||
+ vport->debug_hdwqstat = NULL;
|
||||
+
|
||||
if (vport->vport_debugfs_root) {
|
||||
debugfs_remove(vport->vport_debugfs_root); /* vportX */
|
||||
vport->vport_debugfs_root = NULL;
|
||||
@@ -6406,12 +6535,113 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
|
||||
}
|
||||
|
||||
if (atomic_read(&phba->debugfs_vport_count) == 0) {
|
||||
+
|
||||
+ debugfs_remove(phba->debug_multixri_pools); /* multixripools*/
|
||||
+ phba->debug_multixri_pools = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_hbqinfo); /* hbqinfo */
|
||||
+ phba->debug_hbqinfo = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_cgn_buffer);
|
||||
+ phba->debug_cgn_buffer = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_rx_monitor);
|
||||
+ phba->debug_rx_monitor = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_ras_log);
|
||||
+ phba->debug_ras_log = NULL;
|
||||
+
|
||||
+#ifdef LPFC_HDWQ_LOCK_STAT
|
||||
+ debugfs_remove(phba->debug_lockstat); /* lockstat */
|
||||
+ phba->debug_lockstat = NULL;
|
||||
+#endif
|
||||
+ debugfs_remove(phba->debug_dumpHBASlim); /* HBASlim */
|
||||
+ phba->debug_dumpHBASlim = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_dumpHostSlim); /* HostSlim */
|
||||
+ phba->debug_dumpHostSlim = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_InjErrLBA); /* InjErrLBA */
|
||||
+ phba->debug_InjErrLBA = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_InjErrNPortID);
|
||||
+ phba->debug_InjErrNPortID = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_InjErrWWPN); /* InjErrWWPN */
|
||||
+ phba->debug_InjErrWWPN = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_writeGuard); /* writeGuard */
|
||||
+ phba->debug_writeGuard = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_writeApp); /* writeApp */
|
||||
+ phba->debug_writeApp = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_writeRef); /* writeRef */
|
||||
+ phba->debug_writeRef = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_readGuard); /* readGuard */
|
||||
+ phba->debug_readGuard = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_readApp); /* readApp */
|
||||
+ phba->debug_readApp = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_readRef); /* readRef */
|
||||
+ phba->debug_readRef = NULL;
|
||||
+
|
||||
kfree(phba->slow_ring_trc);
|
||||
phba->slow_ring_trc = NULL;
|
||||
|
||||
+ /* slow_ring_trace */
|
||||
+ debugfs_remove(phba->debug_slow_ring_trc);
|
||||
+ phba->debug_slow_ring_trc = NULL;
|
||||
+
|
||||
+ debugfs_remove(phba->debug_nvmeio_trc);
|
||||
+ phba->debug_nvmeio_trc = NULL;
|
||||
+
|
||||
kfree(phba->nvmeio_trc);
|
||||
phba->nvmeio_trc = NULL;
|
||||
|
||||
+ /*
|
||||
+ * iDiag release
|
||||
+ */
|
||||
+ if (phba->sli_rev == LPFC_SLI_REV4) {
|
||||
+ /* iDiag extAcc */
|
||||
+ debugfs_remove(phba->idiag_ext_acc);
|
||||
+ phba->idiag_ext_acc = NULL;
|
||||
+
|
||||
+ /* iDiag mbxAcc */
|
||||
+ debugfs_remove(phba->idiag_mbx_acc);
|
||||
+ phba->idiag_mbx_acc = NULL;
|
||||
+
|
||||
+ /* iDiag ctlAcc */
|
||||
+ debugfs_remove(phba->idiag_ctl_acc);
|
||||
+ phba->idiag_ctl_acc = NULL;
|
||||
+
|
||||
+ /* iDiag drbAcc */
|
||||
+ debugfs_remove(phba->idiag_drb_acc);
|
||||
+ phba->idiag_drb_acc = NULL;
|
||||
+
|
||||
+ /* iDiag queAcc */
|
||||
+ debugfs_remove(phba->idiag_que_acc);
|
||||
+ phba->idiag_que_acc = NULL;
|
||||
+
|
||||
+ /* iDiag queInfo */
|
||||
+ debugfs_remove(phba->idiag_que_info);
|
||||
+ phba->idiag_que_info = NULL;
|
||||
+
|
||||
+ /* iDiag barAcc */
|
||||
+ debugfs_remove(phba->idiag_bar_acc);
|
||||
+ phba->idiag_bar_acc = NULL;
|
||||
+
|
||||
+ /* iDiag pciCfg */
|
||||
+ debugfs_remove(phba->idiag_pci_cfg);
|
||||
+ phba->idiag_pci_cfg = NULL;
|
||||
+
|
||||
+ /* Finally remove the iDiag debugfs root */
|
||||
+ debugfs_remove(phba->idiag_root);
|
||||
+ phba->idiag_root = NULL;
|
||||
+ }
|
||||
+
|
||||
if (phba->hba_debugfs_root) {
|
||||
debugfs_remove(phba->hba_debugfs_root); /* fnX */
|
||||
phba->hba_debugfs_root = NULL;
|
||||
@ -1,195 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Use switch case statements in DIF debugfs handlers"
|
||||
# reverse of cs10 d19023a336a31f49111b96a266610a4d923f9cad
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
index 691314c68b59..7c4d7bb3a56f 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
@@ -2373,117 +2373,93 @@ lpfc_debugfs_dumpHostSlim_open(struct inode *inode, struct file *file)
|
||||
|
||||
static ssize_t
|
||||
lpfc_debugfs_dif_err_read(struct file *file, char __user *buf,
|
||||
- size_t nbytes, loff_t *ppos)
|
||||
+ size_t nbytes, loff_t *ppos)
|
||||
{
|
||||
struct lpfc_hba *phba = file->private_data;
|
||||
int kind = debugfs_get_aux_num(file);
|
||||
- char cbuf[32] = {0};
|
||||
+ char cbuf[32];
|
||||
+ uint64_t tmp = 0;
|
||||
int cnt = 0;
|
||||
|
||||
- switch (kind) {
|
||||
- case writeGuard:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "%u\n",
|
||||
- phba->lpfc_injerr_wgrd_cnt);
|
||||
- break;
|
||||
- case writeApp:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "%u\n",
|
||||
- phba->lpfc_injerr_wapp_cnt);
|
||||
- break;
|
||||
- case writeRef:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "%u\n",
|
||||
- phba->lpfc_injerr_wref_cnt);
|
||||
- break;
|
||||
- case readGuard:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "%u\n",
|
||||
- phba->lpfc_injerr_rgrd_cnt);
|
||||
- break;
|
||||
- case readApp:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "%u\n",
|
||||
- phba->lpfc_injerr_rapp_cnt);
|
||||
- break;
|
||||
- case readRef:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "%u\n",
|
||||
- phba->lpfc_injerr_rref_cnt);
|
||||
- break;
|
||||
- case InjErrNPortID:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "0x%06x\n",
|
||||
+ if (kind == writeGuard)
|
||||
+ cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wgrd_cnt);
|
||||
+ else if (kind == writeApp)
|
||||
+ cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wapp_cnt);
|
||||
+ else if (kind == writeRef)
|
||||
+ cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wref_cnt);
|
||||
+ else if (kind == readGuard)
|
||||
+ cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rgrd_cnt);
|
||||
+ else if (kind == readApp)
|
||||
+ cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rapp_cnt);
|
||||
+ else if (kind == readRef)
|
||||
+ cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rref_cnt);
|
||||
+ else if (kind == InjErrNPortID)
|
||||
+ cnt = scnprintf(cbuf, 32, "0x%06x\n",
|
||||
phba->lpfc_injerr_nportid);
|
||||
- break;
|
||||
- case InjErrWWPN:
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "0x%016llx\n",
|
||||
- be64_to_cpu(phba->lpfc_injerr_wwpn.u.wwn_be));
|
||||
- break;
|
||||
- case InjErrLBA:
|
||||
- if (phba->lpfc_injerr_lba == LPFC_INJERR_LBA_OFF)
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "off\n");
|
||||
+ else if (kind == InjErrWWPN) {
|
||||
+ memcpy(&tmp, &phba->lpfc_injerr_wwpn, sizeof(struct lpfc_name));
|
||||
+ tmp = cpu_to_be64(tmp);
|
||||
+ cnt = scnprintf(cbuf, 32, "0x%016llx\n", tmp);
|
||||
+ } else if (kind == InjErrLBA) {
|
||||
+ if (phba->lpfc_injerr_lba == (sector_t)(-1))
|
||||
+ cnt = scnprintf(cbuf, 32, "off\n");
|
||||
else
|
||||
- cnt = scnprintf(cbuf, sizeof(cbuf), "0x%llx\n",
|
||||
- (uint64_t)phba->lpfc_injerr_lba);
|
||||
- break;
|
||||
- default:
|
||||
- lpfc_log_msg(phba, KERN_WARNING, LOG_INIT,
|
||||
- "0547 Unknown debugfs error injection entry\n");
|
||||
- break;
|
||||
- }
|
||||
+ cnt = scnprintf(cbuf, 32, "0x%llx\n",
|
||||
+ (uint64_t) phba->lpfc_injerr_lba);
|
||||
+ } else
|
||||
+ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
|
||||
+ "0547 Unknown debugfs error injection entry\n");
|
||||
|
||||
return simple_read_from_buffer(buf, nbytes, ppos, &cbuf, cnt);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
lpfc_debugfs_dif_err_write(struct file *file, const char __user *buf,
|
||||
- size_t nbytes, loff_t *ppos)
|
||||
+ size_t nbytes, loff_t *ppos)
|
||||
{
|
||||
struct lpfc_hba *phba = file->private_data;
|
||||
int kind = debugfs_get_aux_num(file);
|
||||
- char dstbuf[33] = {0};
|
||||
- unsigned long long tmp;
|
||||
- unsigned long size;
|
||||
+ char dstbuf[33];
|
||||
+ uint64_t tmp = 0;
|
||||
+ int size;
|
||||
|
||||
- size = (nbytes < (sizeof(dstbuf) - 1)) ? nbytes : (sizeof(dstbuf) - 1);
|
||||
+ memset(dstbuf, 0, 33);
|
||||
+ size = (nbytes < 32) ? nbytes : 32;
|
||||
if (copy_from_user(dstbuf, buf, size))
|
||||
return -EFAULT;
|
||||
|
||||
- if (kstrtoull(dstbuf, 0, &tmp)) {
|
||||
- if (kind != InjErrLBA || !strstr(dstbuf, "off"))
|
||||
- return -EINVAL;
|
||||
+ if (kind == InjErrLBA) {
|
||||
+ if ((dstbuf[0] == 'o') && (dstbuf[1] == 'f') &&
|
||||
+ (dstbuf[2] == 'f'))
|
||||
+ tmp = (uint64_t)(-1);
|
||||
}
|
||||
|
||||
- switch (kind) {
|
||||
- case writeGuard:
|
||||
+ if ((tmp == 0) && (kstrtoull(dstbuf, 0, &tmp)))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (kind == writeGuard)
|
||||
phba->lpfc_injerr_wgrd_cnt = (uint32_t)tmp;
|
||||
- break;
|
||||
- case writeApp:
|
||||
+ else if (kind == writeApp)
|
||||
phba->lpfc_injerr_wapp_cnt = (uint32_t)tmp;
|
||||
- break;
|
||||
- case writeRef:
|
||||
+ else if (kind == writeRef)
|
||||
phba->lpfc_injerr_wref_cnt = (uint32_t)tmp;
|
||||
- break;
|
||||
- case readGuard:
|
||||
+ else if (kind == readGuard)
|
||||
phba->lpfc_injerr_rgrd_cnt = (uint32_t)tmp;
|
||||
- break;
|
||||
- case readApp:
|
||||
+ else if (kind == readApp)
|
||||
phba->lpfc_injerr_rapp_cnt = (uint32_t)tmp;
|
||||
- break;
|
||||
- case readRef:
|
||||
+ else if (kind == readRef)
|
||||
phba->lpfc_injerr_rref_cnt = (uint32_t)tmp;
|
||||
- break;
|
||||
- case InjErrLBA:
|
||||
- if (strstr(dstbuf, "off"))
|
||||
- phba->lpfc_injerr_lba = LPFC_INJERR_LBA_OFF;
|
||||
- else
|
||||
- phba->lpfc_injerr_lba = (sector_t)tmp;
|
||||
- break;
|
||||
- case InjErrNPortID:
|
||||
+ else if (kind == InjErrLBA)
|
||||
+ phba->lpfc_injerr_lba = (sector_t)tmp;
|
||||
+ else if (kind == InjErrNPortID)
|
||||
phba->lpfc_injerr_nportid = (uint32_t)(tmp & Mask_DID);
|
||||
- break;
|
||||
- case InjErrWWPN:
|
||||
- phba->lpfc_injerr_wwpn.u.wwn_be = cpu_to_be64(tmp);
|
||||
- break;
|
||||
- default:
|
||||
- lpfc_log_msg(phba, KERN_WARNING, LOG_INIT,
|
||||
- "0548 Unknown debugfs error injection entry\n");
|
||||
- break;
|
||||
- }
|
||||
+ else if (kind == InjErrWWPN) {
|
||||
+ tmp = cpu_to_be64(tmp);
|
||||
+ memcpy(&phba->lpfc_injerr_wwpn, &tmp, sizeof(struct lpfc_name));
|
||||
+ } else
|
||||
+ lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
|
||||
+ "0548 Unknown debugfs error injection entry\n");
|
||||
+
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h
|
||||
index b287d39ad033..32298285ea5e 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hw.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hw.h
|
||||
@@ -366,7 +366,6 @@ struct lpfc_name {
|
||||
} s;
|
||||
uint8_t wwn[8];
|
||||
uint64_t name __packed __aligned(4);
|
||||
- __be64 wwn_be __packed __aligned(4);
|
||||
} u;
|
||||
};
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Fix memory leak when nvmeio_trc debugfs entry is used"
|
||||
# reverse of cs10 1b923bbb0077b6f1679b13b26a46342034b0c794
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
index 7c4d7bb3a56f..2db8d9529b8f 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
@@ -6280,6 +6280,7 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
}
|
||||
phba->nvmeio_trc_on = 1;
|
||||
phba->nvmeio_trc_output_idx = 0;
|
||||
+ phba->nvmeio_trc = NULL;
|
||||
} else {
|
||||
nvmeio_off:
|
||||
phba->nvmeio_trc_size = 0;
|
||||
@ -1,17 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Define size of debugfs entry for xri rebalancing"
|
||||
# reverse of cs10 60dc76d9e94b45301a874cede2364bf4d7a4c16e
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
index 566dd84e0677..f319f3af0400 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
@@ -44,9 +44,6 @@
|
||||
/* hbqinfo output buffer size */
|
||||
#define LPFC_HBQINFO_SIZE 8192
|
||||
|
||||
-/* hdwqinfo output buffer size */
|
||||
-#define LPFC_HDWQINFO_SIZE 8192
|
||||
-
|
||||
/* nvmestat output buffer size */
|
||||
#define LPFC_NVMESTAT_SIZE 8192
|
||||
#define LPFC_IOKTIME_SIZE 8192
|
||||
@ -1,75 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Ensure PLOGI_ACC is sent prior to PRLI in Point to Point topology"
|
||||
# reverse of cs10 6dcd096ed524a8b9dcc82b80bfcebca892be8ea2
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 9a20a08f4bd9..941027b329a2 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -5338,12 +5338,12 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
ulp_status, ulp_word4, did);
|
||||
/* ELS response tag <ulpIoTag> completes */
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
- "0110 ELS response tag x%x completes fc_flag x%lx"
|
||||
+ "0110 ELS response tag x%x completes "
|
||||
"Data: x%x x%x x%x x%x x%lx x%x x%x x%x %p %p\n",
|
||||
- iotag, vport->fc_flag, ulp_status, ulp_word4, tmo,
|
||||
+ iotag, ulp_status, ulp_word4, tmo,
|
||||
ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state,
|
||||
ndlp->nlp_rpi, kref_read(&ndlp->kref), mbox, ndlp);
|
||||
- if (mbox && !test_bit(FC_PT2PT, &vport->fc_flag)) {
|
||||
+ if (mbox) {
|
||||
if (ulp_status == 0 &&
|
||||
test_bit(NLP_ACC_REGLOGIN, &ndlp->nlp_flag)) {
|
||||
if (!lpfc_unreg_rpi(vport, ndlp) &&
|
||||
@@ -5402,10 +5402,6 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
}
|
||||
out_free_mbox:
|
||||
lpfc_mbox_rsrc_cleanup(phba, mbox, MBOX_THD_UNLOCKED);
|
||||
- } else if (mbox && test_bit(FC_PT2PT, &vport->fc_flag) &&
|
||||
- test_bit(NLP_ACC_REGLOGIN, &ndlp->nlp_flag)) {
|
||||
- lpfc_mbx_cmpl_reg_login(phba, mbox);
|
||||
- clear_bit(NLP_ACC_REGLOGIN, &ndlp->nlp_flag);
|
||||
}
|
||||
out:
|
||||
if (ndlp && shost) {
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
index 1e331b76dff4..5aa21c683ac6 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
|
||||
@@ -326,14 +326,8 @@ lpfc_defer_plogi_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *login_mbox)
|
||||
/* Now that REG_RPI completed successfully,
|
||||
* we can now proceed with sending the PLOGI ACC.
|
||||
*/
|
||||
- if (test_bit(FC_PT2PT, &ndlp->vport->fc_flag)) {
|
||||
- rc = lpfc_els_rsp_acc(login_mbox->vport, ELS_CMD_PLOGI,
|
||||
- save_iocb, ndlp, login_mbox);
|
||||
- } else {
|
||||
- rc = lpfc_els_rsp_acc(login_mbox->vport, ELS_CMD_PLOGI,
|
||||
- save_iocb, ndlp, NULL);
|
||||
- }
|
||||
-
|
||||
+ rc = lpfc_els_rsp_acc(login_mbox->vport, ELS_CMD_PLOGI,
|
||||
+ save_iocb, ndlp, NULL);
|
||||
if (rc) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"4576 PLOGI ACC fails pt2pt discovery: "
|
||||
@@ -341,16 +335,9 @@ lpfc_defer_plogi_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *login_mbox)
|
||||
}
|
||||
}
|
||||
|
||||
- /* If this is a fabric topology, complete the reg_rpi and prli now.
|
||||
- * For Pt2Pt, the reg_rpi and PRLI are deferred until after the LS_ACC
|
||||
- * completes. This ensures, in Pt2Pt, that the PLOGI LS_ACC is sent
|
||||
- * before the PRLI.
|
||||
- */
|
||||
- if (!test_bit(FC_PT2PT, &ndlp->vport->fc_flag)) {
|
||||
- /* Now process the REG_RPI cmpl */
|
||||
- lpfc_mbx_cmpl_reg_login(phba, login_mbox);
|
||||
- clear_bit(NLP_ACC_REGLOGIN, &ndlp->nlp_flag);
|
||||
- }
|
||||
+ /* Now process the REG_RPI cmpl */
|
||||
+ lpfc_mbx_cmpl_reg_login(phba, login_mbox);
|
||||
+ clear_bit(NLP_ACC_REGLOGIN, &ndlp->nlp_flag);
|
||||
kfree(save_iocb);
|
||||
}
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Check return status of lpfc_reset_flush_io_context during TGT_RESET"
|
||||
# reverse of cs10 df9467ebb13f73db4517d73b5445c0ea4233ab36
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
index be709f12c6a1..a9c8c6c021b9 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
@@ -5936,7 +5936,7 @@ lpfc_chk_tgt_mapped(struct lpfc_vport *vport, struct fc_rport *rport)
|
||||
/**
|
||||
* lpfc_reset_flush_io_context -
|
||||
* @vport: The virtual port (scsi_host) for the flush context
|
||||
- * @tgt_id: If aborting by Target context - specifies the target id
|
||||
+ * @tgt_id: If aborting by Target contect - specifies the target id
|
||||
* @lun_id: If aborting by Lun context - specifies the lun id
|
||||
* @context: specifies the context level to flush at.
|
||||
*
|
||||
@@ -6110,14 +6110,8 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)
|
||||
pnode->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
|
||||
spin_unlock_irqrestore(&pnode->lock, flags);
|
||||
}
|
||||
- status = lpfc_reset_flush_io_context(vport, tgt_id, lun_id,
|
||||
- LPFC_CTX_TGT);
|
||||
- if (status != SUCCESS) {
|
||||
- lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
|
||||
- "0726 Target Reset flush status x%x\n",
|
||||
- status);
|
||||
- return status;
|
||||
- }
|
||||
+ lpfc_reset_flush_io_context(vport, tgt_id, lun_id,
|
||||
+ LPFC_CTX_TGT);
|
||||
return FAST_IO_FAIL;
|
||||
}
|
||||
|
||||
@@ -6210,7 +6204,7 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd)
|
||||
int rc, ret = SUCCESS;
|
||||
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
|
||||
- "3172 SCSI layer issued Host Reset\n");
|
||||
+ "3172 SCSI layer issued Host Reset Data:\n");
|
||||
|
||||
lpfc_offline_prep(phba, LPFC_MBX_WAIT);
|
||||
lpfc_offline(phba);
|
||||
@ -1,19 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Decrement ndlp kref after FDISC retries exhausted"
|
||||
# reverse of cs10 14172e24e848ad269867eae4464dd5704c041c92
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 941027b329a2..17390e5075cb 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -11259,11 +11259,6 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
lpfc_vlog_msg(vport, KERN_WARNING, LOG_ELS,
|
||||
"0126 FDISC cmpl status: x%x/x%x)\n",
|
||||
ulp_status, ulp_word4);
|
||||
-
|
||||
- /* drop initial reference */
|
||||
- if (!test_and_set_bit(NLP_DROPPED, &ndlp->nlp_flag))
|
||||
- lpfc_nlp_put(ndlp);
|
||||
-
|
||||
goto fdisc_failed;
|
||||
}
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Remove ndlp kref decrement clause for F_Port_Ctrl in lpfc_cleanup"
|
||||
# reverse of cs10 1073b98315bf10385a9bfdb2859415d38f641dc2
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 17390e5075cb..71e76e681621 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -12007,11 +12007,7 @@ lpfc_sli4_els_xri_aborted(struct lpfc_hba *phba,
|
||||
sglq_entry->state = SGL_FREED;
|
||||
spin_unlock_irqrestore(&phba->sli4_hba.sgl_list_lock,
|
||||
iflag);
|
||||
- lpfc_printf_log(phba, KERN_INFO, LOG_ELS | LOG_SLI |
|
||||
- LOG_DISCOVERY | LOG_NODE,
|
||||
- "0732 ELS XRI ABORT on Node: ndlp=x%px "
|
||||
- "xri=x%x\n",
|
||||
- ndlp, xri);
|
||||
+
|
||||
if (ndlp) {
|
||||
lpfc_set_rrq_active(phba, ndlp,
|
||||
sglq_entry->sli4_lxritag,
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
|
||||
index fd4317b9484c..0555b85ba9e7 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_init.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_init.c
|
||||
@@ -3057,6 +3057,13 @@ lpfc_cleanup(struct lpfc_vport *vport)
|
||||
lpfc_vmid_vport_cleanup(vport);
|
||||
|
||||
list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, nlp_listp) {
|
||||
+ if (vport->port_type != LPFC_PHYSICAL_PORT &&
|
||||
+ ndlp->nlp_DID == Fabric_DID) {
|
||||
+ /* Just free up ndlp with Fabric_DID for vports */
|
||||
+ lpfc_nlp_put(ndlp);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
if (ndlp->nlp_DID == Fabric_Cntl_DID &&
|
||||
ndlp->nlp_state == NLP_STE_UNUSED_NODE) {
|
||||
lpfc_nlp_put(ndlp);
|
||||
@ -1,24 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Clean up allocated queues when queue setup mbox commands fail"
|
||||
# reverse of cs10 82a9e6041f61db2763bfbec1e19b17ff5ea1cc8b
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index 08d16552c4b7..4ab7edf53103 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -8813,7 +8813,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
|
||||
if (unlikely(rc)) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0381 Error %d during queue setup.\n", rc);
|
||||
- goto out_destroy_queue;
|
||||
+ goto out_stop_timers;
|
||||
}
|
||||
/* Initialize the driver internal SLI layer lists. */
|
||||
lpfc_sli4_setup(phba);
|
||||
@@ -9096,6 +9096,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)
|
||||
lpfc_free_iocb_list(phba);
|
||||
out_destroy_queue:
|
||||
lpfc_sli4_queue_destroy(phba);
|
||||
+out_stop_timers:
|
||||
lpfc_stop_hba_timers(phba);
|
||||
out_free_mbox:
|
||||
mempool_free(mboxq, phba->mbox_mem_pool);
|
||||
@ -1,31 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Abort outstanding ELS WQEs regardless of if rmmod is in progress"
|
||||
# reverse of cs10 9009d1c6b30ca0c790618ddfa962012b89a46f01
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index 4ab7edf53103..e1fdce8d6bfd 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -12436,11 +12436,19 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
||||
}
|
||||
|
||||
/*
|
||||
- * Always abort the outstanding WQE and set the IA bit correctly
|
||||
- * for the context. This is necessary for correctly removing
|
||||
- * outstanding ndlp reference counts when the CQE completes with
|
||||
- * the XB bit set.
|
||||
+ * If we're unloading, don't abort iocb on the ELS ring, but change
|
||||
+ * the callback so that nothing happens when it finishes.
|
||||
*/
|
||||
+ if (test_bit(FC_UNLOADING, &vport->load_flag) &&
|
||||
+ pring->ringno == LPFC_ELS_RING) {
|
||||
+ if (cmdiocb->cmd_flag & LPFC_IO_FABRIC)
|
||||
+ cmdiocb->fabric_cmd_cmpl = lpfc_ignore_els_cmpl;
|
||||
+ else
|
||||
+ cmdiocb->cmd_cmpl = lpfc_ignore_els_cmpl;
|
||||
+ return retval;
|
||||
+ }
|
||||
+
|
||||
+ /* issue ABTS for this IOCB based on iotag */
|
||||
abtsiocbp = __lpfc_sli_get_iocbq(phba);
|
||||
if (abtsiocbp == NULL)
|
||||
return IOCB_NORESOURCE;
|
||||
@ -1,58 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Remove unused member variables in struct lpfc_hba and lpfc_vport"
|
||||
# reverse of cs10 65bf58f972704e641faa9302b8ba54512707b9f0
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
|
||||
index 9389e3def94e..e5a9c5a323f8 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc.h
|
||||
@@ -662,12 +662,15 @@ struct lpfc_vport {
|
||||
uint32_t num_disc_nodes; /* in addition to hba_state */
|
||||
uint32_t gidft_inp; /* cnt of outstanding GID_FTs */
|
||||
|
||||
+ uint32_t fc_nlp_cnt; /* outstanding NODELIST requests */
|
||||
uint32_t fc_rscn_id_cnt; /* count of RSCNs payloads in list */
|
||||
uint32_t fc_rscn_flush; /* flag use of fc_rscn_id_list */
|
||||
struct lpfc_dmabuf *fc_rscn_id_list[FC_MAX_HOLD_RSCN];
|
||||
struct lpfc_name fc_nodename; /* fc nodename */
|
||||
struct lpfc_name fc_portname; /* fc portname */
|
||||
|
||||
+ struct lpfc_work_evt disc_timeout_evt;
|
||||
+
|
||||
struct timer_list fc_disctmo; /* Discovery rescue timer */
|
||||
uint8_t fc_ns_retry; /* retries for fabric nameserver */
|
||||
uint32_t fc_prli_sent; /* cntr for outstanding PRLIs */
|
||||
@@ -765,6 +768,7 @@ struct lpfc_vport {
|
||||
/* There is a single nvme instance per vport. */
|
||||
struct nvme_fc_local_port *localport;
|
||||
uint8_t nvmei_support; /* driver supports NVME Initiator */
|
||||
+ uint32_t last_fcp_wqidx;
|
||||
uint32_t rcv_flogi_cnt; /* How many unsol FLOGIs ACK'd. */
|
||||
};
|
||||
|
||||
@@ -1057,6 +1061,8 @@ struct lpfc_hba {
|
||||
|
||||
struct lpfc_dmabuf hbqslimp;
|
||||
|
||||
+ uint16_t pci_cfg_value;
|
||||
+
|
||||
uint8_t fc_linkspeed; /* Link speed after last READ_LA */
|
||||
|
||||
uint32_t fc_eventTag; /* event tag for link attention */
|
||||
@@ -1083,6 +1089,7 @@ struct lpfc_hba {
|
||||
|
||||
struct lpfc_stats fc_stat;
|
||||
|
||||
+ struct lpfc_nodelist fc_fcpnodev; /* nodelist entry for no device */
|
||||
uint32_t nport_event_cnt; /* timestamp for nlplist entry */
|
||||
|
||||
uint8_t wwnn[8];
|
||||
@@ -1223,6 +1230,9 @@ struct lpfc_hba {
|
||||
uint32_t hbq_count; /* Count of configured HBQs */
|
||||
struct hbq_s hbqs[LPFC_MAX_HBQS]; /* local copy of hbq indicies */
|
||||
|
||||
+ atomic_t fcp_qidx; /* next FCP WQ (RR Policy) */
|
||||
+ atomic_t nvme_qidx; /* next NVME WQ (RR Policy) */
|
||||
+
|
||||
phys_addr_t pci_bar0_map; /* Physical address for PCI BAR0 */
|
||||
phys_addr_t pci_bar1_map; /* Physical address for PCI BAR1 */
|
||||
phys_addr_t pci_bar2_map; /* Physical address for PCI BAR2 */
|
||||
@ -1,16 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Use int type to store negative error codes"
|
||||
# reverse of cs10 1aeb9b98c42dfb8a653f27359979d2e769a0e492
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index e1fdce8d6bfd..585c80944832 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -21372,7 +21372,7 @@ lpfc_sli4_issue_wqe(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp,
|
||||
struct lpfc_sglq *sglq;
|
||||
struct lpfc_sli_ring *pring;
|
||||
unsigned long iflags;
|
||||
- int ret = 0;
|
||||
+ uint32_t ret = 0;
|
||||
|
||||
/* NVME_LS and NVME_LS ABTS requests. */
|
||||
if (pwqe->cmd_flag & LPFC_IO_NVME_LS) {
|
||||
@ -1,38 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: use min() to improve code"
|
||||
# reverse of cs10 e891063a53bdd334d714e6769e385508722ceef6
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
|
||||
index 0555b85ba9e7..29503ceb8e7a 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_init.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_init.c
|
||||
@@ -8300,7 +8300,10 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
|
||||
phba->cfg_total_seg_cnt, phba->cfg_scsi_seg_cnt,
|
||||
phba->cfg_nvme_seg_cnt);
|
||||
|
||||
- i = min(phba->cfg_sg_dma_buf_size, SLI4_PAGE_SIZE);
|
||||
+ if (phba->cfg_sg_dma_buf_size < SLI4_PAGE_SIZE)
|
||||
+ i = phba->cfg_sg_dma_buf_size;
|
||||
+ else
|
||||
+ i = SLI4_PAGE_SIZE;
|
||||
|
||||
phba->lpfc_sg_dma_buf_pool =
|
||||
dma_pool_create("lpfc_sg_dma_buf_pool",
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
|
||||
index 2dd148fd3ea1..1d7488b9e7b9 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_nvme.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
|
||||
@@ -1234,8 +1234,12 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport,
|
||||
if ((phba->cfg_nvme_enable_fb) &&
|
||||
test_bit(NLP_FIRSTBURST, &pnode->nlp_flag)) {
|
||||
req_len = lpfc_ncmd->nvmeCmd->payload_length;
|
||||
- wqe->fcp_iwrite.initial_xfer_len = min(req_len,
|
||||
- pnode->nvme_fb_size);
|
||||
+ if (req_len < pnode->nvme_fb_size)
|
||||
+ wqe->fcp_iwrite.initial_xfer_len =
|
||||
+ req_len;
|
||||
+ else
|
||||
+ wqe->fcp_iwrite.initial_xfer_len =
|
||||
+ pnode->nvme_fb_size;
|
||||
} else {
|
||||
wqe->fcp_iwrite.initial_xfer_len = 0;
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Fix wrong function reference in a comment"
|
||||
# reverse of cs10 7feab3ea585404dd34641c698930e7fc6bb8043a
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
|
||||
index 8653839ee728..3d70cc517573 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_vport.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_vport.c
|
||||
@@ -666,7 +666,7 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
|
||||
* Take early refcount for outstanding I/O requests we schedule during
|
||||
* delete processing for unreg_vpi. Always keep this before
|
||||
* scsi_remove_host() as we can no longer obtain a reference through
|
||||
- * scsi_host_get() after scsi_remove_host as shost is set to SHOST_DEL.
|
||||
+ * scsi_host_get() after scsi_host_remove as shost is set to SHOST_DEL.
|
||||
*/
|
||||
if (!scsi_host_get(shost))
|
||||
return VPORT_INVAL;
|
||||
@ -1,203 +0,0 @@
|
||||
Subject: [PATCH] Revert "lpfc: don't use file->f_path.dentry for comparisons"
|
||||
# reverse of cs10 ba0a8d52eb98a4f44818f9abf664eeeeb8558255
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
index 2db8d9529b8f..2c7d876c64c7 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
@@ -2375,32 +2375,32 @@ static ssize_t
|
||||
lpfc_debugfs_dif_err_read(struct file *file, char __user *buf,
|
||||
size_t nbytes, loff_t *ppos)
|
||||
{
|
||||
+ struct dentry *dent = file->f_path.dentry;
|
||||
struct lpfc_hba *phba = file->private_data;
|
||||
- int kind = debugfs_get_aux_num(file);
|
||||
char cbuf[32];
|
||||
uint64_t tmp = 0;
|
||||
int cnt = 0;
|
||||
|
||||
- if (kind == writeGuard)
|
||||
+ if (dent == phba->debug_writeGuard)
|
||||
cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wgrd_cnt);
|
||||
- else if (kind == writeApp)
|
||||
+ else if (dent == phba->debug_writeApp)
|
||||
cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wapp_cnt);
|
||||
- else if (kind == writeRef)
|
||||
+ else if (dent == phba->debug_writeRef)
|
||||
cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wref_cnt);
|
||||
- else if (kind == readGuard)
|
||||
+ else if (dent == phba->debug_readGuard)
|
||||
cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rgrd_cnt);
|
||||
- else if (kind == readApp)
|
||||
+ else if (dent == phba->debug_readApp)
|
||||
cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rapp_cnt);
|
||||
- else if (kind == readRef)
|
||||
+ else if (dent == phba->debug_readRef)
|
||||
cnt = scnprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rref_cnt);
|
||||
- else if (kind == InjErrNPortID)
|
||||
+ else if (dent == phba->debug_InjErrNPortID)
|
||||
cnt = scnprintf(cbuf, 32, "0x%06x\n",
|
||||
phba->lpfc_injerr_nportid);
|
||||
- else if (kind == InjErrWWPN) {
|
||||
+ else if (dent == phba->debug_InjErrWWPN) {
|
||||
memcpy(&tmp, &phba->lpfc_injerr_wwpn, sizeof(struct lpfc_name));
|
||||
tmp = cpu_to_be64(tmp);
|
||||
cnt = scnprintf(cbuf, 32, "0x%016llx\n", tmp);
|
||||
- } else if (kind == InjErrLBA) {
|
||||
+ } else if (dent == phba->debug_InjErrLBA) {
|
||||
if (phba->lpfc_injerr_lba == (sector_t)(-1))
|
||||
cnt = scnprintf(cbuf, 32, "off\n");
|
||||
else
|
||||
@@ -2417,8 +2417,8 @@ static ssize_t
|
||||
lpfc_debugfs_dif_err_write(struct file *file, const char __user *buf,
|
||||
size_t nbytes, loff_t *ppos)
|
||||
{
|
||||
+ struct dentry *dent = file->f_path.dentry;
|
||||
struct lpfc_hba *phba = file->private_data;
|
||||
- int kind = debugfs_get_aux_num(file);
|
||||
char dstbuf[33];
|
||||
uint64_t tmp = 0;
|
||||
int size;
|
||||
@@ -2428,7 +2428,7 @@ lpfc_debugfs_dif_err_write(struct file *file, const char __user *buf,
|
||||
if (copy_from_user(dstbuf, buf, size))
|
||||
return -EFAULT;
|
||||
|
||||
- if (kind == InjErrLBA) {
|
||||
+ if (dent == phba->debug_InjErrLBA) {
|
||||
if ((dstbuf[0] == 'o') && (dstbuf[1] == 'f') &&
|
||||
(dstbuf[2] == 'f'))
|
||||
tmp = (uint64_t)(-1);
|
||||
@@ -2437,23 +2437,23 @@ lpfc_debugfs_dif_err_write(struct file *file, const char __user *buf,
|
||||
if ((tmp == 0) && (kstrtoull(dstbuf, 0, &tmp)))
|
||||
return -EINVAL;
|
||||
|
||||
- if (kind == writeGuard)
|
||||
+ if (dent == phba->debug_writeGuard)
|
||||
phba->lpfc_injerr_wgrd_cnt = (uint32_t)tmp;
|
||||
- else if (kind == writeApp)
|
||||
+ else if (dent == phba->debug_writeApp)
|
||||
phba->lpfc_injerr_wapp_cnt = (uint32_t)tmp;
|
||||
- else if (kind == writeRef)
|
||||
+ else if (dent == phba->debug_writeRef)
|
||||
phba->lpfc_injerr_wref_cnt = (uint32_t)tmp;
|
||||
- else if (kind == readGuard)
|
||||
+ else if (dent == phba->debug_readGuard)
|
||||
phba->lpfc_injerr_rgrd_cnt = (uint32_t)tmp;
|
||||
- else if (kind == readApp)
|
||||
+ else if (dent == phba->debug_readApp)
|
||||
phba->lpfc_injerr_rapp_cnt = (uint32_t)tmp;
|
||||
- else if (kind == readRef)
|
||||
+ else if (dent == phba->debug_readRef)
|
||||
phba->lpfc_injerr_rref_cnt = (uint32_t)tmp;
|
||||
- else if (kind == InjErrLBA)
|
||||
+ else if (dent == phba->debug_InjErrLBA)
|
||||
phba->lpfc_injerr_lba = (sector_t)tmp;
|
||||
- else if (kind == InjErrNPortID)
|
||||
+ else if (dent == phba->debug_InjErrNPortID)
|
||||
phba->lpfc_injerr_nportid = (uint32_t)(tmp & Mask_DID);
|
||||
- else if (kind == InjErrWWPN) {
|
||||
+ else if (dent == phba->debug_InjErrWWPN) {
|
||||
tmp = cpu_to_be64(tmp);
|
||||
memcpy(&phba->lpfc_injerr_wwpn, &tmp, sizeof(struct lpfc_name));
|
||||
} else
|
||||
@@ -6160,51 +6160,60 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
|
||||
phba->debug_dumpHostSlim = NULL;
|
||||
|
||||
/* Setup DIF Error Injections */
|
||||
+ snprintf(name, sizeof(name), "InjErrLBA");
|
||||
phba->debug_InjErrLBA =
|
||||
- debugfs_create_file_aux_num("InjErrLBA", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, InjErrLBA, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
phba->lpfc_injerr_lba = LPFC_INJERR_LBA_OFF;
|
||||
|
||||
+ snprintf(name, sizeof(name), "InjErrNPortID");
|
||||
phba->debug_InjErrNPortID =
|
||||
- debugfs_create_file_aux_num("InjErrNPortID", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, InjErrNPortID, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
+ snprintf(name, sizeof(name), "InjErrWWPN");
|
||||
phba->debug_InjErrWWPN =
|
||||
- debugfs_create_file_aux_num("InjErrWWPN", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, InjErrWWPN, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
+ snprintf(name, sizeof(name), "writeGuardInjErr");
|
||||
phba->debug_writeGuard =
|
||||
- debugfs_create_file_aux_num("writeGuardInjErr", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, writeGuard, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
+ snprintf(name, sizeof(name), "writeAppInjErr");
|
||||
phba->debug_writeApp =
|
||||
- debugfs_create_file_aux_num("writeAppInjErr", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, writeApp, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
+ snprintf(name, sizeof(name), "writeRefInjErr");
|
||||
phba->debug_writeRef =
|
||||
- debugfs_create_file_aux_num("writeRefInjErr", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, writeRef, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
+ snprintf(name, sizeof(name), "readGuardInjErr");
|
||||
phba->debug_readGuard =
|
||||
- debugfs_create_file_aux_num("readGuardInjErr", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, readGuard, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
+ snprintf(name, sizeof(name), "readAppInjErr");
|
||||
phba->debug_readApp =
|
||||
- debugfs_create_file_aux_num("readAppInjErr", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, readApp, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
+ snprintf(name, sizeof(name), "readRefInjErr");
|
||||
phba->debug_readRef =
|
||||
- debugfs_create_file_aux_num("readRefInjErr", 0644,
|
||||
+ debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
|
||||
phba->hba_debugfs_root,
|
||||
- phba, readRef, &lpfc_debugfs_op_dif_err);
|
||||
+ phba, &lpfc_debugfs_op_dif_err);
|
||||
|
||||
/* Setup slow ring trace */
|
||||
if (lpfc_debugfs_max_slow_ring_trc) {
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.h b/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
index f319f3af0400..8d2e8d05bbc0 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.h
|
||||
@@ -322,17 +322,6 @@ enum {
|
||||
* discovery */
|
||||
#endif /* H_LPFC_DEBUG_FS */
|
||||
|
||||
-enum {
|
||||
- writeGuard = 1,
|
||||
- writeApp,
|
||||
- writeRef,
|
||||
- readGuard,
|
||||
- readApp,
|
||||
- readRef,
|
||||
- InjErrLBA,
|
||||
- InjErrNPortID,
|
||||
- InjErrWWPN,
|
||||
-};
|
||||
|
||||
/*
|
||||
* Driver debug utility routines outside of debugfs. The debug utility
|
||||
@ -1,68 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Copyright updates for 14.4.0.10 patches"
|
||||
# reverse of cs10 b681f59c801919396f35f2e33060d37b0732f1d1
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
|
||||
index cc8af576f57c..daba94529b45 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_ct.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_ct.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
index 2c7d876c64c7..061a5e4e525d 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2007-2015 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
|
||||
index bc709786e6af..dd9f170fbdc8 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hw4.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2009-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
index a9c8c6c021b9..71188060dc08 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
|
||||
index fd6dab157887..e42b44fcc7f6 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli4.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
|
||||
@@ -1,7 +1,7 @@
|
||||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
- * Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
+ * Copyright (C) 2017-2024 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2009-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
@ -1,16 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Update lpfc version to 14.4.0.10"
|
||||
# reverse of cs10 25abc74ff90b76294454ae9d19b06b1cbc489a4b
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h
|
||||
index 9ee3a3a4ec4d..749688aa8a82 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_version.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_version.h
|
||||
@@ -20,7 +20,7 @@
|
||||
* included with this package. *
|
||||
*******************************************************************/
|
||||
|
||||
-#define LPFC_DRIVER_VERSION "14.4.0.10"
|
||||
+#define LPFC_DRIVER_VERSION "14.4.0.9"
|
||||
#define LPFC_DRIVER_NAME "lpfc"
|
||||
|
||||
/* Used for SLI 2/3 */
|
||||
@ -1,138 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Modify end-of-life adapters' model descriptions"
|
||||
# reverse of cs10 5e442a469bde8240d35a7242dd888dc9dab5b9a7
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
|
||||
index 29503ceb8e7a..0876fcf07b5a 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_init.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_init.c
|
||||
@@ -2627,33 +2627,27 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp)
|
||||
"Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_BMID:
|
||||
- m = (typeof(m)){"LP1150", "PCI-X2",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LP1150", "PCI-X2", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_BSMB:
|
||||
m = (typeof(m)){"LP111", "PCI-X2",
|
||||
"Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_ZEPHYR:
|
||||
- m = (typeof(m)){"LPe11000", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe11000", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_ZEPHYR_SCSP:
|
||||
- m = (typeof(m)){"LPe11000", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe11000", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_ZEPHYR_DCSP:
|
||||
- m = (typeof(m)){"LP2105", "PCIe",
|
||||
- "Obsolete, Unsupported FCoE Adapter"};
|
||||
+ m = (typeof(m)){"LP2105", "PCIe", "FCoE Adapter"};
|
||||
GE = 1;
|
||||
break;
|
||||
case PCI_DEVICE_ID_ZMID:
|
||||
- m = (typeof(m)){"LPe1150", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe1150", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_ZSMB:
|
||||
- m = (typeof(m)){"LPe111", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe111", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_LP101:
|
||||
m = (typeof(m)){"LP101", "PCI-X",
|
||||
@@ -2672,28 +2666,22 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp)
|
||||
"Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_SAT:
|
||||
- m = (typeof(m)){"LPe12000", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe12000", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_SAT_MID:
|
||||
- m = (typeof(m)){"LPe1250", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe1250", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_SAT_SMB:
|
||||
- m = (typeof(m)){"LPe121", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe121", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_SAT_DCSP:
|
||||
- m = (typeof(m)){"LPe12002-SP", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe12002-SP", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_SAT_SCSP:
|
||||
- m = (typeof(m)){"LPe12000-SP", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe12000-SP", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_SAT_S:
|
||||
- m = (typeof(m)){"LPe12000-S", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe12000-S", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_PROTEUS_VF:
|
||||
m = (typeof(m)){"LPev12000", "PCIe IOV",
|
||||
@@ -2709,25 +2697,22 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp)
|
||||
break;
|
||||
case PCI_DEVICE_ID_TIGERSHARK:
|
||||
oneConnect = 1;
|
||||
- m = (typeof(m)){"OCe10100", "PCIe",
|
||||
- "Obsolete, Unsupported FCoE Adapter"};
|
||||
+ m = (typeof(m)){"OCe10100", "PCIe", "FCoE"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_TOMCAT:
|
||||
oneConnect = 1;
|
||||
- m = (typeof(m)){"OCe11100", "PCIe",
|
||||
- "Obsolete, Unsupported FCoE Adapter"};
|
||||
+ m = (typeof(m)){"OCe11100", "PCIe", "FCoE"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_FALCON:
|
||||
m = (typeof(m)){"LPSe12002-ML1-E", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ "EmulexSecure Fibre"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_BALIUS:
|
||||
m = (typeof(m)){"LPVe12002", "PCIe Shared I/O",
|
||||
"Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_LANCER_FC:
|
||||
- m = (typeof(m)){"LPe16000", "PCIe",
|
||||
- "Obsolete, Unsupported Fibre Channel Adapter"};
|
||||
+ m = (typeof(m)){"LPe16000", "PCIe", "Fibre Channel Adapter"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_LANCER_FC_VF:
|
||||
m = (typeof(m)){"LPe16000", "PCIe",
|
||||
@@ -2735,13 +2720,12 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp)
|
||||
break;
|
||||
case PCI_DEVICE_ID_LANCER_FCOE:
|
||||
oneConnect = 1;
|
||||
- m = (typeof(m)){"OCe15100", "PCIe",
|
||||
- "Obsolete, Unsupported FCoE Adapter"};
|
||||
+ m = (typeof(m)){"OCe15100", "PCIe", "FCoE"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_LANCER_FCOE_VF:
|
||||
oneConnect = 1;
|
||||
m = (typeof(m)){"OCe15100", "PCIe",
|
||||
- "Obsolete, Unsupported FCoE Adapter"};
|
||||
+ "Obsolete, Unsupported FCoE"};
|
||||
break;
|
||||
case PCI_DEVICE_ID_LANCER_G6_FC:
|
||||
m = (typeof(m)){"LPe32000", "PCIe", "Fibre Channel Adapter"};
|
||||
@@ -2755,8 +2739,7 @@ lpfc_get_hba_model_desc(struct lpfc_hba *phba, uint8_t *mdp, uint8_t *descp)
|
||||
case PCI_DEVICE_ID_SKYHAWK:
|
||||
case PCI_DEVICE_ID_SKYHAWK_VF:
|
||||
oneConnect = 1;
|
||||
- m = (typeof(m)){"OCe14000", "PCIe",
|
||||
- "Obsolete, Unsupported FCoE Adapter"};
|
||||
+ m = (typeof(m)){"OCe14000", "PCIe", "FCoE"};
|
||||
break;
|
||||
default:
|
||||
m = (typeof(m)){"Unknown", "", ""};
|
||||
@ -1,102 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Revise CQ_CREATE_SET mailbox bitfield definitions"
|
||||
# reverse of cs10 ee3715dad64c5b70516cac33ed1c31e66dfb1ebd
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
|
||||
index dd9f170fbdc8..2dedb273b091 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hw4.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
|
||||
@@ -1328,9 +1328,6 @@ struct cq_context {
|
||||
#define LPFC_CQ_CNT_512 0x1
|
||||
#define LPFC_CQ_CNT_1024 0x2
|
||||
#define LPFC_CQ_CNT_WORD7 0x3
|
||||
-#define lpfc_cq_context_cqe_sz_SHIFT 25
|
||||
-#define lpfc_cq_context_cqe_sz_MASK 0x00000003
|
||||
-#define lpfc_cq_context_cqe_sz_WORD word0
|
||||
#define lpfc_cq_context_autovalid_SHIFT 15
|
||||
#define lpfc_cq_context_autovalid_MASK 0x00000001
|
||||
#define lpfc_cq_context_autovalid_WORD word0
|
||||
@@ -1386,9 +1383,9 @@ struct lpfc_mbx_cq_create_set {
|
||||
#define lpfc_mbx_cq_create_set_valid_SHIFT 29
|
||||
#define lpfc_mbx_cq_create_set_valid_MASK 0x00000001
|
||||
#define lpfc_mbx_cq_create_set_valid_WORD word1
|
||||
-#define lpfc_mbx_cq_create_set_cqecnt_SHIFT 27
|
||||
-#define lpfc_mbx_cq_create_set_cqecnt_MASK 0x00000003
|
||||
-#define lpfc_mbx_cq_create_set_cqecnt_WORD word1
|
||||
+#define lpfc_mbx_cq_create_set_cqe_cnt_SHIFT 27
|
||||
+#define lpfc_mbx_cq_create_set_cqe_cnt_MASK 0x00000003
|
||||
+#define lpfc_mbx_cq_create_set_cqe_cnt_WORD word1
|
||||
#define lpfc_mbx_cq_create_set_cqe_size_SHIFT 25
|
||||
#define lpfc_mbx_cq_create_set_cqe_size_MASK 0x00000003
|
||||
#define lpfc_mbx_cq_create_set_cqe_size_WORD word1
|
||||
@@ -1401,16 +1398,13 @@ struct lpfc_mbx_cq_create_set {
|
||||
#define lpfc_mbx_cq_create_set_clswm_SHIFT 12
|
||||
#define lpfc_mbx_cq_create_set_clswm_MASK 0x00000003
|
||||
#define lpfc_mbx_cq_create_set_clswm_WORD word1
|
||||
-#define lpfc_mbx_cq_create_set_cqe_cnt_hi_SHIFT 0
|
||||
-#define lpfc_mbx_cq_create_set_cqe_cnt_hi_MASK 0x0000001F
|
||||
-#define lpfc_mbx_cq_create_set_cqe_cnt_hi_WORD word1
|
||||
uint32_t word2;
|
||||
#define lpfc_mbx_cq_create_set_arm_SHIFT 31
|
||||
#define lpfc_mbx_cq_create_set_arm_MASK 0x00000001
|
||||
#define lpfc_mbx_cq_create_set_arm_WORD word2
|
||||
-#define lpfc_mbx_cq_create_set_cqe_cnt_lo_SHIFT 16
|
||||
-#define lpfc_mbx_cq_create_set_cqe_cnt_lo_MASK 0x00007FFF
|
||||
-#define lpfc_mbx_cq_create_set_cqe_cnt_lo_WORD word2
|
||||
+#define lpfc_mbx_cq_create_set_cq_cnt_SHIFT 16
|
||||
+#define lpfc_mbx_cq_create_set_cq_cnt_MASK 0x00007FFF
|
||||
+#define lpfc_mbx_cq_create_set_cq_cnt_WORD word2
|
||||
#define lpfc_mbx_cq_create_set_num_cq_SHIFT 0
|
||||
#define lpfc_mbx_cq_create_set_num_cq_MASK 0x0000FFFF
|
||||
#define lpfc_mbx_cq_create_set_num_cq_WORD word2
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index 585c80944832..a96e6489594c 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -16476,10 +16476,10 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
|
||||
case 4096:
|
||||
if (phba->sli4_hba.pc_sli4_params.cqv ==
|
||||
LPFC_Q_CREATE_VERSION_2) {
|
||||
- bf_set(lpfc_mbx_cq_create_set_cqe_cnt_lo,
|
||||
+ bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
|
||||
&cq_set->u.request,
|
||||
- cq->entry_count);
|
||||
- bf_set(lpfc_mbx_cq_create_set_cqecnt,
|
||||
+ cq->entry_count);
|
||||
+ bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
|
||||
&cq_set->u.request,
|
||||
LPFC_CQ_CNT_WORD7);
|
||||
break;
|
||||
@@ -16495,15 +16495,15 @@ lpfc_cq_create_set(struct lpfc_hba *phba, struct lpfc_queue **cqp,
|
||||
}
|
||||
fallthrough; /* otherwise default to smallest */
|
||||
case 256:
|
||||
- bf_set(lpfc_mbx_cq_create_set_cqecnt,
|
||||
+ bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
|
||||
&cq_set->u.request, LPFC_CQ_CNT_256);
|
||||
break;
|
||||
case 512:
|
||||
- bf_set(lpfc_mbx_cq_create_set_cqecnt,
|
||||
+ bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
|
||||
&cq_set->u.request, LPFC_CQ_CNT_512);
|
||||
break;
|
||||
case 1024:
|
||||
- bf_set(lpfc_mbx_cq_create_set_cqecnt,
|
||||
+ bf_set(lpfc_mbx_cq_create_set_cqe_cnt,
|
||||
&cq_set->u.request, LPFC_CQ_CNT_1024);
|
||||
break;
|
||||
}
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli4.h b/drivers/scsi/lpfc/lpfc_sli4.h
|
||||
index e42b44fcc7f6..9be3da91c923 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli4.h
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli4.h
|
||||
@@ -575,10 +575,8 @@ struct lpfc_pc_sli4_params {
|
||||
|
||||
#define LPFC_CQ_4K_PAGE_SZ 0x1
|
||||
#define LPFC_CQ_16K_PAGE_SZ 0x4
|
||||
-#define LPFC_CQ_32K_PAGE_SZ 0x8
|
||||
#define LPFC_WQ_4K_PAGE_SZ 0x1
|
||||
#define LPFC_WQ_16K_PAGE_SZ 0x4
|
||||
-#define LPFC_WQ_32K_PAGE_SZ 0x8
|
||||
|
||||
struct lpfc_iov {
|
||||
uint32_t pf_number;
|
||||
@ -1,37 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Move clearing of HBA_SETUP flag to before lpfc_sli4_queue_unset"
|
||||
# reverse of cs10 034b060b9f17847aeb3475fb2c579a6c87d87667
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
index 71188060dc08..0afc5fe013bc 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
|
||||
@@ -536,8 +536,7 @@ lpfc_sli4_io_xri_aborted(struct lpfc_hba *phba,
|
||||
psb = container_of(iocbq, struct lpfc_io_buf, cur_iocbq);
|
||||
psb->flags &= ~LPFC_SBUF_XBUSY;
|
||||
spin_unlock_irqrestore(&phba->hbalock, iflag);
|
||||
- if (test_bit(HBA_SETUP, &phba->hba_flag) &&
|
||||
- !list_empty(&pring->txq))
|
||||
+ if (!list_empty(&pring->txq))
|
||||
lpfc_worker_wake_up(phba);
|
||||
return;
|
||||
}
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
index a96e6489594c..b9a5d377f336 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_sli.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_sli.c
|
||||
@@ -5160,6 +5160,7 @@ lpfc_sli4_brdreset(struct lpfc_hba *phba)
|
||||
phba->link_events = 0;
|
||||
phba->pport->fc_myDID = 0;
|
||||
phba->pport->fc_prevDID = 0;
|
||||
+ clear_bit(HBA_SETUP, &phba->hba_flag);
|
||||
|
||||
spin_lock_irq(&phba->hbalock);
|
||||
psli->sli_flag &= ~(LPFC_PROCESS_LA);
|
||||
@@ -5276,7 +5277,6 @@ lpfc_sli_brdrestart_s4(struct lpfc_hba *phba)
|
||||
"0296 Restart HBA Data: x%x x%x\n",
|
||||
phba->pport->port_state, psli->sli_flag);
|
||||
|
||||
- clear_bit(HBA_SETUP, &phba->hba_flag);
|
||||
lpfc_sli4_queue_unset(phba);
|
||||
|
||||
rc = lpfc_sli4_brdreset(phba);
|
||||
@ -1,17 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Ensure HBA_SETUP flag is used only for SLI4 in dev_loss_tmo_callbk"
|
||||
# reverse of cs10 68ce87a35f24f9dbfee4c60bc0bcdb3f88734db5
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
index 1510ed28f5a4..d8a0915d1df0 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
@@ -183,8 +183,7 @@ lpfc_dev_loss_tmo_callbk(struct fc_rport *rport)
|
||||
|
||||
/* Don't schedule a worker thread event if the vport is going down. */
|
||||
if (test_bit(FC_UNLOADING, &vport->load_flag) ||
|
||||
- (phba->sli_rev == LPFC_SLI_REV4 &&
|
||||
- !test_bit(HBA_SETUP, &phba->hba_flag))) {
|
||||
+ !test_bit(HBA_SETUP, &phba->hba_flag)) {
|
||||
|
||||
spin_lock_irqsave(&ndlp->lock, iflags);
|
||||
ndlp->rport = NULL;
|
||||
@ -1,45 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Relocate clearing initial phba flags from link up to link down hdlr"
|
||||
# reverse of cs10 f13e1a401181a22b42c52a1c5ef3271a239606e6
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 71e76e681621..3cbacc923fbd 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -8376,9 +8376,9 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb,
|
||||
clear_bit(FC_PUBLIC_LOOP, &vport->fc_flag);
|
||||
lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
"3311 Rcv Flogi PS x%x new PS x%x "
|
||||
- "fc_flag x%lx new fc_flag x%lx, hba_flag x%lx\n",
|
||||
+ "fc_flag x%lx new fc_flag x%lx\n",
|
||||
port_state, vport->port_state,
|
||||
- fc_flag, vport->fc_flag, phba->hba_flag);
|
||||
+ fc_flag, vport->fc_flag);
|
||||
|
||||
/*
|
||||
* We temporarily set fc_myDID to make it look like we are
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
index d8a0915d1df0..aff0740a5510 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
|
||||
@@ -1266,10 +1266,6 @@ lpfc_linkdown(struct lpfc_hba *phba)
|
||||
}
|
||||
phba->defer_flogi_acc.flag = false;
|
||||
|
||||
- /* reinitialize initial HBA flag */
|
||||
- clear_bit(HBA_FLOGI_ISSUED, &phba->hba_flag);
|
||||
- clear_bit(HBA_RHBA_CMPL, &phba->hba_flag);
|
||||
-
|
||||
/* Clear external loopback plug detected flag */
|
||||
phba->link_flag &= ~LS_EXTERNAL_LOOPBACK;
|
||||
|
||||
@@ -1440,6 +1436,10 @@ lpfc_linkup(struct lpfc_hba *phba)
|
||||
phba->pport->rcv_flogi_cnt = 0;
|
||||
spin_unlock_irq(shost->host_lock);
|
||||
|
||||
+ /* reinitialize initial HBA flag */
|
||||
+ clear_bit(HBA_FLOGI_ISSUED, &phba->hba_flag);
|
||||
+ clear_bit(HBA_RHBA_CMPL, &phba->hba_flag);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Simplify error handling for failed lpfc_get_sli4_parameters cmd"
|
||||
# reverse of cs10 9cf927d02bc932338017864503fc177d8a0a4f2b
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
|
||||
index 0876fcf07b5a..5b848288f522 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_init.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_init.c
|
||||
@@ -7918,6 +7918,8 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
|
||||
int longs;
|
||||
int extra;
|
||||
uint64_t wwn;
|
||||
+ u32 if_type;
|
||||
+ u32 if_fam;
|
||||
|
||||
phba->sli4_hba.num_present_cpu = lpfc_present_cpu;
|
||||
phba->sli4_hba.num_possible_cpu = cpumask_last(cpu_possible_mask) + 1;
|
||||
@@ -8178,11 +8180,28 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
|
||||
*/
|
||||
rc = lpfc_get_sli4_parameters(phba, mboxq);
|
||||
if (rc) {
|
||||
- lpfc_log_msg(phba, KERN_WARNING, LOG_INIT,
|
||||
- "2999 Could not get SLI4 parameters\n");
|
||||
- rc = -EIO;
|
||||
- mempool_free(mboxq, phba->mbox_mem_pool);
|
||||
- goto out_free_bsmbx;
|
||||
+ if_type = bf_get(lpfc_sli_intf_if_type,
|
||||
+ &phba->sli4_hba.sli_intf);
|
||||
+ if_fam = bf_get(lpfc_sli_intf_sli_family,
|
||||
+ &phba->sli4_hba.sli_intf);
|
||||
+ if (phba->sli4_hba.extents_in_use &&
|
||||
+ phba->sli4_hba.rpi_hdrs_in_use) {
|
||||
+ lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
+ "2999 Unsupported SLI4 Parameters "
|
||||
+ "Extents and RPI headers enabled.\n");
|
||||
+ if (if_type == LPFC_SLI_INTF_IF_TYPE_0 &&
|
||||
+ if_fam == LPFC_SLI_INTF_FAMILY_BE2) {
|
||||
+ mempool_free(mboxq, phba->mbox_mem_pool);
|
||||
+ rc = -EIO;
|
||||
+ goto out_free_bsmbx;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!(if_type == LPFC_SLI_INTF_IF_TYPE_0 &&
|
||||
+ if_fam == LPFC_SLI_INTF_FAMILY_BE2)) {
|
||||
+ mempool_free(mboxq, phba->mbox_mem_pool);
|
||||
+ rc = -EIO;
|
||||
+ goto out_free_bsmbx;
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1,39 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Early return out of FDMI cmpl for locally rejected statuses"
|
||||
# reverse of cs10 0c985d88af920e163f033fca2fd907a1ea3199fe
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
|
||||
index daba94529b45..72ff92ac5321 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_ct.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_ct.c
|
||||
@@ -2229,6 +2229,21 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
/* Look for a retryable error */
|
||||
if (ulp_status == IOSTAT_LOCAL_REJECT) {
|
||||
switch ((ulp_word4 & IOERR_PARAM_MASK)) {
|
||||
+ case IOERR_SLI_ABORTED:
|
||||
+ case IOERR_SLI_DOWN:
|
||||
+ /* Driver aborted this IO. No retry as error
|
||||
+ * is likely Offline->Online or some adapter
|
||||
+ * error. Recovery will try again, but if port
|
||||
+ * is not active there's no point to continue
|
||||
+ * issuing follow up FDMI commands.
|
||||
+ */
|
||||
+ if (!(phba->sli.sli_flag & LPFC_SLI_ACTIVE)) {
|
||||
+ free_ndlp = cmdiocb->ndlp;
|
||||
+ lpfc_ct_free_iocb(phba, cmdiocb);
|
||||
+ lpfc_nlp_put(free_ndlp);
|
||||
+ return;
|
||||
+ }
|
||||
+ break;
|
||||
case IOERR_ABORT_IN_PROGRESS:
|
||||
case IOERR_SEQUENCE_TIMEOUT:
|
||||
case IOERR_ILLEGAL_FRAME:
|
||||
@@ -2254,9 +2269,6 @@ lpfc_cmpl_ct_disc_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
|
||||
lpfc_ct_free_iocb(phba, cmdiocb);
|
||||
lpfc_nlp_put(free_ndlp);
|
||||
|
||||
- if (ulp_status != IOSTAT_SUCCESS)
|
||||
- return;
|
||||
-
|
||||
ndlp = lpfc_findnode_did(vport, FDMI_DID);
|
||||
if (!ndlp)
|
||||
return;
|
||||
@ -1,21 +0,0 @@
|
||||
Subject: [PATCH] Revert "scsi: lpfc: Skip RSCN processing when FC_UNLOADING flag is set"
|
||||
# reverse of cs10 78262dda794a4ef21146664546d2cf058132113d
|
||||
|
||||
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
|
||||
index 3cbacc923fbd..9ab2e98cf693 100644
|
||||
--- a/drivers/scsi/lpfc/lpfc_els.c
|
||||
+++ b/drivers/scsi/lpfc/lpfc_els.c
|
||||
@@ -7860,13 +7860,6 @@ lpfc_rscn_recovery_check(struct lpfc_vport *vport)
|
||||
|
||||
/* Move all affected nodes by pending RSCNs to NPR state. */
|
||||
list_for_each_entry_safe(ndlp, n, &vport->fc_nodes, nlp_listp) {
|
||||
- if (test_bit(FC_UNLOADING, &vport->load_flag)) {
|
||||
- lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS,
|
||||
- "1000 %s Unloading set\n",
|
||||
- __func__);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
if ((ndlp->nlp_state == NLP_STE_UNUSED_NODE) ||
|
||||
!lpfc_rscn_payload_check(vport, ndlp->nlp_DID))
|
||||
continue;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user