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] [day] [month] [year] [list]
Message-ID: <734c27f9-f39e-3cbc-6cc3-2c805fed4922@hartkopp.net>
Date:   Fri, 4 Jan 2019 10:28:35 +0100
From:   Oliver Hartkopp <socketcan@...tkopp.net>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        ieatmuttonchuan@...il.com, meissner@...e.de,
        linux-can@...r.kernel.org, linux-stable <stable@...r.kernel.org>
Subject: Re: [PATCH] can: gw: ensure DLC boundaries after CAN frame
 modification

Hi Michal,

On 1/4/19 10:01 AM, Michal Kubecek wrote:
> On Thu, Jan 03, 2019 at 10:03:47PM +0100, Oliver Hartkopp wrote:
>> 1. I'm still using the test "if (cf->can_dlc > 8)" with a proper comment as
>> CAN_MAX_DLC and CAN_MAX_DLEN are not defined in Linux stable 3.2 - so that
>> we can apply the patch to all versions of gw.c
> 
> I may be biased as substantial part of my work consists of trying to
> understand unfamiliar code written by other people but I believe
> readability of the code is more important than avoiding a bit of work
> with backport to older stable branches.

I am with you.
Please take a look into the new patch. I think either the comment and 
the commit message make it very clear where the value comes from.

E.g. in cgw_chk_csum_parms() we have tons of fixed constants that have 
been introduced when CAN FD was far away from thinking. I introduced 
CAN_MAX_DLC and CAN_MAX_DLEN myself when I started the CAN FD support in 
Linux. gw.c would need a rework for full CAN FD support - where these 
defines then definitely would be introduced.

In this single case the simple applying to stable kernels weighted more 
to me.

Regards,
Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ