From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id CF2E56B000C for ; Wed, 11 Jul 2018 07:13:04 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id o18-v6so14396119qtm.11 for ; Wed, 11 Jul 2018 04:13:04 -0700 (PDT) Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id 135-v6si6658287qkh.385.2018.07.11.04.13.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 04:13:03 -0700 (PDT) Subject: Re: [RFC PATCH v2 20/27] x86/cet/shstk: ELF header parsing of CET References: <20180710222639.8241-1-yu-cheng.yu@intel.com> <20180710222639.8241-21-yu-cheng.yu@intel.com> From: Florian Weimer Message-ID: <10c224e9-933a-20d8-a286-5065a6cb10f1@redhat.com> Date: Wed, 11 Jul 2018 13:12:57 +0200 MIME-Version: 1.0 In-Reply-To: <20180710222639.8241-21-yu-cheng.yu@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Yu-cheng Yu , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , "Ravi V. Shankar" , Vedvyas Shanbhogue On 07/11/2018 12:26 AM, Yu-cheng Yu wrote: > + /* > + * PT_NOTE segment is small. Read at most > + * PAGE_SIZE. > + */ > + if (note_size > PAGE_SIZE) > + note_size = PAGE_SIZE; That's not really true. There are some huge PT_NOTE segments out there. Why can't you check the notes after the executable has been mapped? Thanks, Florian