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: <171275126085.4303.2994301700079496197@kwain>
Date: Wed, 10 Apr 2024 14:14:20 +0200
From: Antoine Tenart <atenart@...nel.org>
To: Jason Xing <kerneljasonxing@...il.com>, davem@...emloft.net, dsahern@...nel.org, edumazet@...gle.com, geliang@...nel.org, kuba@...nel.org, martineau@...nel.org, mathieu.desnoyers@...icios.com, matttbe@...nel.org, mhiramat@...nel.org, pabeni@...hat.com, rostedt@...dmis.org
Cc: mptcp@...ts.linux.dev, linux-trace-kernel@...r.kernel.org, netdev@...r.kernel.org, kerneljasonxing@...il.com, Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH net-next v3 2/6] rstreason: prepare for passive reset

Quoting Jason Xing (2024-04-09 12:09:30)
>         void            (*send_reset)(const struct sock *sk,
> -                                     struct sk_buff *skb);
> +                                     struct sk_buff *skb,
> +                                     int reason);

I get that 'int' is used instead of 'enum sk_rst_reason' to allow
passing drop reasons too without casting, but that makes understanding
what should be 'reason' harder. Eg. when looking at the code or when
using BTF (to then install debugging probes with BPF) this is not
obvious.

A similar approach could be done as the one used for drop reasons: enum
skb_drop_reason is used for parameters (eg. kfree_skb_reason) but other
valid values (subsystem drop reasons) can be used too if casted (to
u32). We could use 'enum sk_rst_reason' and cast the other values. WDYT?

Thanks,
Antoine

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ