lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190327201237.GG14297@nanopsycho>
Date:   Wed, 27 Mar 2019 21:12:37 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        John Linville <linville@...driver.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v5 12/22] ethtool: provide string sets with
 GET_STRSET request

Mon, Mar 25, 2019 at 06:08:30PM CET, mkubecek@...e.cz wrote:
>Requests a contents of one or more string sets, i.e. indexed arrays of
>strings; this information is provided by ETHTOOL_GSSET_INFO and
>ETHTOOL_GSTRINGS commands of ioctl interface. There are three types of
>requests:
>
>  - no NLM_F_DUMP, no device: get "global" stringsets
>  - no NLM_F_DUMP, with device: get string sets related to the device
>  - NLM_F_DUMP, no device: get device related string sets for all devices
>
>It's possible to request all string sets of given type or only specific
>sets. With ETHA_STRSET_COUNTS flag, only set sizes (number of strings) are
>returned.
>
>Signed-off-by: Michal Kubecek <mkubecek@...e.cz>
>---
> Documentation/networking/ethtool-netlink.txt |  46 +-
> include/uapi/linux/ethtool.h                 |   2 +
> include/uapi/linux/ethtool_netlink.h         |  43 ++
> net/ethtool/Makefile                         |   2 +-
> net/ethtool/netlink.c                        |   8 +
> net/ethtool/netlink.h                        |   4 +
> net/ethtool/strset.c                         | 447 +++++++++++++++++++
> 7 files changed, 549 insertions(+), 3 deletions(-)
> create mode 100644 net/ethtool/strset.c

First of all, the code is hard to follow. For reasons I mentioned in
other replies (lack of prefixes, wrappers, etc).

More importantly, why do we need this? This concept of having strings in
kernel for various things and features and sending them to userspace is
weird. Certainly not common for Netlink interface. I believe these
strings should be avoided and all should be communicated to userspace
and back in form of well-defined Netlink attributes. We are introducing
new Netlink API, lets do it properly and don't bring baggage from past.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ