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: <Pine.LNX.4.60.0612112100220.4039@poirot.grange>
Date:	Mon, 11 Dec 2006 21:16:35 +0100 (CET)
From:	Guennadi Liakhovetski <g.liakhovetski@....de>
To:	Alan <alan@...rguk.ukuu.org.uk>
cc:	Corey Minyard <cminyard@...sta.com>,
	Tilman Schmidt <tilman@...p.cc>, linux-serial@...r.kernel.org,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Hansjoerg Lipp <hjlipp@....de>, Russell Doty <rdoty@...hat.com>
Subject: Re: [PATCH] Add the ability to layer another driver over the serial
 driver

On Mon, 11 Dec 2006, Alan wrote:

> > there as "protocols" for user-tty interfaces, i.e., you need a user, that 
> > opens a tty, sets a line discipline to it, and does io (read/write) over 
> > it, and NOT to be completely initialised and driven from the kernel.
> 
> Take a look at the SLIP driver. User space sets up the port but all the
> actual I/O is to/from the kernel not via user space.

Ok, to be specific, linkstation-like mpc8241-based NAS systems have an AVR 
perform power management functions, and it is connected over a UART. Some 
of the functions you have to perform:

1) disable the watchdog at startup otherwise it powers the system down in 
a few minutes. This is done by sending about 20 bytes to it - more than 
fits in UART's fifo. So, you need interrupts / polling. It is arguable 
whether this should be done / initialised from the user- or from the 
kernel-space. Earlier it was done from the user space completely, I put it 
into the kernel completely to get a runnable system even without 
user-space hacks.

2) run-time operation, like fan control, sensors, maybe some other 
functions. These all should and are currently done completely from a 
user-space process over a normal tty.

3) reboot / halt. Consists of 2 parts. The actual command, that can be 
sent earlier from the userspace too, and the final "commit", that actually 
reboots / powers down the system. That is the last command in platform's 
reboot / poweroff functions. Currently I do both parts from the kernel so 
with the current kernel you get a completely functional system with "any" 
generic distribution.

So, if we decide to put 1) in the user-space too, it becomes almost a 
normal line discipline with the only need to initiate io from the kernel 
for 3), which is just sending about 4 bytes over the port anyway, and can 
be (and is) just done in a tight infinite loop. But I'd prefer to keep 1) 
and 3) in the kernel and perform it without waiting for any user-space 
daemons...

What do you think?

Thanks
Guennadi
---
Guennadi Liakhovetski
-
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