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: <20080709145253.f658db37.akpm@linux-foundation.org>
Date:	Wed, 9 Jul 2008 14:52:53 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Uwe Kleine-König <Uwe.Kleine-Koenig@...i.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH v2] handle failure of irqchip->set_type in setup_irq

On Wed, 9 Jul 2008 15:13:53 +0200 Uwe Kleine-K__nig <Uwe.Kleine-Koenig@...i.com> wrote:

> Andrew Morton wrote:
> > On Fri, 4 Jul 2008 20:43:07 +0200 Uwe Kleine-K__nig <Uwe.Kleine-Koenig@...i.com> wrote:
> > 
> > > >                                            I wonder if we can do better.
> > > > Let me think about that.
> > > I was about to suggest something like:
> > >
> > >       /* WARNING: this returns a static pointer, so you cannot use the
> > >        * returned value after another call to creative_function_name
> > >        */
> > >       char *creative_function_name(void *addr)
> > >       {
> > >               static char buf[SOME_LENGTH];
> > >
> > >               ... format symbol name into buf ...
> > >
> > >               return buf;
> > >       }
> > >
> > > Then I could have used
> > >
> > >       pr_err("setting flow type for irq %u failed (%s)\n",
> > >                       irq, creative_function_name(chip->set_type));
> > >
> > > which looks definitely nicer.
> > 
> > Better would be
> > 
> >         char buf[ENOUGH /* rofl */];
> > 
> >         pr_err("setting flow type for irq %u failed (%s)\n",
> >                         irq, render_function_name(buf, chip->set_type));
> > 
> > However I'm presently brewing up a plot to do this:
> > 
> >         printk("function name is %Ss\n", (unsigned long *)chip->set_type);
> > 
> > which I think will work.  We can also do
> > 
> >         printk("IP address is %Si\n", (unsigned long *)ip_address_buffer);
> > 
> > to replace NIPQUAD.  And similar printk extensions.
> > 
> > Am still thinking about it though.
> I assume the result is 0fe1ef24f7bd0020f29ffe287dfdb9ead33ca0b2?

yup.

> Should I send a new version using %pF or is it easier if you fix up the
> patch?

A new version would be nice, thanks.  Or an incremental diff, but I can and
will turn new versions into an incremental in the twinkle of an eye, so
either is OK.
--
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