[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c454873-297d-4a70-ad37-975d2f22864c@intel.com>
Date: Tue, 3 Dec 2024 09:50:32 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Vladimir Oltean <olteanv@...il.com>
CC: Andrew Morton <akpm@...ux-foundation.org>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Tony Nguyen <anthony.l.nguyen@...el.com>, "Przemek
Kitszel" <przemyslaw.kitszel@...el.com>, Masahiro Yamada
<masahiroy@...nel.org>, netdev <netdev@...r.kernel.org>, Vladimir Oltean
<vladimir.oltean@....com>
Subject: Re: [PATCH net-next v7 2/9] lib: packing: demote truncation error in
pack() to a warning in __pack()
On 12/3/2024 4:43 AM, Vladimir Oltean wrote:
> On Mon, Dec 02, 2024 at 04:26:25PM -0800, Jacob Keller wrote:
>> From: Vladimir Oltean <vladimir.oltean@....com>
>>
>> Most of the sanity checks in pack() and unpack() can be covered at
>> compile time. There is only one exception, and that is truncation of the
>> uval during a pack() operation.
>>
>> We'd like the error-less __pack() to catch that condition as well. But
>> at the same time, it is currently the responsibility of consumer drivers
>> (currently just sja1105) to print anything at all when this error
>> occurs, and then discard the return code.
>>
>> We can just print a loud warning in the library code and continue with
>> the truncated __pack() operation. In practice, having the warning is
>> very important, see commit 24deec6b9e4a ("net: dsa: sja1105: disallow
>> C45 transactions on the BASE-TX MDIO bus") where the bug was caught
>> exactly by noticing this print.
>>
>> Add the first print to the packing library, and at the same time remove
>> the print for the same condition from the sja1105 driver, to avoid
>> double printing.
>>
>> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
>> ---
>
> Somehow this is missing your sign off.
Oops.
Powered by blists - more mailing lists