lakitu_defconfig: make /proc/self/mem read-write
The behavior was inherited from ChromeOS change (see [1], [2]). The
ChromeOS deicion to make the file read-only was based on the following
assumptions:
- There is no valid use case for the process to write to the /dev/self/mem
- The ptrace API that can be used to circumvent the limitation
also could be disabled system-wide because there was
These assumptions are not true for COS, since debugging is a valid use
case and therefor ptrace can't be disabled. Which removes a large share
of the value of having /dev/self/mem read-only.
In addition to this recent versions of gdb stopped working on COS
because gdb switched from using ptrace to directly modifying process
memory through the mem file. This is a significant user experience
regression.
Since there are more cons than pros to keeping the ChromeOS behavior
enabled, this commit reverts the access mode to default (r/w).
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=781376
[2] https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/753406
BUG=b/337870673
TEST=presubmit
RELEASE_NOTE=none
cos-patch: bug
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Change-Id: I8ddc7ed04ee5b26e0b6d43a3f790854d226f23d5
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/71772
Main-Branch-Verified: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
Reviewed-by: Kevin Berry <kpberry@google.com>
diff --git a/arch/arm64/configs/lakitu_defconfig b/arch/arm64/configs/lakitu_defconfig
index f9074cf..e1a3874 100644
--- a/arch/arm64/configs/lakitu_defconfig
+++ b/arch/arm64/configs/lakitu_defconfig
@@ -3235,7 +3235,7 @@
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_CHILDREN=y
-CONFIG_PROC_SELF_MEM_READONLY=y
+# CONFIG_PROC_SELF_MEM_READONLY is not set
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
diff --git a/arch/x86/configs/lakitu_defconfig b/arch/x86/configs/lakitu_defconfig
index 18a5c3d..ca34e59 100644
--- a/arch/x86/configs/lakitu_defconfig
+++ b/arch/x86/configs/lakitu_defconfig
@@ -3287,7 +3287,7 @@
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_CHILDREN=y
CONFIG_PROC_PID_ARCH_STATUS=y
-CONFIG_PROC_SELF_MEM_READONLY=y
+# CONFIG_PROC_SELF_MEM_READONLY is not set
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y