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: <20220705123912.1dfc6242.max@enpas.org>
Date:   Tue, 5 Jul 2022 12:39:12 +0200
From:   Max Staudt <max@...as.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Marc Kleine-Budde <mkl@...gutronix.de>,
        Wolfgang Grandegger <wg@...ndegger.com>,
        linux-can@...r.kernel.org,
        Vincent Mailhol <vincent.mailhol@...il.com>,
        Oliver Neukum <oneukum@...e.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Vincent Mailhol <mailhol.vincent@...adoo.fr>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Oliver Hartkopp <socketcan@...tkopp.net>
Subject: Re: [PATCH v9] can, tty: can327 CAN/ldisc driver for ELM327 based
 OBD-II adapters

On Tue, 5 Jul 2022 12:16:08 +0200
Geert Uytterhoeven <geert@...ux-m68k.org> wrote:

> > > > I had a quick glance through the various revisions posted, and
> > > > it doesn't seem like anyone mentioned the serial bus.  Would
> > > > there be any advantage in migrating to the serial bus?  
> > >
> > > Does serial bus work with hot plug devices like USB Serial
> > > Adapters and/or devices that are not described in the device
> > > tree?  
> 
> Probably it cannot work with hot-plug devices yet.
> And devices must be described in some way (DT, ACPI), it does not
> support auto-detect.

Correct!


> So far I've seen serial bus used with e.g. bluetooth and DT.
> I'm wondering if/how people use it with bluetooth connected to a
> hot-pluggable device like usb-serial.

They don't :)

serdev is (currently, still, AFAIK) only for devices permanently
attached to a platform - hence they can be reliably described as part
of the platform itself, be it via DT or ACPI or whatever. So the fact,
say, that the "Nokia N900" has a BT module permanently soldered to "UART
2", that's something you can encode in its DT, because it applies to
this device, and this device only.

The ELM327 and clones are merely naked USB/BT-UART bridges with default
VID/PID to the computer, and some variants are classic RS232 devices.
No way to identify them, as they can appear/disappear on any UART,
anywhere. So you need to attach them manually - and to my knowledge,
such a manual mechanism is still missing from serdev. So we have to use
a line discipline, as that has an API to attach from userspace.

This also explains how to use Bluetooth via USB: Either it's a VID/PID
known to some driver speaking native USB, or... well, for UARTs there's
btattach and hciattach (both part of BlueZ), and both use the N_HCI
line discipline. No serdev involved. I don't know if any USB-UART-BT
device with a unique VID/PID exists, and I don't know whether serdev
could be attached kernel-side in this case.


Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ