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: <20231007.164110.2300519476669399189.fujita.tomonori@gmail.com>
Date: Sat, 07 Oct 2023 16:41:10 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: andrew@...n.ch
Cc: fujita.tomonori@...il.com, gregkh@...uxfoundation.org,
 netdev@...r.kernel.org, rust-for-linux@...r.kernel.org,
 miguel.ojeda.sandonis@...il.com
Subject: Re: [PATCH v2 3/3] net: phy: add Rust Asix PHY driver

On Fri, 6 Oct 2023 17:57:41 +0200
Andrew Lunn <andrew@...n.ch> wrote:

>> Now I'm thinking that this is the best option. Kconfig would be the following:
>> 
>> config AX88796B_PHY
>>         tristate "Asix PHYs"
>>         help
>>          Currently supports the Asix Electronics PHY found in the X-Surf 100
>>          AX88796B package.
>> 
>> choice
>>         prompt "Implementation options"
>>         depends on AX88796B_PHY
>>         help
>>          There are two implementations for a driver for Asix PHYs; C and Rust.
>>          If not sure, choose C.
>> 
>> config AX88796B_C_PHY
>>         bool "The C version driver for Asix PHYs"
>> 
>> config AX88796B_RUST_PHY
>>         bool "The Rust version driver for Asix PHYs"
>>         depends on RUST
>> 
>> endchoice
>> 
>> 
>> No hack in Makefile:
>> 
>> obj-$(CONFIG_AX88796B_C_PHY)    += ax88796b.o
>> obj-$(CONFIG_AX88796B_RUST_PHY) += ax88796b_rust.o
> 
> This looks reasonable. Lets use this. But i still think we need some
> sort of RUST_PHYLIB_BINDING.

Sorry, I found that it doesn't work well when you try to build
AX88796B_PHY as a module.

With AX88796B_PHY=m, if you choose the C version, then you got
AX88796B_C_PHY=y; the driver will be built-in.

Seems that we need a trick in Makefile in any ways, I'll go with the
original version of this patch; the simplest, I think.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ