From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.29562.1595453358825986273 for ; Wed, 22 Jul 2020 14:29:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RSbtWAFm; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595453358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QPuXXy6iX0dxPgdcCfi8VfyqEBl1uYX7TcXJefTW5Fk=; b=RSbtWAFmRBZaQaNpmcZzZrGV3tuM0IwenEAs/gBZa/T9/oAywnRAgWRLeqZIGaI+KfIgIS 6C5DL6xIUnnEeq2FQJYu+jHiZC4Wch5CgmxIpJRLBWeij6THbr3zEsIZQEFj9d1FgxQ0AF Ip5yAtUEZDB/OPFlaMu2JH1tmzoQkzc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-271-6rngqjtLNJa7YLft0Ii-VA-1; Wed, 22 Jul 2020 17:29:16 -0400 X-MC-Unique: 6rngqjtLNJa7YLft0Ii-VA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C4F08BF3A0; Wed, 22 Jul 2020 21:29:13 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-129.ams2.redhat.com [10.36.113.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id 086578BEDC; Wed, 22 Jul 2020 21:29:11 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v7 07/10] UefiCpuPkg/CpuMpPei: Enable paging and set NP flag to avoid TOCTOU (CVE-2019-11098) To: devel@edk2.groups.io, guomin.jiang@intel.com Cc: Eric Dong , Ray Ni , Rahul Kumar , Jian J Wang References: <20200722083657.739-1-guomin.jiang@intel.com> <20200722083657.739-8-guomin.jiang@intel.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 22 Jul 2020 23:29:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200722083657.739-8-guomin.jiang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 07/22/20 10:36, Guomin Jiang wrote: > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1614 > > To avoid the TOCTOU, enable paging and set Not Present flag so when > access any code in the flash range, it will trigger #PF exception. > > Cc: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > Cc: Rahul Kumar > Signed-off-by: Guomin Jiang > Acked-by: Laszlo Ersek > Reviewed-by: Jian J Wang > --- > UefiCpuPkg/CpuMpPei/CpuMpPei.inf | 3 +++ > UefiCpuPkg/CpuMpPei/CpuPaging.c | 32 +++++++++++++++++++++++++++----- > 2 files changed, 30 insertions(+), 5 deletions(-) Commit message and comment wording fixes, plus updated formatting for the local variable definitions. (Relative to v5.) My A-b stands. Thanks Laszlo