From: Brian Gerst <bgerst@didntduck.org>
To: Per Persson <per.persson@gnosjo.pp.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] search_one_table()
Date: Tue, 13 Nov 2001 17:42:38 -0500 [thread overview]
Message-ID: <3BF1A1DE.E1FF55D8@didntduck.org> (raw)
In-Reply-To: <NDBBJMOHILCIIKFHCBHAIEOECAAA.per.persson@gnosjo.pp.se>
Per Persson wrote:
>
> I found that gcc doesn't manage to do this rewrite itself. My micro-patch
> saves a few bytes. Also the code becomes a little bit cleaner (IMHO).
>
> Probably the same change could (and should) be made for the other
> architectures too.
>
> Per Persson
> per.persson@gnosjo.pp.se
>
> --- arch/i386/mm/extable.c.orig Mon Nov 12 00:13:52 2001
> +++ arch/i386/mm/extable.c Tue Nov 13 17:39:42 2001
> @@ -19,7 +19,7 @@
> const struct exception_table_entry *mid;
> long diff;
>
> - mid = (last - first) / 2 + first;
> + mid = (last + first) / 2
> diff = mid->insn - value;
> if (diff == 0)
> return mid->fixup;
>
This change will not work because of lost high bits due to overflow.
Remember that kernel addresses are in the 0xc0000000-0xffffffff range.
--
Brian Gerst
next prev parent reply other threads:[~2001-11-13 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-13 22:32 [PATCH] search_one_table() Per Persson
2001-11-13 22:42 ` Brian Gerst [this message]
2001-11-13 23:02 ` Robert Love
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=3BF1A1DE.E1FF55D8@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=per.persson@gnosjo.pp.se \
/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