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]
Date:	Fri, 12 Jan 2007 23:31:29 +0100 (MET)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	"linux-os (Dick Johnson)" <linux-os@...logic.com>
cc:	Erik Mouw <erik@...ddisk-recovery.com>,
	Jesper Juhl <jesper.juhl@...il.com>,
	congwen <congwen@...il.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: How can I create or read/write a file in linux device driver?


On Jan 12 2007 09:27, linux-os (Dick Johnson) wrote:
>
>First, since file-operations require process context, and the kernel
>is not a process, you need to create a kernel thread to handle your file
>I/O.

Not always. If you do file I/O as part of a device driver, you are fine.
quad_dsp is such an example, where writing to /dev/Qdsp_* will trigger writes
to /dev/dsp and /dev/adsp.

>Once you set up this "internal environment," you use the appropriate
>kernel function(s) such as sys_open()

What against filp_open? That avoids the unnecessary getname() stuff in most
syscalls.


	-`J'
-- 
-
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