| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
netlink: specs: devlink: fix reply command values Make sure that the command values used for replies are correct. This is only affecting generated userspace helpers, no change on kernel code. Fixes: 7199c86247e9 ("netlink: specs: devlink: add commands that do per-instance dump") Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20231012115811.298129-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org> | 2 年前 | |
tools: ynl-gen: validate 0 len strings from kernel stable inclusion from stable-v6.6.93 commit 4e3401aa6e447fd90bda66e65f30479a93b8c9ad category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8365 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4e3401aa6e447fd90bda66e65f30479a93b8c9ad -------------------------------- [ Upstream commit 4720f9707c783f642332dee3d56dccaefa850e42 ] Strings from the kernel are guaranteed to be null terminated and ynl_attr_validate() checks for this. But it doesn't check if the string has a len of 0, which would cause problems when trying to access data[len - 1]. Fix this by checking that len is positive. Signed-off-by: David Wei <dw@davidwei.uk> Link: https://patch.msgid.link/20250503043050.861238-1-dw@davidwei.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 4e3401aa6e447fd90bda66e65f30479a93b8c9ad) Signed-off-by: Wentao Guan <guanwentao@uniontech.com> | 5 个月前 | |
ynl: print xdp-zc-max-segs in the sample Technically we don't have to keep extending the sample, but it feels useful to run these tools locally to confirm everything is working. Signed-off-by: Stanislav Fomichev <sdf@google.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230727163001.3952878-5-sdf@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> | 2 年前 | |
ynl: regenerate all headers Also add support to pass topdir to ynl-regen.sh (Jakub) and call it from the makefile to update the UAPI headers. Signed-off-by: Stanislav Fomichev <sdf@google.com> Co-developed-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230727163001.3952878-4-sdf@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> | 2 年前 | |
tools: ynl: improve the direct-include header guard logic Przemek suggests that I shouldn't accuse GCC of witchcraft, there is a simpler explanation for why we need manual define. scripts/headers_install.sh modifies the guard, removing _UAPI. That's why including a kernel header from the tree and from /usr leads to duplicate definitions. This also solves the mystery of why I needed to include the header conditionally. I had the wrong guards for most cases but ethtool. Suggested-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Link: https://lore.kernel.org/r/20230621231719.2728928-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> | 3 年前 | |
tools/net/ynl: Add support for create flags Add support for using NLM_F_REPLACE, _EXCL, _CREATE and _APPEND flags in requests. Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230825122756.7603-10-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> | 2 年前 | |
tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing stable inclusion from stable-v6.6.92 commit 7777ca11a40bb9041db3e6f5800d89f855e5f482 category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8365 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7777ca11a40bb9041db3e6f5800d89f855e5f482 -------------------------------- [ Upstream commit 45375814eb3f4245956c0c85092a4eee4441d167 ] Fix a crash in the ethtool YNL implementation when Hardware Clock information is not present in the response. This ensures graceful handling of devices or drivers that do not provide this optional field. e.g. Traceback (most recent call last): File "/net/tools/net/ynl/pyynl/./ethtool.py", line 438, in <module> main() ~~~~^^ File "/net/tools/net/ynl/pyynl/./ethtool.py", line 341, in main print(f'PTP Hardware Clock: {tsinfo["phc-index"]}') ~~~~~~^^^^^^^^^^^^^ KeyError: 'phc-index' Fixes: f3d07b02b2b8 ("tools: ynl: ethtool testing tool") Signed-off-by: Hangbin Liu <liuhangbin@gmail.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://patch.msgid.link/20250508035414.82974-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 7777ca11a40bb9041db3e6f5800d89f855e5f482) Signed-off-by: Wentao Guan <guanwentao@uniontech.com> | 6 个月前 | |
tools: ynl: add the Python requirements.txt file It is a good practice to state explicitly which are the required Python packages needed in a particular project to run it. The most commonly used way is to store them in the requirements.txt file*. *URL: https://pip.pypa.io/en/stable/reference/requirements-file-format/ Currently user needs to figure out himself that Python needs PyYAML and jsonschema (and theirs requirements) packages to use the tool. Add the requirements.txt for user convenience. How to use it: 1) (optional) Create and activate empty virtual environment: python3.X -m venv venv3X source ./venv3X/bin/activate 2) Install all the required packages: pip install -r requirements.txt or python -m pip install -r requirements.txt 3) Run the script! The requirements.txt file was tested for: * Python 3.6 * Python 3.8 * Python 3.10 Signed-off-by: Michal Michalik <michal.michalik@intel.com> Link: https://lore.kernel.org/r/20230323190802.32206-1-michal.michalik@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> | 3 年前 | |
tools: ynl-gen: add support for exact-len validation mainline inclusion from mainline-v6.7-rc1 commit 0c63ad3795269849782ca24a084952206986d3bf category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I9VYQ9 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0c63ad3795269849782ca24a084952206986d3bf -------------------------------- add support for 'exact-len' validation on netlink attributes. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/340 Acked-by: Matthieu Baerts <matttbe@kernel.org> Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: Mat Martineau <martineau@kernel.org> Link: https://lore.kernel.org/r/20231023-send-net-next-20231023-1-v2-2-16b1f701f900@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jackie Liu <liuyun01@kylinos.cn> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> | 2 年前 | |
tools: ynl: Specify --no-line-number in ynl-regen.sh. stable inclusion from stable-v6.6.122 commit 4170ec351e456c133255c76e3e50731c34694d6d category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/9064 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4170ec351e456c133255c76e3e50731c34694d6d -------------------------------- [ Upstream commit 68578370f9b3a2aba5964b273312d51c581b6aad ] If grep.lineNumber is enabled in .gitconfig, [grep] lineNumber = true ynl-regen.sh fails with the following error: $ ./tools/net/ynl/ynl-regen.sh -f ... ynl_gen_c.py: error: argument --mode: invalid choice: '4:' (choose from user, kernel, uapi) GEN 4: net/ipv4/fou_nl.c Let's specify --no-line-number explicitly. Fixes: be5bea1cc0bf ("net: add basic C code generators for Netlink") Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260115172533.693652-3-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 4170ec351e456c133255c76e3e50731c34694d6d) Signed-off-by: Wentao Guan <guanwentao@uniontech.com> | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 5 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 6 个月前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 个月前 |