Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311737

Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init

From Andy Lutomirski <luto@amacapital.net>
Newsgroups linux.kernel
Subject Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init
Date 2016-01-18 19:30 +0100
Message-ID <qSmIW-4vc-15@gated-at.bofh.it> (permalink)
References (1 earlier) <qRERA-mf-1@gated-at.bofh.it> <qRFaV-v0-1@gated-at.bofh.it> <qRSUx-1gy-15@gated-at.bofh.it> <qSljR-3pb-13@gated-at.bofh.it> <qSmzg-4r1-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jan 18, 2016 at 10:14 AM, Borislav Petkov <bp@suse.de> wrote:
> On Mon, Jan 18, 2016 at 11:52:34AM -0500, Brian Gerst wrote:
>> It is due to page alignment padding.  It was not enough to lose a
>> whole page from .text in your case.
>
> So nothing more got freed.
>
>> The size command includes any section that is marked executable in the
>> text count, including init text.  If you use readelf -S vmlinux.o
>> instead you will notice that .text is the same size or smaller, and
>> .static_cpu_has (which is freed after boot) is the difference.
>
> So we're talking about less than a page here?
>
>   [19] .static_cpu_has   PROGBITS         ffffffff81d335d3  011335d3
>        00000000000002df  0000000000000000  AX       0     0     1
>
> That's 479 bytes. Meh, it doesn't look like it is worth the trouble.
>

I think that, if we can make static_cpu_has be unconditionally safe as
a result and get rid of warn_pre_alternatives, then it is worth the
trouble.

--Andy

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86: static_cpu_has_safe: discard dynamic check after init Brian Gerst <brgerst@gmail.com> - 2016-01-16 20:30 +0100
  Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-16 20:40 +0100
    Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Brian Gerst <brgerst@gmail.com> - 2016-01-16 21:00 +0100
      Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-17 11:40 +0100
        Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Brian Gerst <brgerst@gmail.com> - 2016-01-18 18:00 +0100
          Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Andy Lutomirski <luto@amacapital.net> - 2016-01-18 18:50 +0100
          Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-18 19:20 +0100
            Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Andy Lutomirski <luto@amacapital.net> - 2016-01-18 19:30 +0100
              Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-18 19:40 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-18 20:50 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-19 00:10 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-19 00:20 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-19 00:30 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-19 15:00 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-19 17:30 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-20 00:20 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Andy Lutomirski <luto@amacapital.net> - 2016-01-20 00:30 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Boris Petkov <bp@suse.de> - 2016-01-20 01:00 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 05:10 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-20 11:40 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 11:50 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-21 23:20 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-21 23:30 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-22 00:00 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-22 00:40 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-22 00:40 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-22 11:40 +0100
            Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-18 20:00 +0100
              Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-19 02:20 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-19 02:40 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-19 10:30 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 05:10 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Brian Gerst <brgerst@gmail.com> - 2016-01-20 05:40 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 05:50 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 12:00 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-20 12:10 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 15:50 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-20 12:00 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-20 16:10 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 16:20 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init Borislav Petkov <bp@suse.de> - 2016-01-20 17:10 +0100
                Re: [PATCH] x86: static_cpu_has_safe: discard dynamic check after  init "H. Peter Anvin" <hpa@zytor.com> - 2016-01-20 17:20 +0100

csiph-web