All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Don Zickus <dzickus@redhat.com>
Cc: Prarit Bhargava <prarit@redhat.com>,
	linux-kernel@vger.kernel.org,
	Randy Dunlap <randy.dunlap@oracle.com>,
	alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] Add TAINT_HARDWARE_UNSUPPORTED flag
Date: Mon, 21 Jun 2010 13:00:08 -0700	[thread overview]
Message-ID: <20100621130008.d3dc01a8.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100621194559.GI3217@redhat.com>

On Mon, 21 Jun 2010 15:45:59 -0400
Don Zickus <dzickus@redhat.com> wrote:

> 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)

Not telling the user _which_ hardware is causing the problem is daft.

> or go with
> Alan's idea of just reserving the upper few bits.

um.  Given that the vendor needs to patch the individual drivers to
indicate ther unsupported status, why not just patch in the taint
changes as well?



  reply	other threads:[~2010-06-21 20:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 13:54 [PATCH] Add TAINT_HARDWARE_UNSUPPORTED flag Prarit Bhargava
2010-06-17 16:13 ` Randy Dunlap
2010-06-17 19:54   ` Prarit Bhargava
2010-06-17 20:28     ` Randy Dunlap
2010-06-21 19:21     ` Andrew Morton
2010-06-21 19:45       ` Don Zickus
2010-06-21 20:00         ` Andrew Morton [this message]
2010-06-21 20:46           ` Don Zickus
2010-06-22 15:34           ` [PATCH v3] " Don Zickus
2010-06-22 15:48             ` Alan Cox
2010-06-22 16:38               ` Matthew Garrett
2010-06-22 16:57                 ` Alan Cox
2010-06-22 17:04                   ` Matthew Garrett
2010-06-23  3:06                     ` Paul Mundt
2010-06-23  3:30                       ` Matthew Garrett
2010-06-23 20:00                         ` Don Zickus
2010-06-22 18:58               ` [PATCH v4] " Don Zickus
2010-07-06 20:33                 ` Don Zickus
2010-07-06 22:18                   ` Alan Cox
2010-06-19  8:40 ` [PATCH] " Andi Kleen
2010-06-19  9:30 ` Alan Cox
2010-06-21 13:26   ` Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100621130008.d3dc01a8.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dzickus@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prarit@redhat.com \
    --cc=randy.dunlap@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.