Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173037
b: refs/heads/master
c: d6cc1c3
h: refs/heads/master
i:
  173035: 6ff35e2
v: v3
  • Loading branch information
Suresh Siddha authored and H. Peter Anvin committed Oct 20, 2009
1 parent dcd473f commit 84e9398
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74e081797bd9d2a7d8005fe519e719df343a2ba8
refs/heads/master: d6cc1c3af760c1d3f6b42f6e52b08718a6207cf1
13 changes: 12 additions & 1 deletion trunk/arch/x86/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,18 @@ jiffies_64 = jiffies;
#endif

#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)

/*
* On 64-bit, align RODATA to 2MB so that even with CONFIG_DEBUG_RODATA
* we retain large page mappings for boundaries spanning kernel text, rodata
* and data sections.
*
* However, kernel identity mappings will have different RWX permissions
* to the pages mapping to text and to the pages padding (which are freed) the
* text section. Hence kernel identity mappings will be broken to smaller
* pages. For 64-bit, kernel text and kernel identity mappings are different,
* so we can enable protection checks that come with CONFIG_DEBUG_RODATA,
* as well as retain 2MB large page mappings for kernel text.
*/
#define X64_ALIGN_DEBUG_RODATA_BEGIN . = ALIGN(HPAGE_SIZE);

#define X64_ALIGN_DEBUG_RODATA_END \
Expand Down

0 comments on commit 84e9398

Please sign in to comment.