[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201006123202.57898-1-johannes@sipsolutions.net>
Date: Tue, 6 Oct 2020 14:32:00 +0200
From: Johannes Berg <johannes@...solutions.net>
To: netdev@...r.kernel.org
Cc: dsahern@...il.com, Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH 0/2] netlink: export policy on validation failures
Export the policy used for attribute validation when it fails,
so e.g. for an out-of-range attribute userspace immediately gets
the valid ranges back.
Tested using nl80211/iw in a few scenarios, seems to work fine
and return the policy back, e.g.
kernel reports: integer out of range
policy: 04 00 0b 00 0c 00 04 00 01 00 00 00 00 00 00 00
^ padding
^ minimum allowed value
policy: 04 00 0b 00 0c 00 05 00 ff ff ff ff 00 00 00 00
^ padding
^ maximum allowed value
policy: 08 00 01 00 04 00 00 00
^ type 4 == U32
for an out-of-range case.
johannes
Powered by blists - more mailing lists