Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
BACKPORT: arm64: Add sysfs vulnerability show for spectre-v1
Browse files Browse the repository at this point in the history
spectre-v1 has been mitigated and the mitigation is always active.
Report this to userspace via sysfs

This patch is backported from:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.3-rc1&id=3891ebccace188af075ce143d8b072b65e90f695

Signed-off-by: Mian Yousaf Kaukab <[email protected]>
Signed-off-by: Jeremy Linton <[email protected]>
Reviewed-by: Andre Przywara <[email protected]>
Reviewed-by: Catalin Marinas <[email protected]>
Tested-by: Stefan Wahren <[email protected]>
Acked-by: Suzuki K Poulose <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Khuong Dinh <[email protected]>
  • Loading branch information
Mian Yousaf Kaukab authored and tphan-ampere committed Apr 21, 2020
1 parent 7baed89 commit be1dbd0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm64/kernel/cpu_errata.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,3 +746,9 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
{
}
};

ssize_t cpu_show_spectre_v1(struct device *dev, struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "Mitigation: __user pointer sanitization\n");
}

0 comments on commit be1dbd0

Please sign in to comment.