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: <1304520382-sup-3361@sfl>
Date:	Wed, 04 May 2011 11:15:50 -0400
From:	Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Jonas Fonseca <jonas.fonseca@...oirfairelinux.com>,
	platform-driver-x86 <platform-driver-x86@...r.kernel.org>,
	linux-serial <linux-serial@...r.kernel.org>,
	lm-sensors <lm-sensors@...sensors.org>
Subject: Re: [RFC 1/5] platform-drivers-x86: add support for Technologic Systems TS-5xxx detection

Excerpts from Alan Cox's message of 2011-04-30 06:07:05 -0400:
> > +
> > +/**
> > + * ts_sbcinfo_detect() - detect the TS board
> > + * @sbcinfo:        structure where to store the detected board's info.
> > + */
> > +static int ts_sbcinfo_detect(struct ts5xxx_sbcinfo *sbcinfo)
> > +{
> > +    u8 temp;
> > +    struct ts_sbc_config *sbc;
> > +    int ret = 0;
> > +
> > +    memset(sbcinfo, 0, sizeof(*sbcinfo));
> > +
> > +    if (!request_region(IOADDR_SBCID, 4, "TS-SBC"))
> > +        return -EBUSY;
> > +
> > +    temp = inb(IOADDR_SBCID);
> > +    /* If it is a 3x00 SBC only match against the first 3 bits */
> > +    if (temp & 0x07)
> > +        temp &= 0x07;
> 
> So if this is compiled into a kernel we blindly inb this address and some
> platform just crashed on boot. Is this board like other embedded ones in
> that there is some safe way to check if its such a board first ?
> 

It is possible to make a BIOS call (Int 15h / Function B000h) to get
board information, like the manufacturer ("TS"). It should be a safer
way to check if we are on a Technologic Systems board. a intcall(0x15,
&ireg, &oreg) should do the trick to check the platform, before checking
the SBC ID. What do you think?

Thanks,
Vivien.
--
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