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: <CAMZ6RqJ4b6JM5rNeXhECkLWa6Af2pBXvGqsfZm673vO02dUuZA@mail.gmail.com>
Date:   Tue, 26 Oct 2021 10:36:10 +0900
From:   Vincent MAILHOL <mailhol.vincent@...adoo.fr>
To:     Marc Kleine-Budde <mkl@...gutronix.de>
Cc:     linux-can <linux-can@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 1/3] can: dev: replace can_priv::ctrlmode_static by can_get_static_ctrlmode()

On Tue. 26 Oct 2021 at 04:06, Marc Kleine-Budde <mkl@...gutronix.de> wrote:
> On 26.10.2021 02:22:36, Vincent MAILHOL wrote:
> > Welcome back on the mailing list, hope you had some nice
> > holidays!
>
> Thanks was really nice, good weather, 1000km of cycling and hanging
> around in Vienna. :D
>
> > And also thanks a lot for your support over the last
> > few months on my other series to introduce the TDC netlink
> > interface :)
>
> The pleasure is on my side, working with you!
>
> > Le lun. 25 oct. 2021 à 03:30, Marc Kleine-Budde <mkl@...gutronix.de> a écrit :
> > >
> > > On 09.10.2021 22:13:02, Vincent Mailhol wrote:
> > > > The statically enabled features of a CAN controller can be retrieved
> > > > using below formula:
> > > >
> > > > | u32 ctrlmode_static = priv->ctrlmode & ~priv->ctrlmode_supported;
> > > >
> > > > As such, there is no need to store this information. This patch remove
> > > > the field ctrlmode_static of struct can_priv and provides, in
> > > > replacement, the inline function can_get_static_ctrlmode() which
> > > > returns the same value.
> > > >
> > > > A condition sine qua non for this to work is that the controller
> > > > static modes should never be set in can_priv::ctrlmode_supported. This
> > > > is already the case for existing drivers, however, we added a warning
> > > > message in can_set_static_ctrlmode() to check that.
> > >
> > > Please make the can_set_static_ctrlmode to return an error in case of a
> > > problem. Adjust the drivers using the function is this patch, too.
> >
> > I didn't do so initially because this is more a static
> > configuration issue that should only occur during
> > development. Nonetheless, what you suggest is really simple.
> >
> > I will just split the patch in two: one of the setter and one for
> > the getter and address your comments.
>
> Fine with me. Most important thing is, that the kernel compiles after
> each patch.

Yep, the v3 [1] compiles fine after each patch. The only limitation is
that I could not do a runtime test for rcar_fd and m_can (second
patch of the v3 [2]) because I do not own the hardware.

[1] https://lore.kernel.org/linux-can/20211025172247.1774451-1-mailhol.vincent@wanadoo.fr/T/#t
[2] https://lore.kernel.org/linux-can/20211025172247.1774451-3-mailhol.vincent@wanadoo.fr/


Yours sincerely,
Vincent Mailhol

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ