title: Mixing 64/32-bit userspace in arm64 linux ( using CONFIG_COMPAT )
body: <p>I am looking into 32-bit userspace support in ARM64 linux kernels, and it looks like enabling CONFIG_COMPAT would allow me to do that.</p>
  
  <p>Can anyone chime in on whether enabling CONFIG_COMPAT would DISABLE the running of 64-bit apps? I ask this for the following reasons:</p>
  
  <ol>
  <li>The documentation doesn't state that both 64/32 bit apps can be run with the same kernel</li>
  <li><p>I took a look at fs/compat_binfmt_elf.c</p>
  
  <pre><code>#ifdef   COMPAT_SET_PERSONALITY
  #undef   SET_PERSONALITY
  #define  SET_PERSONALITY      COMPAT_SET_PERSONALITY
  #endif
  </code></pre>
  
  <p>This seems to force the thread personality to</p>
  
  <pre><code>set_thread_flag(TIF_32BIT)    
  </code></pre></li>
  <li><p>When load_elf_binary() in kernel/linux-3.14/fs/binfmt_elf.c is called, there is a call to SET_PERSONALITY(loc->elf_ex);</p></li>
  <li><p>So ineffect, when CONFIG_COMPAT is enabled, all userspace apps are force marked as 32-BIT?</p></li>
  </ol>
  
  <p>Thanks</p>