mbox series

[bionic] LP#1758856 -- retpoline hinting support

Message ID 20180326150745.GE4775@brain
State New
Headers show
Series [bionic] LP#1758856 -- retpoline hinting support | expand

Pull-request

git://git.launchpad.net/~apw/ubuntu/+source/linux/+git/review retpoline-hints/bionic

Message

Andy Whitcroft March 26, 2018, 3:07 p.m. UTC
We have been having horrible problems with the retpoline information as
recorded in the ABI changing on every update.  The below pull-request
brings in some new support utilising the upstream retpoline annotations.
As well as bringing in some new annotations where needed.

This should in time bring us to the situation where the retpoline
information for every branch is empty.  Where unannotated entries remain
they are in review and will be coverered off in later updates.  These
are not regressions.

Proposing for bionic.

-apw


The following changes since commit 280c11a2a93bb05d799367f104f2db29a7e5f346:

  UBUNTU: Config: Set TRANSPARENT_HUGEPAGE_ALWAYS=y on ppc64el (2018-03-21 13:40:49 -0300)

are available in the Git repository at:

  git://git.launchpad.net/~apw/ubuntu/+source/linux/+git/review retpoline-hints/bionic

for you to fetch changes up to 7404320080e8eba3e8b4086d732762f24e33c5fa:

  UBUNTU: [Config] retpoine -- switch to new format (2018-03-26 11:48:57 +0100)

----------------------------------------------------------------
  * retpoline hints: primary infrastructure and initial hints (LP: #1758856)
    - [Packaging] retpoline -- add safe usage hint support
    - [Packaging] retpoline-check -- only report additions
    - [Packaging] retpoline -- widen indirect call/jmp detection
    - [Packaging] retpoline -- elide %rip relative indirections
    - [Packaging] retpoline -- clear hint information from packages
    - SAUCE: apm -- annotate indirect calls within
      firmware_restrict_branch_speculation_{start,end}
    - SAUCE: EFI -- annotate indirect calls within
      firmware_restrict_branch_speculation_{start,end}
    - SAUCE: early/late -- annotate indirect calls in early/late initialisation
      code
    - SAUCE: vga_set_mode -- avoid jump tables
    - [Config] retpoine -- switch to new format

Comments

Seth Forshee March 27, 2018, 10:23 p.m. UTC | #1
On Mon, Mar 26, 2018 at 04:07:45PM +0100, Andy Whitcroft wrote:
> We have been having horrible problems with the retpoline information as
> recorded in the ABI changing on every update.  The below pull-request
> brings in some new support utilising the upstream retpoline annotations.
> As well as bringing in some new annotations where needed.
> 
> This should in time bring us to the situation where the retpoline
> information for every branch is empty.  Where unannotated entries remain
> they are in review and will be coverered off in later updates.  These
> are not regressions.
> 
> Proposing for bionic.

I tested this with bionic, for non-amd64 arches I'm getting an error
packaging the headers:

# We do not need the retpoline information.
find /tmp/kernel-sforshee-dc36af1-llEk/build/debian/linux-headers-4.15.0-14-generic/usr/src/linux-headers-4.15.0-14-generic -name \*.o.ur-\* | xargs rm
rm: missing operand

Surprisingly I got that for i386 too, which I would have expected to
have some of these files.
Andy Whitcroft March 28, 2018, 2:57 p.m. UTC | #2
On Tue, Mar 27, 2018 at 05:23:52PM -0500, Seth Forshee wrote:
> On Mon, Mar 26, 2018 at 04:07:45PM +0100, Andy Whitcroft wrote:
> > We have been having horrible problems with the retpoline information as
> > recorded in the ABI changing on every update.  The below pull-request
> > brings in some new support utilising the upstream retpoline annotations.
> > As well as bringing in some new annotations where needed.
> > 
> > This should in time bring us to the situation where the retpoline
> > information for every branch is empty.  Where unannotated entries remain
> > they are in review and will be coverered off in later updates.  These
> > are not regressions.
> > 
> > Proposing for bionic.
> 
> I tested this with bionic, for non-amd64 arches I'm getting an error
> packaging the headers:
> 
> # We do not need the retpoline information.
> find /tmp/kernel-sforshee-dc36af1-llEk/build/debian/linux-headers-4.15.0-14-generic/usr/src/linux-headers-4.15.0-14-generic -name \*.o.ur-\* | xargs rm
> rm: missing operand
> 
> Surprisingly I got that for i386 too, which I would have expected to
> have some of these files.

You only get it is something 'prepare' creates has .o files, which is
only objtool which is only amd64.  The error should be benign, but
changing that to xargs rm -f would be appropriate there.

-apw
Seth Forshee March 28, 2018, 3:31 p.m. UTC | #3
On Wed, Mar 28, 2018 at 03:57:25PM +0100, Andy Whitcroft wrote:
> On Tue, Mar 27, 2018 at 05:23:52PM -0500, Seth Forshee wrote:
> > On Mon, Mar 26, 2018 at 04:07:45PM +0100, Andy Whitcroft wrote:
> > > We have been having horrible problems with the retpoline information as
> > > recorded in the ABI changing on every update.  The below pull-request
> > > brings in some new support utilising the upstream retpoline annotations.
> > > As well as bringing in some new annotations where needed.
> > > 
> > > This should in time bring us to the situation where the retpoline
> > > information for every branch is empty.  Where unannotated entries remain
> > > they are in review and will be coverered off in later updates.  These
> > > are not regressions.
> > > 
> > > Proposing for bionic.
> > 
> > I tested this with bionic, for non-amd64 arches I'm getting an error
> > packaging the headers:
> > 
> > # We do not need the retpoline information.
> > find /tmp/kernel-sforshee-dc36af1-llEk/build/debian/linux-headers-4.15.0-14-generic/usr/src/linux-headers-4.15.0-14-generic -name \*.o.ur-\* | xargs rm
> > rm: missing operand
> > 
> > Surprisingly I got that for i386 too, which I would have expected to
> > have some of these files.
> 
> You only get it is something 'prepare' creates has .o files, which is
> only objtool which is only amd64.  The error should be benign, but
> changing that to xargs rm -f would be appropriate there.

Thanks, applied to bionic/master-next with this change.