Re: [RFC][PATCH 2.6.13-rc6] add Dell Systems Management Base Driver (dcdbas) with sysfs support

From: Valdis . Kletnieks
Date: Tue Aug 16 2005 - 01:46:06 EST


On Tue, 16 Aug 2005 01:10:23 CDT, Michael E Brown said:

> Ok, very nice. Finally some actual code review, thanks. :-)

I have to admit I'm not qualified to do a detailed review, but I try.. ;)

> These are all just standard CMOS port numbers that pretty much every
> chipset uses to access CMOS.

The Kconfig has 'depends on X86 || X86_64' - do we know for a fact that *all*
of these boxes have CMOS at that address, including some of the odder subarchs?

> If you have not got a PE1300, the worst that happens is you have some
> random bits scribbled into your CMOS. Nothing that that "cmos clear"
> jumper won't fix. :-)

That's assuming that you can figure out what happened to the box. ;)

> Seriously, this file is meant to be activated by a userspace program
> that looks up the system ID in the appropriate table and writes the
> correct value into the driver. I'm not sure there is much more to be
> said than "don't do that." The official Dell management stack will
> always ensure that this is set correctly. If you don't use the official
> Dell stack, libsmbios is available, and we would be happy to make the
> appropriate tables available there. If you don't use either of these and
> go fiddling with this, I'm not sure there is much more to be done.

Somehow, the concept that the kernel is trusting userspace to do the
verification before we trash the CMOS doesn't give the security geek in me
any warm-n-fuzzies, especially when we're not even checking that it's the
right vendor's gear...

> > Can we have a check that the machine is (a) a Dell and (b) has a PIIX and (c) the
> > PIIX has a functional SMI behind it, before we start doing outb() calls?
>
> I'll have to defer to Doug on this. It may be possible to arrange this.

That would be nice. I have a lot less issues with letting userspace scribble
a PE1300-specific value into a PE1300 than I do with letting it scribble that
same value into whatever happens to be at the address a PE1300 would be if it
was actually there.. ;)

Attachment: pgp00000.pgp
Description: PGP signature