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>] [day] [month] [year] [list]
Date:	Mon, 31 Oct 2011 16:21:32 +0100
From:	"dpc@...re.info" <dpc@...re.info>
To:	linux-kernel@...r.kernel.org
Subject: Virutal tty device settings problem.

Hi,

I'm writing a virtual console driver for paravirtualized setup.

Use case: being able to access paravirtualized guest consoles from "domain 0".

It's similar to HVCS, as I've been analyzing how it works.


Basically in my driver there's a frontend and backend. Backend is used
by domain 0 exposing tty devices: each for every other guest. One can
attach cu/minicom to such device and access guest console.

The frontend is working on the other guest side and communicate via
shared memory/virtual IRQs with backend. It exposes on tty device for
system console / getty.


Little illustration:

|               GUEST 0               |                  |
 GUEST 1                 |
tty device <--> kernel backend driver <--> magic here <--> kernel
frontend driver <--> tty device
(minicom/cu)
                  (getty)


I have the communication working and my driver transmits bytes between
domain 0 and other systems. So the "magic here" can be considered a
bytestream. But I'm lost with all the modes, cr/nl etc. conversions.

I don't understand which part of the kernel is responsible for NL / CR
conversions, what modes should I use on each side of the driver and
stuff like this. At the moment, from what I understand it seems that
some of termios flags are handled above tty driver layer, and other
should be handled inside/below it. Can anyone point me to documents
explaining this things or explain how should I handle this so that the
scenario from the illustration is working seamlessly?

Any help will be much appreciated.
-- 
Dawid Ciężarkiewicz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ