public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] libata-eh: Use switch() instead of sparse array for protocol strings
Date: Mon, 9 Jan 2017 15:31:07 -0500	[thread overview]
Message-ID: <20170109203107.GO12827@mtj.duckdns.org> (raw)
In-Reply-To: <CAMuHMdUVtQOJYfQsspSk9+v-4abGf+OTSMWEfzXvGLu9namqZg@mail.gmail.com>

Hello,

On Mon, Jan 09, 2017 at 09:28:12PM +0100, Geert Uytterhoeven wrote:
> > So, to avoid that, we can just kmalloc and kfree the buffer, but it
> > seems like a silly complication to work around bugs in some
> > bootloaders.  There are many places in kernel where we're liberal
> > about __initdata which is great.  I'm not sure complicating all those
> > places for a broken bootloader is a good idea.
> 
> Sure. We cannot avoid that kernels (esp. multiplatform) keep on growing.
> 
> But when I see a new 4KiB-sized buffer, i'm always suspicious...
> A few years ago, I caught someone miscalculating shifts, leading
> to a static buffer that was 256 times larger than intended ;-)

Oh, sure, things like the protocol string table are just stupid and
it's great that you caught it.  I just don't think it makes sense to
scrutinize bss __initdata.  It's not in kernel image and goes away
once the kernel boots.  It's okay to a bit liberal with them for the
sake of simplicity.

Thanks.

-- 
tejun

      reply	other threads:[~2017-01-09 20:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 14:49 [PATCH] libata-eh: Use switch() instead of sparse array for protocol strings Geert Uytterhoeven
2017-01-09 15:23 ` Tejun Heo
2017-01-09 15:40   ` Geert Uytterhoeven
2017-01-09 16:04     ` Tejun Heo
2017-01-09 16:21       ` Christoph Hellwig
2017-01-09 17:22         ` Christoph Hellwig
2017-01-09 17:30           ` Tejun Heo
2017-01-09 16:30       ` Geert Uytterhoeven
2017-01-09 17:27         ` Christoph Hellwig
2017-01-09 17:31           ` Tejun Heo
2017-01-09 18:25             ` Geert Uytterhoeven
2017-01-09 19:41               ` Tejun Heo
2017-01-09 20:28                 ` Geert Uytterhoeven
2017-01-09 20:31                   ` Tejun Heo [this message]

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=20170109203107.GO12827@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox