Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2028989pxp; Thu, 10 Mar 2022 17:55:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiWuF+gmshEDLy9toIDwOOfWUy9p12PSN9xZGG9sUfNm0/nq/57awkluWLJY7xCNoi2sDp X-Received: by 2002:a17:902:ec8d:b0:151:cab8:9aa9 with SMTP id x13-20020a170902ec8d00b00151cab89aa9mr7712296plg.173.1646963731276; Thu, 10 Mar 2022 17:55:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646963731; cv=none; d=google.com; s=arc-20160816; b=P3xb+JUX4XXAYZaLVUB3bHyF/rytul9XM0JJfexeSnvzAphvUavusjFmFXH3xV8zl5 N33+3sgnmhsBPkk+xVut6vq0jjFB/giaLpaZg8uAVUHiQiTDz17rTTu3/9D9ASAv0m6L fgiG5VPjlx7cC9hqEcynicxzcLHJpaRsk+oJZcxA+/HP2OPbe+dOCPizHS1LMX+WxJ5B n2ijsW7bT9xcrMh5PKxTgJiJfSI4wY+6g2T/foKSh/2c4o5wgGcq1nfh09UliNNQ2FtK IdTQgQHOBOmwi9UFN99CDyazpDUbRkqj+/OU7ekYjvW+8TEHI6I3GcR06Eo/KyTe9CHf vMow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=MHTcat8moAb8iq4vBsXHZZ+/qabywB96lnu6OHyAn0s=; b=xYcDKP8jPMVhbNf9hAn/2PhSX8WHuG5lzi5AulVEzJCK0kFXwnoD8u5IiBgdRaxDc1 mcTzYxUKhZM8tJ0rKs2UBIsvh4HIqCQbj8Pc/vC4AltGCNsgvVuicwb2Zz7hcLcaZ9C5 I8NxWqcdTXQEUOFI4AbX63B9VQo+SBag8d5Q9NkJYsIT/P9a41twHEl76/NsWDHx6cmG DvHJrhQqo37CYYhYTTCbeGU3Tu+QwWrpXniYi27+R6MlB+0+2trIVz8VYdTRLbdMsjQF k59j6F5vXF/Feg74QnTaruMoHlySVkUxti/mR8wtHImLX/VsoFFaOp54kMEY8gF3YCQc z50w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=cjlRUDls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bi16-20020a056a00311000b004f6bc17dbabsi5228936pfb.208.2022.03.10.17.55.14; Thu, 10 Mar 2022 17:55:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=cjlRUDls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242179AbiCJQVd (ORCPT + 99 others); Thu, 10 Mar 2022 11:21:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242457AbiCJQUm (ORCPT ); Thu, 10 Mar 2022 11:20:42 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24E4419415E for ; Thu, 10 Mar 2022 08:19:13 -0800 (PST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22AF7luo025527; Thu, 10 Mar 2022 16:18:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=MHTcat8moAb8iq4vBsXHZZ+/qabywB96lnu6OHyAn0s=; b=cjlRUDlsJD3fBAIFwmz3GfcxZG40Zrx/sSUH7r+EpxEIBP/90w1F4Jv0F0ODT8HVnSV7 LoGkpdDoLlWnKbiKZhyet5Emrm1fwUdvmBC6C5mM8Qt/EpARcAOJSHOA2ravJBbXGTfg s25mNnHsjsw6OHKst5H6NoXKP1ZYf8Aexk+yApTicO7d2f4YGTjyWxdEkr1fY6PEaFze pVKAt/GIhst8fo1t/RRumDSDg2CA3kVNyZ46+HDa2917MLS60R4OmhowgMEBbjSGCOHJ VKRgX9DtU3SMaaf7q8CbbY50urNCTFC6u0sHrI5TfbcetUeUnHvD3P6442Lf8NYw1XC2 dQ== Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3eqg9dq89x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Mar 2022 16:18:35 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22AGDoir007846; Thu, 10 Mar 2022 16:18:33 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma06fra.de.ibm.com with ESMTP id 3eqk8605bk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Mar 2022 16:18:33 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22AGIU5o42926438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Mar 2022 16:18:30 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9DE7111C04A; Thu, 10 Mar 2022 16:18:30 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A8E611C04C; Thu, 10 Mar 2022 16:18:30 +0000 (GMT) Received: from [9.145.19.15] (unknown [9.145.19.15]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 10 Mar 2022 16:18:30 +0000 (GMT) Message-ID: <7aa780b1-3bb5-ffa1-e8f1-defc13e5580c@linux.ibm.com> Date: Thu, 10 Mar 2022 17:18:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH] powerpc/vdso: Fix VDSO unmap check Content-Language: en-US To: Christophe Leroy , linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras References: <20201103171336.98883-1-ldufour@linux.ibm.com> <375b927b-fa93-28cd-23b8-8afe264adb0c@csgroup.eu> From: Laurent Dufour In-Reply-To: <375b927b-fa93-28cd-23b8-8afe264adb0c@csgroup.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: U5k1faMypYQ88fNecYS_Awitj6Dmu6ty X-Proofpoint-ORIG-GUID: U5k1faMypYQ88fNecYS_Awitj6Dmu6ty X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-10_06,2022-03-09_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 clxscore=1011 adultscore=0 spamscore=0 impostorscore=0 bulkscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203100085 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/03/2022, 16:51:04, Christophe Leroy wrote: > > > Le 03/11/2020 à 18:13, Laurent Dufour a écrit : >> The check introduced by the commit 83d3f0e90c6c ("powerpc/mm: tracking vDSO >> remap") is wrong and is missing some partial unmaps of the VDSO. >> >> To be complete the check needs the base and end address of the >> VDSO. Currently only the base is available in the mm_context of a task, but >> the end address can easily be computed because the size of VDSO is >> constant. However, there are 2 sizes for 32 or 64 bits task and they are >> stored in static variables in arch/powerpc/kernel/vdso.c. >> >> Exporting a new function called vdso_pages() to get the number of pages of >> the VDSO based on the static variables from arch/powerpc/kernel/vdso.c. >> >> Fixes: 83d3f0e90c6c ("powerpc/mm: tracking vDSO remap") >> >> Signed-off-by: Laurent Dufour >> Reported-by: Thomas Gleixner >> Suggested-by: Christophe Leroy >> Cc: Michael Ellerman >> Cc: Benjamin Herrenschmidt >> Cc: Paul Mackerras >> --- >>   arch/powerpc/include/asm/mmu_context.h | 18 ++++++++++++++++-- >>   arch/powerpc/kernel/vdso.c             | 14 ++++++++++++++ >>   2 files changed, 30 insertions(+), 2 deletions(-) > > This patch doesn't apply anymore. > > In the meantime there's a pending series from Dmitry, so I'm wondering if > it is worth rebasing this series or not. I agee, the Dimitry's series looks better, addressing the issue in the common code for all the architectures. Laurent.