Patchwork UBUNTU: [Config] CONFIG_DEBUG_RODATA=n

login
register
mail settings
Submitter Seth Forshee
Date April 18, 2013, 3:06 p.m.
Message ID <1366297573-18391-1-git-send-email-seth.forshee@canonical.com>
Download mbox | patch
Permalink /patch/237672/
State New
Headers show

Comments

Seth Forshee - April 18, 2013, 3:06 p.m.
It turns out we had two options enabled which were making the
kernel text read only. Turning off CONFIG_STRICT_MEMORY_RWX
fixed function tracing, but kprobes still don't work.
CONFIG_DEBUG_RODATA seems to be something added by Google to
mimic the same option in x86, but the x86 version does some
tricks to make kprobes work which are lacking in the ARM
version. Turn off this option so that kprobes will work and
remove the corresponding enforcer rule.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 debian.nexus4/config/config.common.ubuntu |    3 +--
 debian.nexus4/config/enforce              |    1 -
 2 files changed, 1 insertion(+), 3 deletions(-)
Seth Forshee - April 18, 2013, 3:14 p.m.
Forgot to note that this is for ubuntu-nexus4.

On Thu, Apr 18, 2013 at 10:06:13AM -0500, Seth Forshee wrote:
> It turns out we had two options enabled which were making the
> kernel text read only. Turning off CONFIG_STRICT_MEMORY_RWX
> fixed function tracing, but kprobes still don't work.
> CONFIG_DEBUG_RODATA seems to be something added by Google to
> mimic the same option in x86, but the x86 version does some
> tricks to make kprobes work which are lacking in the ARM
> version. Turn off this option so that kprobes will work and
> remove the corresponding enforcer rule.
> 
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> ---
>  debian.nexus4/config/config.common.ubuntu |    3 +--
>  debian.nexus4/config/enforce              |    1 -
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/debian.nexus4/config/config.common.ubuntu b/debian.nexus4/config/config.common.ubuntu
> index fcf42e8..3ae1a29 100644
> --- a/debian.nexus4/config/config.common.ubuntu
> +++ b/debian.nexus4/config/config.common.ubuntu
> @@ -487,8 +487,7 @@ CONFIG_DEBUG_MEMORY_INIT=y
>  # CONFIG_DEBUG_PERF_USE_VMALLOC is not set
>  # CONFIG_DEBUG_PER_CPU_MAPS is not set
>  # CONFIG_DEBUG_PREEMPT is not set
> -CONFIG_DEBUG_RODATA=y
> -# CONFIG_DEBUG_RODATA_TEST is not set
> +# CONFIG_DEBUG_RODATA is not set
>  # CONFIG_DEBUG_RT_MUTEXES is not set
>  # CONFIG_DEBUG_SECTION_MISMATCH is not set
>  # CONFIG_DEBUG_SG is not set
> diff --git a/debian.nexus4/config/enforce b/debian.nexus4/config/enforce
> index 2021810..c967afb 100644
> --- a/debian.nexus4/config/enforce
> +++ b/debian.nexus4/config/enforce
> @@ -15,7 +15,6 @@ value CONFIG_DEFAULT_SECURITY_APPARMOR y
>  # For architectures which support this option ensure it is enabled.
>  !exists CONFIG_SECCOMP | value CONFIG_SECCOMP y
>  !exists CONFIG_CC_STACKPROTECTOR | value CONFIG_CC_STACKPROTECTOR y
> -!exists CONFIG_DEBUG_RODATA | value CONFIG_DEBUG_RODATA y
>  !exists CONFIG_STRICT_DEVMEM | value CONFIG_STRICT_DEVMEM y
>  # For architectures which support this option ensure it is disabled.
>  !exists CONFIG_COMPAT_VDSO | value CONFIG_COMPAT_VDSO n
> -- 
> 1.7.9.5
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Tim Gardner - April 18, 2013, 3:20 p.m.

Patch

diff --git a/debian.nexus4/config/config.common.ubuntu b/debian.nexus4/config/config.common.ubuntu
index fcf42e8..3ae1a29 100644
--- a/debian.nexus4/config/config.common.ubuntu
+++ b/debian.nexus4/config/config.common.ubuntu
@@ -487,8 +487,7 @@  CONFIG_DEBUG_MEMORY_INIT=y
 # CONFIG_DEBUG_PERF_USE_VMALLOC is not set
 # CONFIG_DEBUG_PER_CPU_MAPS is not set
 # CONFIG_DEBUG_PREEMPT is not set
-CONFIG_DEBUG_RODATA=y
-# CONFIG_DEBUG_RODATA_TEST is not set
+# CONFIG_DEBUG_RODATA is not set
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_DEBUG_SECTION_MISMATCH is not set
 # CONFIG_DEBUG_SG is not set
diff --git a/debian.nexus4/config/enforce b/debian.nexus4/config/enforce
index 2021810..c967afb 100644
--- a/debian.nexus4/config/enforce
+++ b/debian.nexus4/config/enforce
@@ -15,7 +15,6 @@  value CONFIG_DEFAULT_SECURITY_APPARMOR y
 # For architectures which support this option ensure it is enabled.
 !exists CONFIG_SECCOMP | value CONFIG_SECCOMP y
 !exists CONFIG_CC_STACKPROTECTOR | value CONFIG_CC_STACKPROTECTOR y
-!exists CONFIG_DEBUG_RODATA | value CONFIG_DEBUG_RODATA y
 !exists CONFIG_STRICT_DEVMEM | value CONFIG_STRICT_DEVMEM y
 # For architectures which support this option ensure it is disabled.
 !exists CONFIG_COMPAT_VDSO | value CONFIG_COMPAT_VDSO n