Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1666575
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | "Izumi, Taku" <izumi.taku@jp.fujitsu.com> |
| Newsgroups | linux.kernel |
| Subject | RE: [RFC][PATCH 0/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions if existed |
| Date | Thu, 15 Jun 2017 10:50:03 +0200 |
| Message-ID | <tSyDx-cv-37@gated-at.bofh.it> (permalink) |
| References | <tSxR7-88I-5@gated-at.bofh.it> <tSy0P-8r5-37@gated-at.bofh.it> |
| X-Greylist | delayed 664 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Jun 2017 04:46:11 EDT |
| Thread-Topic | [RFC][PATCH 0/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions if existed |
| Thread-Index | AQHS5a3qc4zmiy2IQUafbuRtqaZlzqIlk/hA |
| Accept-Language | ja-JP, en-US |
| Content-Language | ja-JP |
| X-Securitypolicycheck | OK by SHieldMailChecker v2.4.6 |
| X-Shieldmailcheckerpolicyversion | FJ-ISEC-20160315 |
| X-Shieldmailcheckermailid | cb2d954d11f548f1be2f0095944f632f |
| X-Originating-IP | [10.33.110.157] |
| Content-Type | text/plain; charset="gb2312" |
| Content-Transfer-Encoding | base64 |
| MIME-Version | 1.0 |
| X-Securitypolicycheck-Gc | OK by FENCE-Mail |
| X-Tm-As-Mml | disable |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 60 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | "keescook@chromium.org" <keescook@chromium.org>, "x86@kernel.org" <x86@kernel.org>, "Fan, Chao" <fanc.fnst@cn.fujitsu.com>, "Cao, Jin" <caoj.fnst@cn.fujitsu.com>, "Dou, Liyang" <douly.fnst@cn.fujitsu.com> |
| X-Original-Date | Thu, 15 Jun 2017 08:34:57 +0000 |
| X-Original-Message-ID | <E86EADE93E2D054CBCD4E708C38D364A7420FFC2@G01JPEXMBYT21> |
| X-Original-References | <1497513169-25283-1-git-send-email-bhe@redhat.com> <20170615080329.GB16181@x1> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1666575 |
Show key headers only | View raw
Dear Baoquan, > > Our customer reported that Kernel text may be located on non-mirror > > region (movable zone) when both address range mirroring feature and > > KASLR are enabled. I know your customer :) > > The functions of address range mirroring feature are as follows. > > - The physical memory region whose descriptors in EFI memory map have > > EFI_MEMORY_MORE_RELIABLE attribute (bit: 16) are mirrored > > - The function arranges such mirror region into normal zone and other > region > > into movable zone in order to locate kernel code and data on mirror > > region > > > > So we need restrict kernel to be located inside mirror region if it is > > existed. > > > > The method is very simple. If efi is enabled, just iterate all efi > > memory map and pick up mirror region to process for adding candidate > > of slot. If efi disabled or no mirror region existed, still process > > e820 memory map. This won't bring much efficiency loss, at worst we > > just go through all efi memory maps and found no mirror. > > > > One question: > > From code, though mirror regions are existed, they are meaningful only > > if kernelcore=mirror kernel option is specified. Not sure if my > > understanding is correct. Your understanding is almost correct. Only when "kernelcore=mirror" specified, the above procedure works. But, if mirrored regions are existed, bootmem allocator tries to allocate from mirrored region independently of "kerenelcore=mirror" option. So, IMHO, kernel text is important, so putting it to mirrored (more reliable) region is reasonable whether or not "kernelcore=mirror" is specified. Anyway thanks for submitting patch. We have Address Range Mirroring capable machine, so we'll test your patch. Sincerely, Taku Izumi > > Since you are the author of kernelcore=mirror related code and expert on > mirror feature, could you help answer above question? > > Thanks > Baoquan > > > > NOTE: > > I haven't got a machine with efi mirror region enabled, so only test > > the > > e820 map processing case and the case of no mirror region on efi machine. > > So set this as a RFC patchset, will post formal one after above > > question is made clear and mirror issue test passed. > > > > Baoquan He (2): > > x86/boot/KASLR: Adapt process_e820_entry for all kinds of memory map > > x86/boot/KASLR: Restrict kernel to be randomized in mirror regions if > > existed > > > > arch/x86/boot/compressed/kaslr.c | 129 > > +++++++++++++++++++++++++++++++-------- > > 1 file changed, 104 insertions(+), 25 deletions(-) > > > > -- > > 2.5.5 > >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 0/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions if existed Baoquan He <bhe@redhat.com> - 2017-06-15 10:00 +0200
[PATCH 1/2] x86/boot/KASLR: Adapt process_e820_entry for all kinds of memory map Baoquan He <bhe@redhat.com> - 2017-06-15 10:00 +0200
Re: [RFC][PATCH 0/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions if existed Baoquan He <bhe@redhat.com> - 2017-06-15 10:10 +0200
RE: [RFC][PATCH 0/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions if existed "Izumi, Taku" <izumi.taku@jp.fujitsu.com> - 2017-06-15 10:50 +0200
Re: [RFC][PATCH 0/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions if existed 'Baoquan He' <bhe@redhat.com> - 2017-06-15 11:30 +0200
csiph-web