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: <20100621194559.GI3217@redhat.com>
Date:	Mon, 21 Jun 2010 15:45:59 -0400
From:	Don Zickus <dzickus@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Prarit Bhargava <prarit@...hat.com>, linux-kernel@...r.kernel.org,
	Randy Dunlap <randy.dunlap@...cle.com>,
	alan@...rguk.ukuu.org.uk
Subject: Re: [PATCH] Add TAINT_HARDWARE_UNSUPPORTED flag

On Mon, Jun 21, 2010 at 12:21:45PM -0700, Andrew Morton wrote:
> > @@ -243,6 +245,9 @@ void add_taint(unsigned flag)
> >  	 */
> >  	if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off())
> >  		printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n");
> > +	if (flag == TAINT_HARDWARE_UNSUPPORTED)
> > +		printk(KERN_CRIT
> > +		       "WARNING: This system's hardware is unsupported.\n");
> >  
> >  	set_bit(flag, &tainted_mask);
> >  }
> 
> That's pretty user-hostile.  What are they to do - throw the entire
> computer away because it has the wrong type of mouse?
> 
> How about
> 
> void add_hardware_unsupported_taint(const char *hardware)
> {
> 	printk(KERN_CRIT
> 	       "Hardware device %s is unsupported by this kernel's vendor\n",
> 		hardware);
> 	add_taint(TAINT_HARDWARE_UNSUPPORTED);
> }
> 
> and
> 
> /*
>  * Don't call add_taint(TAINT_HARDWARE_UNSUPPORTED) directly - use
>  * add_hardware_unsupported_taint()
>  */
> #define TAINT_HARDWARE_UNSUPPORTED	12

Internally here that is how we planned on using the flag.  We weren't sure
if upstream would accept that piece or not, so we started with the flag
for now to at least reserve the bit.

But I can see your point about the other printk being a little
user-hostile if someone forgot to call the wrapper function.

I can respin with the wrapper function (Prarit is on vacation) or go with
Alan's idea of just reserving the upper few bits.

Thoughts?

Cheers,
Don
--
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