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]
Date:   Sat, 11 Jun 2022 13:18:51 +0800
From:   Jiaqing Zhao <jiaqing.zhao@...ux.intel.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Samuel Mendoza-Jonas <sam@...dozajonas.com>,
        "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        openbmc@...ts.ozlabs.org
Subject: Re: [PATCH v2 0/6] Configurable VLAN mode for NCSI driver

On 2022-06-11 12:45, Jakub Kicinski wrote:
> On Sat, 11 Jun 2022 11:25:03 +0800 Jiaqing Zhao wrote:
>>> Why is "ncsi,vlan-mode" set via the device tree? Looks like something
>>> that can be configured at runtime.   
>>
>> Actually this cannot be configured at runtime, the NCSI spec defines no
>> command or register to determine which mode is supported by the device.
> 
> To be clear I'm not saying that it should be auto-detected and
> auto-configured. Just that user space can issue a command to change 
> the config.
> 
>> If kernel want to enable VLAN on the NCSI device, either "Filtered tagged
>> + Untagged" (current default) or "Any tagged + untagged" mode should be
>> enabled, but unfortunately both of these two modes are documented to be
>> optionally supported in the spec. And in real cases, there are devices
>> that only supports one of them, or neither of them. So I added the device
>> tree property to configure which mode to use.
> 
> But for a given device its driver knows what modes are supported.
> Is it not possible to make the VLAN mode passed thru ncsi-netlink?
> 
> Better still, can't "Filtered tagged + Untagged" vs "Any tagged +
> untagged" be decided based on netdev features being enabled like it
> is for normal netdevs?

All ncsi devices uses the same driver as they uses same command set,
so the driver doesn't know what modes are supported. And in current
driver, the vlan related parameters are configured when registering
the device, adding an ncsi-netlink command to do so seems to be
unsuitable.

And adding a netlink command requires extra application in userspace
to switch the mode. In my opinion, it would be more user-friendly to
make it usable on boot.

Netdev also does not work as the ncsi device itself does not have
its own netdev, the netdev comes from the mac device. For different
vlan modes, the netdev feature set of its parent mac device are the
same.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ