mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Tim Abbott <tabbott@ksplice.com>, Tim Bird <tim.bird@am.sony.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	linux-kernel@vger.kernel.org,
	Matt Fleming <matt@console-pimps.org>,
	linux-arch@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Michal Marek <mmarek@suse.cz>,
	Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: Testing of function/data-sections on linux-2.6.35-rc4
Date: Mon, 26 Jul 2010 09:23:50 +0200	[thread overview]
Message-ID: <20100726072350.GA10061@merkur.ravnborg.org> (raw)
In-Reply-To: <201007260252.57477.vda.linux@googlemail.com>

On Mon, Jul 26, 2010 at 02:52:57AM +0200, Denys Vlasenko wrote:
> On Friday 23 July 2010 21:10, Sam Ravnborg wrote:
> > > 
> > > * modpost fix for 64k+ sections: linux-2.6.35-rc4-fs.modpost.patch
> > >   This patch is in -mm, it still not reach mainline...
> > > 
> > 
> > Some comments below - but noting fundamental.
> >
> > +	/* Fixup for more than 64k sections */
> > +	info->num_sections = hdr->e_shnum;
> > +	if (info->num_sections == 0) { /* more than 64k sections? */
> > +		/* note: it doesn't need shndx2secindex() */
> > +		info->num_sections = TO_NATIVE(sechdrs[0].sh_size);
> > +	}
> > I had to read the above twice to get it.
> > How about something like this:
> > 
> > 	/* Fixup for more than 64k sections */
> > 	if (hdr->e_shnum == 0) {
> > 		/*
> > 		 * There are more than 64k sections,
> > 		 * read count from .sh_size.
> > 		 * note: it doesn't need shndx2secindex()
> > 		 */
> > 		info->num_sections = TO_NATIVE(sechdrs[0].sh_size);
> > 	}
> > 	else {
> > 		info->num_sections = hdr->e_shnum;
> > 	}
> > 
> > 
> > +	info->secindex_strings = hdr->e_shstrndx;
> > +	if (info->secindex_strings == SHN_XINDEX)
> > +		info->secindex_strings =
> > +		    shndx2secindex(TO_NATIVE(sechdrs[0].sh_link));
> > 
> > Likewise here...
> 
> Done both.
> 
> ...
> > -	for (i = 1; i < hdr->e_shnum; i++) {
> > -		const char *secstrings
> > -			= (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
> > +	secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset;
> > 
> > Moving this assignnet out of the loop is an unrelated
> > but welcome change.
> 
> I take you are ok with it?
> 
> Please find updated patch below.
> 
> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

If the patch get a proper changelog then it has my:

Acked-by: Sam Ravnborg <sam@ravnborg.org>

	Sam

  reply	other threads:[~2010-07-26  7:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-18 15:03 Denys Vlasenko
2010-07-18 18:24 ` Geert Uytterhoeven
2010-07-18 23:31   ` Denys Vlasenko
2010-07-23 19:10 ` Sam Ravnborg
2010-07-26  0:52   ` Denys Vlasenko
2010-07-26  7:23     ` Sam Ravnborg [this message]
2010-07-23 20:24 ` Sam Ravnborg
2010-07-26  1:29   ` Denys Vlasenko
2010-07-26  7:27     ` Sam Ravnborg
2010-07-23 20:29 ` Sam Ravnborg
2010-07-23 20:35 ` Sam Ravnborg
2010-07-26  1:31   ` Denys Vlasenko
2010-07-26  7:28     ` Sam Ravnborg

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=20100726072350.GA10061@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=mmarek@suse.cz \
    --cc=tabbott@ksplice.com \
    --cc=tim.bird@am.sony.com \
    --cc=vda.linux@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®