xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH for-4.10 2/2] ubsan: disable unaligned access checks
Date: Tue, 17 Oct 2017 14:01:42 +0100	[thread overview]
Message-ID: <20171017130142.e62pcswnr6bwg2up@citrix.com> (raw)
In-Reply-To: <20171017125847.6vrsp3cstphsbloz@dhcp-3-128.uk.xensource.com>

On Tue, Oct 17, 2017 at 01:58:47PM +0100, Roger Pau Monné wrote:
> On Tue, Oct 17, 2017 at 01:56:18PM +0100, Wei Liu wrote:
> > On Tue, Oct 17, 2017 at 12:36:44PM +0100, Roger Pau Monne wrote:
> > > Currently there are many offenders of the unaligned access checks,
> > > which makes booting with the unaligned check a PVH Dom0 impossible.
> > > 
> > > The main offenders seem to be the ACPI code, the VMX code and
> > > specially the intremap code (set_ire_sid).
> > > 
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > ---
> > > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > > Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> > > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > > Cc: Jan Beulich <jbeulich@suse.com>
> > > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > > Cc: Stefano Stabellini <sstabellini@kernel.org>
> > > Cc: Tim Deegan <tim@xen.org>
> > > Cc: Wei Liu <wei.liu2@citrix.com>
> > > Cc: Julien Grall <julien.grall@arm.com>
> > > ---
> > > I'm not sure whether we prefer to fix the offenders, or just disable
> > > the alignment wholesale. In any case if we decide to disable the
> > > check, the patch should have vary low impact, and hence should be
> > > committed to 4.10 on the base that it only affects ubsan, which is not
> > > enabled by default and not to be used on production systems.
> > 
> > I would very much like to fix the offenders but if the fixes turn out to
> > be cumbersome, so be it.
> > 
> > What is wrong to leave this enabled? Each location is reported once,
> > right?
> 
> With clang it's reported every time it's hit AFAICT (certainly more
> than once).
> 

It could also be the case that some functions are inlined so they could
appear multiple times, i.e. they have different instances of struct
location? I've also seen something like that before.

The code in ubsan.c already deals with setting the reported bit so I
suspect after all the instances have been marked reported Xen should run
fine?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-10-17 13:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 11:36 [PATCH for-4.10 1/2] ubsan: add clang 5.0 support Roger Pau Monne
2017-10-17 11:36 ` [PATCH for-4.10 2/2] ubsan: disable unaligned access checks Roger Pau Monne
2017-10-17 12:45   ` Jan Beulich
2017-10-17 12:56   ` Wei Liu
2017-10-17 12:58     ` Roger Pau Monné
2017-10-17 13:01       ` Wei Liu [this message]
2017-10-17 13:12       ` Andrew Cooper
2017-10-17 12:43 ` [PATCH for-4.10 1/2] ubsan: add clang 5.0 support Jan Beulich
2017-10-17 12:57   ` Roger Pau Monné
2017-10-17 13:04     ` Jan Beulich

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=20171017130142.e62pcswnr6bwg2up@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).