From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 A665638238A for ; Mon, 20 Jul 2026 16:47:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784566054; cv=none; b=A8EJtzabWx61gInD2wwNzaKy02Nk6wYPB3vcdgnAmdqtEw5sJS/c2a/6xcBFfnUNcm93azlWiZOovmgRdgK+zRFsKONA3dswcv0nABKfRUFJBGPlmiogL+GRmxxUWPRfCOA6gSs9VZ+5FHlus1ApaFEzM88z6Relo0PVWbo0Rys= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784566054; c=relaxed/simple; bh=gqdXDIOlWCSbJUmAZJPPfpahOSZoKkFnnRVWuev18jc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MyobZT2gp358gfDbRD4M7VLpOgodTzE5rLHZCpoYAptLSjvwsZNTIGBjGZPQNlHUM5QwMktLSgXo7rNCJFXV6JG4k6Jih30vTgshJfZjtC/BAN1uf+OZzJxCpzhKvfTa/OmcZB6OP87M7aVJFCQAaFQGxOH48xjCuxuSTsfpNZg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ICBjY20D; arc=none smtp.client-ip=91.218.175.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ICBjY20D" Message-ID: <46dc1b58-f2de-492a-9da5-a5c429c19a10@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784566050; 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=4NxQvnwYlpKK36SWC6+zTzcYERz5XJIYpkhO8WkhgIA=; b=ICBjY20DjdrJPYGZwJ25e7LdKK4Pnj3v+NZ8P/FWIrw5qTXFDS3nH94Zq4DFH6zQawGS2v c1sfPFNiRgf9n8LSmFXCHl5gjix/kR4YdHtiuAh9OdlXIdgTXW4QZ3kHJ3hVue3qhGTBZB XlTLcBfDBPHrZPKa7Guw+MzBMIngEkY= Date: Mon, 20 Jul 2026 17:46:58 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH RFC v3 2/6] riscv/mm: add untagged_addr_remote_unlocked() To: Rik van Riel Cc: linux-kernel@vger.kernel.org, Andrew Morton , kernel-team@meta.com, David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , linux-mm@kvack.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org References: <20260720115741.239657-1-usama.arif@linux.dev> <13ec2603d5cbfdc493939f182b71e5133c26af54.camel@surriel.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Usama Arif In-Reply-To: <13ec2603d5cbfdc493939f182b71e5133c26af54.camel@surriel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 20/07/2026 16:08, Rik van Riel wrote: > On Mon, 2026-07-20 at 04:57 -0700, Usama Arif wrote: >> On Fri, 17 Jul 2026 13:00:32 -0400 Rik van Riel >> wrote: >> >> >>> >>> mm->context.pmlen is set only through PR_SET_TAGGED_ADDR_CTRL and >>> is stable >>> afterwards, so it can be read without the mmap lock, as it already >>> is from >>> untagged_addr() and mm_untag_mask(). >>> >> >> I think it might not be stable? set_tagged_addr_ctrl() can change it >> repeatedly until a CLONE_VM operation sets MM_CONTEXT_LOCK_PMLEN. > > You're right, ARM tagged addresses seem to work a ah do you mean RISCV here? > little differently from x86 LAM. > > It looks like on ARM with MTE, the top 8 bits of > the virtual address are available as tags, meaning > that address space cannot be used for VMAs. > > For purposes of accessing process memory, this > is a little more stable than LAM, because the > number of bits we need to mask out of the address > is always the same when MTE is in use. > > At least, I think so. Am I overlooking anything? > > I will clean up the changelog like you suggested. >