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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7b9198260805230520t46d79d9bqceabf4691388e89d@mail.gmail.com>
Date:	Fri, 23 May 2008 13:20:50 +0100
From:	"Tom Spink" <tspink@...il.com>
To:	"Hans J. Koch" <hjk@...utronix.de>
Cc:	"Uwe Kleine-König" <Uwe.Kleine-Koenig@...i.com>,
	linux-kernel@...r.kernel.org,
	"Greg Kroah-Hartman" <gregkh@...e.de>,
	"Jan Altenberg" <jan.altenberg@...utronix.de>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Magnus Damm" <magnus.damm@...il.com>
Subject: Re: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts

2008/5/23 Hans J. Koch <hjk@...utronix.de>:
> Am Fri, 23 May 2008 13:00:17 +0100
> schrieb "Tom Spink" <tspink@...il.com>:
>
>> My initial idea was just a thought anyway, just to
>> maintain a bit of extensibility if .write is ever needed for something
>> else. :-)
>
> Hi Tom,
> thanks for your contribution, but for me it's just the other way round:
> I'm glad write() gets a defined purpose before people do something
> stupid with it. It's good to remember that all data exchange with the
> device has to be done through the mapped memory. If this is not
> possible, the hardware is no candidate for a UIO driver.
>
> BTW, I wait for the first UIO driver which abuses this write()
> function to write many different values to trigger different actions.
> I wonder if I should restrict write() to the value 0 and 1...
>
> Thanks,
> Hans

Hi Hans,

Thanks for your explanation.  Another thing, I noticed then, is that
in your return statement, you blindly return the the value of
irqcontrol if it's non-zero, and if it's zero, then the length of the
data written.  However, if irqcontrol returns a value that's > 0, it
could potentially confuse writers.  I guess it's up to the implementer
of irqcontrol to ensure they stick to -EXXX and 0, but it's just a
thought (while you were on the subject of input validation!)

-- 
Tom Spink
--
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