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: <a447d09485adf8103b7bb738caff79136dc7bf1b.camel@hexdev.de>
Date: Thu, 09 May 2024 19:07:04 +0200
From: Christoph Fritz <christoph.fritz@...dev.de>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Jiri Slaby <jirislaby@...nel.org>, Oliver Hartkopp
 <socketcan@...tkopp.net>,  Marc Kleine-Budde <mkl@...gutronix.de>, Vincent
 Mailhol <mailhol.vincent@...adoo.fr>, "David S . Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
 <kuba@...nel.org>,  Paolo Abeni <pabeni@...hat.com>, Rob Herring
 <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,  Conor Dooley
 <conor+dt@...nel.org>, Jiri Kosina <jikos@...nel.org>, Benjamin Tissoires
 <bentiss@...nel.org>,  Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Sebastian Reichel <sre@...nel.org>, Linus Walleij
 <linus.walleij@...aro.org>, Andreas Lauser
 <andreas.lauser@...cedes-benz.com>,  Jonathan Corbet <corbet@....net>,
 Pavel Pisa <pisa@....felk.cvut.cz>, linux-can@...r.kernel.org,  Netdev
 <netdev@...r.kernel.org>, devicetree@...r.kernel.org,
 linux-input@...r.kernel.org,  linux-serial <linux-serial@...r.kernel.org>
Subject: Re: [PATCH v3 09/11] can: lin: Handle rx offload config frames

On Mon, 2024-05-06 at 20:11 +0300, Ilpo Järvinen wrote:
> On Thu, 2 May 2024, Christoph Fritz wrote:
> 
> > The CAN Broadcast Manager now has the capability to dispatch CANFD
> > frames marked with the id LINBUS_RXOFFLOAD_ID. This patch introduces
> > functionality to interpret these specific frames, enabling the
> > configuration of RX offloading within the LIN driver.
> > 
> > Signed-off-by: Christoph Fritz <christoph.fritz@...dev.de>
> > ---
> >  drivers/net/can/lin.c | 29 +++++++++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> > 
> > diff --git a/drivers/net/can/lin.c b/drivers/net/can/lin.c
> > index 95906003666fb..ee2ebea2c865f 100644
> > --- a/drivers/net/can/lin.c
> > +++ b/drivers/net/can/lin.c
> > @@ -194,6 +194,27 @@ static void lin_remove_sysfs_id_files(struct net_device *ndev)
> >  	}
> >  }
> >  
> > +static int lin_setup_rxoffload(struct lin_device *ldev,
> > +			       struct canfd_frame *cfd)
> > +{
> > +	struct lin_responder_answer answ;
> > +
> > +	if (!(cfd->flags & CANFD_FDF))
> > +		return -EMSGSIZE;
> 
> This seems a bit odd error code.

OK, will be changed in v4 to more common -EINVAL.

> 
> > +	BUILD_BUG_ON(sizeof(struct lin_responder_answer) > sizeof(cfd->data));
> > +	memcpy(&answ, cfd->data, sizeof(struct lin_responder_answer));
> 
> 2x sizeof(answ)

OK

...

thanks
  -- Christoph


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ