From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F0DF1A9B4D for ; Fri, 20 Dec 2024 08:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734684917; cv=none; b=gjjo8tncRv38oqcfvzRHGnUrFQfanAvrfEOXkKHn4vz/kh5t9laIpoSdFsslomfmk4wYu7LJOpS75bWcM/yx5DjMprZ3mqWjQ5T9yd3bdg5LEmlgy+y783SVMUAJqp8LltNdaIWfQiV3U3CtShRPo8qd6FAtDeYqPJ25HJfWX14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734684917; c=relaxed/simple; bh=dABJz/UQNx58PRUbTo1zLRzIEOPbFjg93KUvSd8ttYA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AECo22pp/WmrePsrOMgywXhD6YtD05joRb0Eml/zFmCFazPwx8aofun5TduX4kLOwziFXK/cvtwnX5Mym4255pRYtmt8DtGssN/AE/qeZ1K6uBjAtJNRACmJVigE1+lzz+sfHT86qNkbiDh58N0tHfSTz08pQ2stlzljBEsgEoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=K+fAOzWZ; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="K+fAOzWZ" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-728f28744c5so1666673b3a.1 for ; Fri, 20 Dec 2024 00:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1734684914; x=1735289714; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UQfNyWmZKsPDEukQcf0PNeutIzKaofgYiuVwM4cz6bQ=; b=K+fAOzWZ0QTN8WQYAYSjSxi+oXuJO7z7zwLpW6U1lBms+Fe/Ue9vZyJQvyA2SH9Qvx kXatEamBjJ4ThoUsByG7rHSoUJOTilgcPf3iO+J1KiNjQGHsQXqfMOWOQ8ku7u9tvPHw mpXCI2xGAwPG4SAxsSiVZJq+1TWgkcyJDmAIAkvNu8XitGhuxWreq/q44o2++fVRCb3L 5AFknOR4WmmPLL7dTTre2gFWrwUUasBV92+JKFYogU1K5Xolhb3vAuLzrTnqNob8+gVg 3ip1gx+SqDKVT1BBaVIOPZilXhVqGB3E+DFEnoMfgczDFgtsWQouco7KwqIEy61Y6KIY XEmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734684914; x=1735289714; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UQfNyWmZKsPDEukQcf0PNeutIzKaofgYiuVwM4cz6bQ=; b=XyhcQgWgQJnGb12pTpltFLwh9aANsc2y+EhSxqahY19epuzZNH4ljrSW4KzMqbvydR gY9LIHA/MchIg5iC2IZ7hzjwnBSyupvx+T54KtvdF5vP6y3rM2AfrHCOoLpuUcAtenKd BZUkHaDVyFZu9ucbw9cj05U3T0dkdr+1aanhjuUu8XfPWKz4wQsq5ffDqnrqjTP5fS5P 6btoIhUOqouIW6EgvXMadroT9VZ8XHw38Z0ruKQksQkuL/EkD8dZcJP8wBFrJcYOI9xr 477Q7auOyHNz3nUCM/H+UUp1kkwlRbBGvunkBnAiD8q4iVVNrIs4vJa1eOeCqaLEz/0d tCgQ== X-Forwarded-Encrypted: i=1; AJvYcCVOfune87FsxtXr70A1CZ5CAintBiShBhS2jqZCyXNTej4Ma1IXECCUk+ruptr3dbALhsg/27Zcy0pxF+g=@vger.kernel.org X-Gm-Message-State: AOJu0YxTOUXhZMm5KqhIQ/cK5SMML8KtEpkFW/HsRXwMrTCLN/aXb1EC 2dc3GTlyvpeGS15pk0qf8DA15aAcUU61B9WEE5ZUEq0/T/WpszK5619ui+PtA+4= X-Gm-Gg: ASbGnct//ckPNBzkaz9Nzzel/DLuVamm1Ix0PnfsN5tvWx6fjJlvgIGWrlm+Z8Mvwrq WtmzNJ3gxQ3atV3kwZWfqboiwTSnDpVGYsiXVlUCN1XPwZ/5l+2O+kfwY/ujMFRNN12vc687G8i FSegxvYehAZEU/qNQG9m6GQZ/NGwqb0/VuIStSFQgDSGrVCDvfXEqCHD8Dsvhyzyc11ejvW0JoA yKVDvWXxii2wT/mUKTOcCS+sxpHkkX37mm69590e4Pi2JCJQwpAeAfqwu676RLodta20rf26dt3 pIHf7Q== X-Google-Smtp-Source: AGHT+IFhsQwykE06H+WRP/74qyUyJawa/zavas7Qj2VdqxkKt93Yr6pU7Xanlr8qwKqxirNXDKAwCw== X-Received: by 2002:a05:6a20:7f99:b0:1e0:cfc0:df34 with SMTP id adf61e73a8af0-1e5e0470226mr3586592637.16.1734684914494; Fri, 20 Dec 2024 00:55:14 -0800 (PST) Received: from [10.4.194.102] ([139.177.225.238]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-842b85f00f9sm2424275a12.43.2024.12.20.00.55.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Dec 2024 00:55:13 -0800 (PST) Message-ID: <5d339eec-bb93-49ab-890f-07c77ce040d8@bytedance.com> Date: Fri, 20 Dec 2024 16:55:05 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 10/15] s390: pgtable: also move pagetable_dtor() of PxD to __tlb_remove_table() Content-Language: en-US To: Alexander Gordeev Cc: peterz@infradead.org, tglx@linutronix.de, david@redhat.com, jannh@google.com, hughd@google.com, yuzhao@google.com, willy@infradead.org, muchun.song@linux.dev, vbabka@kernel.org, lorenzo.stoakes@oracle.com, akpm@linux-foundation.org, rientjes@google.com, vishal.moola@gmail.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org References: <0a6caf8305409173b5d41dccb6ecd46460cf9c1c.1734526570.git.zhengqi.arch@bytedance.com> From: Qi Zheng In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024/12/20 16:42, Alexander Gordeev wrote: > On Wed, Dec 18, 2024 at 09:04:46PM +0800, Qi Zheng wrote: >> In s390, the pagetable_dtor() of PTE has long been moved to >> __tlb_remove_table(). > > Well, not pagetable_dtor(), but rather pagetable_pte_dtor() and > not to __tlb_remove_table(), but to pagetable_pte_dtor_free() ;) > >> So similarly, also move the pagetable_dtor() of >> PMD|PUD|P4D to __tlb_remove_table(). This prevents the use-after-free >> problem where the ptlock is freed immediately but the page table pages >> is freed later via RCU. >> >> By the way, rename pagetable_pte_dtor_free() to pagetable_dtor_free(). > > This is not just a random rename, but rather a result of unifying > PxD and PTE TLB free paths. > > Could you please come up with a better wording concerning the above? Sorry about that. Will modify it as you said above. > >> Signed-off-by: Qi Zheng >> Suggested-by: Peter Zijlstra (Intel) >> Cc: linux-s390@vger.kernel.org >> --- >> arch/s390/include/asm/tlb.h | 3 --- >> arch/s390/mm/pgalloc.c | 14 ++++---------- >> 2 files changed, 4 insertions(+), 13 deletions(-) > > You also did not CC linux-s390@vger.kernel.org for other patches > that affect s390 sources. Just CC the whole series, please. Got it, will CC linux-s390@vger.kernel.org for the whole series in v3. Thanks! > > Thanks!