linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: schwidefsky@de.ibm.com, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390: fix normalization bug in exception table sorting
Date: Mon, 4 Jan 2016 10:42:23 +0100	[thread overview]
Message-ID: <20160104094223.GA4179@osiris> (raw)
In-Reply-To: <1451651962-4180-1-git-send-email-ard.biesheuvel@linaro.org>

On Fri, Jan 01, 2016 at 01:39:22PM +0100, Ard Biesheuvel wrote:
> The normalization pass in the sorting routine of the relative exception
> table serves two purposes:
> - it ensures that the address fields of the exception table entries are
>   fully ordered, so that no ambiguities arise between entries with
>   identical instruction offsets (i.e., when two instructions that are
>   exactly 8 bytes apart each have an exception table entry associated with
>   them)
> - it ensures that the offsets of both the instruction and the fixup fields
>   of each entry are relative to their final location after sorting.
> 
> Commit eb608fb366de ("s390/exceptions: switch to relative exception table
> entries") ported the relative exception table format from x86, but modified
> the sorting routine to only normalize the instruction offset field and not
> the fixup offset field. The result is that the fixup offset of each entry
> will be relative to the original location of the entry before sorting,
> likely leading to crashes when those entries are dereferenced.

Applied, thanks a lot!

I was wondering why this never was observed on s390 during the last three
years.

The kernel text extable entries will be sorted during build time and I
verified that for the majority of modules the extable entries are already
sorted. And even if they are not sorted there isn't any major shuffling.
So it looks like we were simply lucky...


  reply	other threads:[~2016-01-04  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-01 12:39 [PATCH] s390: fix normalization bug in exception table sorting Ard Biesheuvel
2016-01-04  9:42 ` Heiko Carstens [this message]
2016-01-04  9:44   ` Ard Biesheuvel

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=20160104094223.GA4179@osiris \
    --to=heiko.carstens@de.ibm.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.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;
as well as URLs for NNTP newsgroup(s).