Commit Graph

14 Commits

Author SHA1 Message Date
Olivier Karasangabo 641ab2bdbf arm64: Disable Samsung security restrictions by default 2017-04-18 04:44:48 +02:00
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Rohit Vaswani c45a4e6e07 arm64: Add support for KERNEL_TEXT_RDONLY
When using FORCE_PAGES to allocate the kernel memory into pages,
provide an option to mark the the kernel text section as read only.
Since the kernel text pages are always mapped in the kernel, anyone
can write to the page if they have the address.
Enable this option to mark the kernel text pages as read only to
trigger a fault if any code attempts to write to a page that is
part of the kernel text section.

Change-Id: I2a9e105a3340686b4314bb10cc2a6c7bfa19ce8e
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2014-11-07 16:59:07 -08:00
Laura Abbott 2e149a84e0 arm64: add support to dump the kernel page tables
In a similar manner to arm, it's useful to be able to dump the page
tables to verify permissions and memory types. Add a debugfs file
to check the page tables.

Change-Id: I319c30c27a85f1686108f3e06ea20eb686c53d09
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2014-08-29 12:32:43 -07:00
Laura Abbott a714ecada9 arm64: Add missing Kconfig for CONFIG_STRICT_DEVMEM
The Kconfig for CONFIG_STRICT_DEVMEM is missing despite being
used in mmap.c. Add it.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: d253b4406df69fa7a74231769d6f6ad80dc33063
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2014-08-15 11:41:42 -07:00
Neeti Desai 2a6ba7ff5e Kconfig: arm64: Update dependancy for CONFIG_FREE_PAGES_RDONLY
The kernel_map_pages function is compiled only when
CONFIG_PAGE_POISONING is enabled, however the stub
fuction is added when CONFIG_DEBUG_PAGEALLOC=n, which
causes a compilation error when CONFIG_DEBUG_PAGEALLOC
is disabled and CONFIG_FREE_PAGES_RDONLY is enabled.

Enable CONFIG_DEBUG_PAGEALLOC when CONFIG_FREE_PAGES_RDONLY
is enabled.

Change-Id: I576886982768d85e112d7f9e7d92d588a735acc1
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2014-07-23 15:56:02 -07:00
Neeti Desai 5112be8eb3 arm64: Add support for FREE_PAGES_RDONLY
Add config option to trigger page a fault if any
code attempts to write to a page on the buddy list

Change-Id: Ic5ab791c4117606519c7b9eb4c2876f246d23320
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2014-07-09 12:40:43 -07:00
Neeti Desai b74ddb13e3 arm64: Allow remapping lowmem as 4K pages
For certain debug features the lowmem needs to be
mapped as pages instead of sections. Add config
option to allow remapping of lowmem as 4K pages

Change-Id: I50179311facd91b97ecde720da38ec7e47512e95
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2014-07-09 12:40:43 -07:00
Laura Abbott 635c0d57b9 arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support
In a similar fashion to other architecture, add the infrastructure
and Kconfig to enable DEBUG_SET_MODULE_RONX support. When
enabled, module ranges will be marked read-only/no-execute as
appropriate.

Change-Id: I0db8372bea6f0e6aba647dd2b471464d5d4bb29a
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2014-04-01 17:18:09 -07:00
Stephen Boyd 9bf5916c83 arm64: Remove duplicate DEBUG_STACK_USAGE config
This config item already exists generically in lib/Kconfig.debug.
Remove the duplicate config in arm64.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: 09d3ce74d7d60f37d1b030886ec659bbfe2e73bf
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-02-07 13:49:49 -08:00
Paul Bolle 792072066d arm64: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS
The Kconfig entry for DEBUG_ERRORS is a verbatim copy of the former arm
entry for that symbol. It got removed in v2.6.39 because it wasn't
actually used anywhere. There are still no users of DEBUG_ERRORS so
remove this entry too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
[catalin.marinas@arm.com: removed option from defconfig]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-03-19 16:19:19 +00:00
Will Deacon ec45d1cfd3 arm64: mm: update CONTEXTIDR register to contain PID of current process
This patch is a port of 575320d62 ("ARM: 7445/1: mm: update CONTEXTIDR
register to contain PID of current process") from ARM that introduces a
new Kconfig option which, when enabled, causes the kernel to write the
PID of the current task into the CONTEXTIDR register on context switch.
This is useful when analysing hardware trace, since writes to this
register can be configured to emit an event into the trace stream.

Signed-off-by: Will Deacon <will.deacon@arm.com>
[catalin.marinas@arm.com: contextidr_thread_switch() moved to mmu_context.h]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-02-11 18:24:18 +00:00
Catalin Marinas 2475ff9d2c arm64: Add simple earlyprintk support
This patch adds support for "earlyprintk=" parameter on the kernel
command line. The format is:

  earlyprintk=<name>[,<addr>][,<options>]

where <name> is the name of the (UART) device, e.g. "pl011", <addr> is
the I/O address. The <options> aren't currently used.

The mapping of the earlyprintk device is done very early during kernel
boot and there are restrictions on which functions it can call. A
special early_io_map() function is added which creates the mapping from
the pre-defined EARLY_IOBASE to the device I/O address passed via the
kernel parameter. The pgd entry corresponding to EARLY_IOBASE is
pre-populated in head.S during kernel boot.

Only PL011 is currently supported and it is assumed that the interface
is already initialised by the boot loader before the kernel is started.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2013-01-22 17:51:01 +00:00
Catalin Marinas 8c2c3df31e arm64: Build infrastructure
This patch adds Makefile and Kconfig files required for building an
AArch64 kernel.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-09-17 13:42:21 +01:00