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: <20231021.125125.1778736907764380293.fujita.tomonori@gmail.com>
Date: Sat, 21 Oct 2023 12:51:25 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: nmi@...aspace.dk
Cc: fujita.tomonori@...il.com, netdev@...r.kernel.org,
 rust-for-linux@...r.kernel.org, andrew@...n.ch,
 miguel.ojeda.sandonis@...il.com, tmgross@...ch.edu, boqun.feng@...il.com,
 wedsonaf@...il.com, benno.lossin@...ton.me, greg@...ah.com,
 ojeda@...nel.org
Subject: Re: [PATCH net-next v5 3/5] WIP rust: add second `bindgen` pass
 for enum exhaustiveness checking

On Fri, 20 Oct 2023 13:37:14 +0200
"Andreas Hindborg (Samsung)" <nmi@...aspace.dk> wrote:

> 
> FUJITA Tomonori <fujita.tomonori@...il.com> writes:
> 
>> From: Miguel Ojeda <ojeda@...nel.org>
>>
>>     error[E0005]: refutable pattern in function argument
>>          --> rust/bindings/bindings_enum_check.rs:29:6
>>           |
>>     29    |       (phy_state::PHY_DOWN
>>           |  ______^
>>     30    | |     | phy_state::PHY_READY
>>     31    | |     | phy_state::PHY_HALTED
>>     32    | |     | phy_state::PHY_ERROR
>>     ...     |
>>     35    | |     | phy_state::PHY_NOLINK
>>     36    | |     | phy_state::PHY_CABLETEST): phy_state,
>>           | |______________________________^ pattern `phy_state::PHY_NEW` not covered
>>           |
>>     note: `phy_state` defined here
>>          --> rust/bindings/bindings_generated_enum_check.rs:60739:10
>>           |
>>     60739 | pub enum phy_state {
>>           |          ^^^^^^^^^
>>     ...
>>     60745 |     PHY_NEW = 5,
>>           |     ------- not covered
>>           = note: the matched value is of type `phy_state`
>>
>> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
> 
> This patch does not build for me. Do I need to do something to make it
> work?

Hmm, this works for me.

Note that it depends on the first patch (the changes to binings_helper.h).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ