forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branches 'acpi-scan', 'acpi-sysfs', 'acpi-wdat' and 'acpi-tables'
* acpi-scan: ACPI / scan: Prefer devices without _HID/_CID for _ADR matching ACPI: Drop misplaced acpi_dma_deconfigure() call from acpi_bind_one() * acpi-sysfs: ACPI / sysfs: Provide quirk mechanism to prevent GPE flooding * acpi-wdat: ACPI / watchdog: Print out error number when device creation fails * acpi-tables: ACPI / DMAR: Avoid passing NULL to acpi_put_table()
- Loading branch information
Showing
49 changed files
with
616 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#ifndef __ASM_ASM_UACCESS_H | ||
#define __ASM_ASM_UACCESS_H | ||
|
||
#include <asm/alternative.h> | ||
#include <asm/kernel-pgtable.h> | ||
#include <asm/sysreg.h> | ||
#include <asm/assembler.h> | ||
|
||
/* | ||
* User access enabling/disabling macros. | ||
*/ | ||
#ifdef CONFIG_ARM64_SW_TTBR0_PAN | ||
.macro __uaccess_ttbr0_disable, tmp1 | ||
mrs \tmp1, ttbr1_el1 // swapper_pg_dir | ||
add \tmp1, \tmp1, #SWAPPER_DIR_SIZE // reserved_ttbr0 at the end of swapper_pg_dir | ||
msr ttbr0_el1, \tmp1 // set reserved TTBR0_EL1 | ||
isb | ||
.endm | ||
|
||
.macro __uaccess_ttbr0_enable, tmp1 | ||
get_thread_info \tmp1 | ||
ldr \tmp1, [\tmp1, #TSK_TI_TTBR0] // load saved TTBR0_EL1 | ||
msr ttbr0_el1, \tmp1 // set the non-PAN TTBR0_EL1 | ||
isb | ||
.endm | ||
|
||
.macro uaccess_ttbr0_disable, tmp1 | ||
alternative_if_not ARM64_HAS_PAN | ||
__uaccess_ttbr0_disable \tmp1 | ||
alternative_else_nop_endif | ||
.endm | ||
|
||
.macro uaccess_ttbr0_enable, tmp1, tmp2 | ||
alternative_if_not ARM64_HAS_PAN | ||
save_and_disable_irq \tmp2 // avoid preemption | ||
__uaccess_ttbr0_enable \tmp1 | ||
restore_irq \tmp2 | ||
alternative_else_nop_endif | ||
.endm | ||
#else | ||
.macro uaccess_ttbr0_disable, tmp1 | ||
.endm | ||
|
||
.macro uaccess_ttbr0_enable, tmp1, tmp2 | ||
.endm | ||
#endif | ||
|
||
/* | ||
* These macros are no-ops when UAO is present. | ||
*/ | ||
.macro uaccess_disable_not_uao, tmp1 | ||
uaccess_ttbr0_disable \tmp1 | ||
alternative_if ARM64_ALT_PAN_NOT_UAO | ||
SET_PSTATE_PAN(1) | ||
alternative_else_nop_endif | ||
.endm | ||
|
||
.macro uaccess_enable_not_uao, tmp1, tmp2 | ||
uaccess_ttbr0_enable \tmp1, \tmp2 | ||
alternative_if ARM64_ALT_PAN_NOT_UAO | ||
SET_PSTATE_PAN(0) | ||
alternative_else_nop_endif | ||
.endm | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
*/ | ||
#include <linux/linkage.h> | ||
|
||
#include <linux/uaccess.h> | ||
#include <asm/asm-uaccess.h> | ||
|
||
.text | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.