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: <20081022204800.GT4390@tekkaman>
Date:	Wed, 22 Oct 2008 22:48:01 +0200
From:	Rodolfo Giometti <giometti@...eenne.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	greg@...ah.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] Add c2 port support.

On Wed, Oct 22, 2008 at 01:01:50PM -0700, Andrew Morton wrote:
> > > <wonders what local_irq_disable() is supposed to achieve on SMP>
> > 
> > The SMP is achieved by mutex_lock(), the local_irq_disable() is used
> > to avoid interructions in code execution. C2 port has very stringent
> > timings.
> 
> Please add code comments explaning this (unless I missed them).

Ok.

> > +	if (!ret)
> > +		return ERR_PTR(-ENOMEM);
> 
> 		^^ leaks c2dev

Fixed.

> > +	if (unlikely(!c2dev->dev)) {
> > +		ret = -ENOMEM;
> > +		goto error_device_create;
> > +	};
> 
>          ^

Fixed.

> > > What I haven't yet got my head around is this:
> > > 
> > >   Currently this code supports only flash programming through sysfs
> > >   interface but extensions shoud be easy to add.
> > > 
> > > is that really what we want to use sysfs for?  As the prime interface
> > > to a device driver (or is it a bus driver?) Didn't we used to use
> > > device nodes for that sort of thing?
> > 
> > I decided to use this interface since the C2 ports are simple and very
> > easy to manage with such files abstraction.
> 
> well..  what _is_ the implemented interface?  What alternatives were
> considered and why were they judged inappropriate?  What interfaces do
> any similar in-tree drivers use?

Well... main reasons in using sysfs support are:

* no more char devices and new ioctls to define,

* the microcontrollers on-board flash can be easily programmed by
using only the "echo" and "cat" commands, so no more tools are needed
and even simply busybox can be used.

> > Whould you like I repropose the code with the fixed issues for your
> > review?

I repost the code.

Thanks,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti@...eenne.com
Linux Device Driver                          giometti@...ux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti
--
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