From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADBC43ACA7F for ; Mon, 17 Aug 2026 22:30:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787005851; cv=none; b=u/t/vZO8YzfTtq+ABMYJEtmo66dlktkFJePx975zTsWrlSShMbEIwvY/j2q9N9zBbZ6+siNRUxeD1fizIfSRkRwOOvf7jfNIi6H7a5Mo2CHe+qdW/Couw8vFNUpp7SrIPHDUsvU2P4GAAXpAfGPXUm78cU9rruK9mt/luUr2Vtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787005851; c=relaxed/simple; bh=BvvYO00lVkZ+BtE7R7PPwLP5EczSSUMVb1ZD1viT8E8=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=R4UIwOlw5GPKzD6VBItJO077lz9RIreVe3tBBq7+g262sLiEuZVEXv8mZxiEzZ6IUY8nYUH/nx1lyhUX6Z/0/slnMpCpTJ0IAlPA8bZX/eOTWuhgLkgVPa1RW0u04qM42jfuRJscaFypb1yG/Wl5+W6DjgoafffyzIa0aM/Q75A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=eTW8Odno; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="eTW8Odno" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D94731F000E9; Mon, 17 Aug 2026 22:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1787005850; bh=TL7juVfbUl+m0ZvSLQeExvxWsKmILyS9r2lR3m5Mto8=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=eTW8Odno+P99BcU1Q2Z9rnhOHszjurKW/v/MOKKEepwOaUISyX5nJovEcwXI0C2dR p4QOVSwpDjdIkB8kIa/tHl+d0QIEFzo1BqRdAKXxu0b6SG4/2r67o16xPLAFB7ZFPz 49TtX9yd/Qy56hNQe/WRdO/lGxNt20k7KHexs1RY= Date: Mon, 17 Aug 2026 15:30:49 -0700 From: Andrew Morton To: Lance Yang Cc: baolin.wang@linux.alibaba.com, vernon2gm@gmail.com, david@kernel.org, ljs@kernel.org, nico.pache@linux.dev, ryan.roberts@arm.com, dev.jain@arm.com, baohua@kernel.org, usama.arif@linux.dev, zokeefe@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 0/3] mm: khugepaged: fix tracepoint UAF Message-Id: <20260817153049.120e224cc303f1c2292cd768@linux-foundation.org> In-Reply-To: <20260815181632.21453-1-lance.yang@linux.dev> References: <20260815174444.4164-1-lance.yang@linux.dev> <20260815181632.21453-1-lance.yang@linux.dev> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 16 Aug 2026 02:16:32 +0800 Lance Yang wrote: > >>Pass the pfn to the tracepoints directly, captured while the folio is > >>still pinned, closing the use-after-free windows in > >>mm_khugepaged_scan_file(), mm_khugepaged_scan_pmd() and > >>mm_khugepaged_collapse_file(). > > > >Well spotted! > > > >Gave the series a run on x86_64 (KVM), all good (only classic SPARSEMEM > >untested) :) > > Hmm ... stumbled over something else while testing this ... Sashiko might have found a couple of pre-existing things. https://sashiko.dev/#/patchset/20260815051924.194810-1-vernon2gm@gmail.com Vernon, you may decide that the second one is on-topic for this patchset?