Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp379863imm; Wed, 11 Jul 2018 04:14:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdIERCK19skAR4XFofPT5oaiUeXPRerrzH1nZ65u5BhfAZEHn14iPpuiqH/nRIPq25P2K1V X-Received: by 2002:a65:6102:: with SMTP id z2-v6mr26551661pgu.46.1531307681860; Wed, 11 Jul 2018 04:14:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531307681; cv=none; d=google.com; s=arc-20160816; b=Af2g6PYxmK7diRaqJNzK9OS0zx/uGmwFlaSNW1vWynI6mTnVxHlJOZnygq9afXpHkw gfZDNqs9QV2QPl0RsxZgem3Ln16LwJfw6alVpeh2fIcmi0xFawdCIj1xxKs5ozt+H0CP xumyQQZZL8RkOnt42DttkZPXuOQWVYTh4PMh3tMy/w/IU2LyHKdkj5PthDgEoeI41lM9 q4IwcEfbmf2+tOJPv5QsnAOGoKtxe1VPSEDiv9okwebDDx6ANuoxq8PRq2r46IdMMFuF /BKo1Flpp8vZM+j0uxViUr8k6uiruNkJxJ+XS+7wJx/a9RevLvdZ2PJic1pxLdWcTlZp G+Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=gIG/cPpf7COLGXxjBQgQ10liErX7fQ7PJV+fpEXn3cA=; b=S/eX0xpl8ypZqRh5v1H4p4ehcXcDsSu3G0jaUm0sJTuyCnOWMWKLR1zHtY3gdG+Zf0 bfKWYGMC2oO+WkSSGMKc+vVBwtZOKpwroCWCJ/2q/oqgCARLyhJ1j3FTFM2t38nC5tlV D8QUwIj7Fw3AYveu07EO26Y5eo4w+/eUuzbkHFvtsOgH4TfGW0X+R8QSn6Zx594YmYuV jn2oDzU3Mg+RfbzqecKrkIQvFOeYYIVgpgNju58kXuw4MvblkcS0fuhxmTrWZLLb9qpr wy6nm+0Utm+RbhGdvc45v0SJxBhTfIxgvICuNODVK6vy4jf0hJLinzb6n+ALNfgBJUXf eHIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e67-v6si19168358plb.272.2018.07.11.04.14.26; Wed, 11 Jul 2018 04:14:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732666AbeGKLQw (ORCPT + 99 others); Wed, 11 Jul 2018 07:16:52 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40474 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732387AbeGKLQw (ORCPT ); Wed, 11 Jul 2018 07:16:52 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C46C406DE36; Wed, 11 Jul 2018 11:13:03 +0000 (UTC) Received: from oldenburg.str.redhat.com (dhcp-192-212.str.redhat.com [10.33.192.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 95E9120389E0; Wed, 11 Jul 2018 11:12:58 +0000 (UTC) Subject: Re: [RFC PATCH v2 20/27] x86/cet/shstk: ELF header parsing of CET 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 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 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 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 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 11 Jul 2018 11:13:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 11 Jul 2018 11:13:03 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'fweimer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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