From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: Re: [RFC PATCH v9 01/27] Documentation/x86: Add CET description Date: Mon, 9 Mar 2020 16:20:57 -0700 Message-ID: References: <0088001c-0b12-a7dc-ff2a-9d5c282fa36b@intel.com> <56ab33ac-865b-b37e-75f2-a489424566c3@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: "H.J. Lu" Cc: Andy Lutomirski , Yu-cheng Yu , the arch/x86 maintainers , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , Linux API , Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , Jann Horn , Jonathan Corbet List-Id: linux-arch.vger.kernel.org On 3/9/20 4:11 PM, H.J. Lu wrote: > A threaded application is loaded from disk. The object file on disk is > either CET enabled or not CET enabled. Huh. Are you saying that all instructions executed on userspace on Linux come off of object files on the disk? That's an interesting assertion. You might want to go take a look at the processes on your systems. Here's my browser for example: # for p in $(ps aux | grep chromium | awk '{print $2}' ); do cat /proc/$p/maps; done | grep ' r-xp 00000000 00:00 0' ... 202f00082000-202f000bf000 r-xp 00000000 00:00 0 202f000c2000-202f000c3000 r-xp 00000000 00:00 0 202f00102000-202f00103000 r-xp 00000000 00:00 0 202f00142000-202f00143000 r-xp 00000000 00:00 0 202f00182000-202f001bf000 r-xp 00000000 00:00 0 Lots of funny looking memory areas which are anonymous and executable! Those didn't come off the disk. Same thing in firefox. Weird. Any idea what those are? One guess: https://en.wikipedia.org/wiki/Just-in-time_compilation From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [RFC PATCH v9 01/27] Documentation/x86: Add CET description References: <0088001c-0b12-a7dc-ff2a-9d5c282fa36b@intel.com> <56ab33ac-865b-b37e-75f2-a489424566c3@intel.com> From: Dave Hansen Message-ID: Date: Mon, 9 Mar 2020 16:20:57 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-doc-owner@vger.kernel.org To: "H.J. Lu" Cc: Andy Lutomirski , Yu-cheng Yu , the arch/x86 maintainers , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , Linux API , Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , x86-patch-review@intel.com List-ID: Message-ID: <20200309232057.mzsIyOtEdSog1hhnzhh1FLNQvvPrx-GiyA5W6khokUo@z> On 3/9/20 4:11 PM, H.J. Lu wrote: > A threaded application is loaded from disk. The object file on disk is > either CET enabled or not CET enabled. Huh. Are you saying that all instructions executed on userspace on Linux come off of object files on the disk? That's an interesting assertion. You might want to go take a look at the processes on your systems. Here's my browser for example: # for p in $(ps aux | grep chromium | awk '{print $2}' ); do cat /proc/$p/maps; done | grep ' r-xp 00000000 00:00 0' ... 202f00082000-202f000bf000 r-xp 00000000 00:00 0 202f000c2000-202f000c3000 r-xp 00000000 00:00 0 202f00102000-202f00103000 r-xp 00000000 00:00 0 202f00142000-202f00143000 r-xp 00000000 00:00 0 202f00182000-202f001bf000 r-xp 00000000 00:00 0 Lots of funny looking memory areas which are anonymous and executable! Those didn't come off the disk. Same thing in firefox. Weird. Any idea what those are? One guess: https://en.wikipedia.org/wiki/Just-in-time_compilation