summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-09-04 12:10:22 -0700
committerJakub Kicinski <kuba@kernel.org>2026-09-09 13:52:51 -0700
commitf4ac7c7a846d0cea1cfa698ef41e7147e8d22bab (patch)
tree49593f75a6ab2742a53b3a3a4a7c0a88057ce4ef
parent28f363015aea55fcb323b97d97bdf2e4fff0cf4d (diff)
downloadlinux-next-f4ac7c7a846d0cea1cfa698ef41e7147e8d22bab.tar.gz
linux-next-f4ac7c7a846d0cea1cfa698ef41e7147e8d22bab.zip
netlink: specs: dpll: pin-get has no dump filter
The op doc promises "dump request with target dpll - list all the pins registered with a given dpll device" and "do request with target dpll and target pin". Neither exists. pin-get uses attribute-set: pin, so the id in both requests is DPLL_A_PIN_ID, not a device id; there is no reachable "target dpll" attribute at all (DPLL_A_PIN_PARENT_ID is in neither list). dpll_nl_pin_get_dumpit() does not look at the request, it walks dpll_pin_xa from ctx->idx and emits every registered, available pin, and there is no dump start callback to consume an id either. So the generated dpll_pin_get_dump() sends an id, gets the full list back and reports no error. Drop the id from the dump request and the two targeting claims from the doc. Present since commit 3badff3a25d8 ("dpll: spec: Add Netlink spec in YAML"). Same caveat as for pin-set: sending DPLL_A_PIN_ID in a pin-get dump now fails validation instead of being ignored. Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20260904191023.3869690-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--Documentation/netlink/specs/dpll.yaml11
-rw-r--r--drivers/dpll/dpll_nl.c17
2 files changed, 8 insertions, 20 deletions
diff --git a/Documentation/netlink/specs/dpll.yaml b/Documentation/netlink/specs/dpll.yaml
index 93e546ba1f56..e2ca4df5699a 100644
--- a/Documentation/netlink/specs/dpll.yaml
+++ b/Documentation/netlink/specs/dpll.yaml
@@ -701,11 +701,9 @@ operations:
doc: |
Get list of pins and its attributes.
- - dump request without any attributes given - list all the pins in the
- system
- - dump request with target dpll - list all the pins registered with
- a given dpll device
- - do request with target dpll and target pin - single pin attributes
+ - dump request - list all the registered, available pins in the
+ system, the request takes no attributes
+ - do request with target pin - single pin attributes
attribute-set: pin
flags: [admin-perm]
@@ -742,9 +740,6 @@ operations:
- measured-frequency
dump:
- request:
- attributes:
- - id
reply: *pin-attrs
-
diff --git a/drivers/dpll/dpll_nl.c b/drivers/dpll/dpll_nl.c
index 3bdabbf2b931..fa09b524a4a0 100644
--- a/drivers/dpll/dpll_nl.c
+++ b/drivers/dpll/dpll_nl.c
@@ -65,12 +65,7 @@ static const struct nla_policy dpll_pin_id_get_nl_policy[DPLL_A_PIN_TYPE + 1] =
};
/* DPLL_CMD_PIN_GET - do */
-static const struct nla_policy dpll_pin_get_do_nl_policy[DPLL_A_PIN_ID + 1] = {
- [DPLL_A_PIN_ID] = { .type = NLA_U32, },
-};
-
-/* DPLL_CMD_PIN_GET - dump */
-static const struct nla_policy dpll_pin_get_dump_nl_policy[DPLL_A_PIN_ID + 1] = {
+static const struct nla_policy dpll_pin_get_nl_policy[DPLL_A_PIN_ID + 1] = {
[DPLL_A_PIN_ID] = { .type = NLA_U32, },
};
@@ -133,16 +128,14 @@ static const struct genl_split_ops dpll_nl_ops[] = {
.pre_doit = dpll_pin_pre_doit,
.doit = dpll_nl_pin_get_doit,
.post_doit = dpll_pin_post_doit,
- .policy = dpll_pin_get_do_nl_policy,
+ .policy = dpll_pin_get_nl_policy,
.maxattr = DPLL_A_PIN_ID,
.flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
},
{
- .cmd = DPLL_CMD_PIN_GET,
- .dumpit = dpll_nl_pin_get_dumpit,
- .policy = dpll_pin_get_dump_nl_policy,
- .maxattr = DPLL_A_PIN_ID,
- .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
+ .cmd = DPLL_CMD_PIN_GET,
+ .dumpit = dpll_nl_pin_get_dumpit,
+ .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DUMP,
},
{
.cmd = DPLL_CMD_PIN_SET,