From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68F3C30EF6C for ; Wed, 19 Nov 2025 18:03:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763575442; cv=none; b=ljGuO8EAMIr04vYDxUYy8MZZgYulLTXuFEPCXofSJLF0j0o+pexBu4dM0ka7MoVO8HB4k4FVrzThKBCi6nCAvkOyBQy4yGpZI1EzVXTeSGh5FugSqbb8ly91R2b3oXvbz0XYPUfeZx8tGxlMWwP2Eski27KfamnuklQ1FU0aB+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763575442; c=relaxed/simple; bh=YcP+UDK6Mer9v7AsvFufzNZNYnlZirK7XSh04pc7/yQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PxK2kqJznKgGlayZffi+1RFTsPUZysPCYv63b7lZT91eh913ryPPkOM66oXXZyPIfO8Cmw7H2ubA5MWo+Nh7sJSuTFZJ9XtzIH5LTVb6Cs3R1dexUuqp2rwRqCNIqjhiMTAU/4ZvCB8zbUCCJ8prPqVJj5PZBPqPRP4m07yqxRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E17FAFEC; Wed, 19 Nov 2025 10:03:46 -0800 (PST) Received: from arm.com (arrakis.cambridge.arm.com [10.1.197.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 067983F740; Wed, 19 Nov 2025 10:03:52 -0800 (PST) Date: Wed, 19 Nov 2025 18:03:50 +0000 From: Catalin Marinas To: Dev Jain Cc: will@kernel.org, ryan.roberts@arm.com, rppt@kernel.org, shijie@os.amperecomputing.com, yang@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] arm64/pageattr: Propagate return value from __change_memory_common Message-ID: References: <20251112062716.64801-1-dev.jain@arm.com> <20251112062716.64801-2-dev.jain@arm.com> 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-Disposition: inline In-Reply-To: <20251112062716.64801-2-dev.jain@arm.com> On Wed, Nov 12, 2025 at 11:57:15AM +0530, Dev Jain wrote: > The rodata=on security measure requires that any code path which does > vmalloc -> set_memory_ro/set_memory_rox must protect the linear map alias > too. Therefore, if such a call fails, we must abort set_memory_* and caller > must take appropriate action; currently we are suppressing the error, and > there is a real chance of such an error arising post commit a166563e7ec3 > ("arm64: mm: support large block mapping when rodata=full"). Therefore, > propagate any error to the caller. > > Fixes: a166563e7ec3 ("arm64: mm: support large block mapping when rodata=full") > Signed-off-by: Dev Jain > --- > v1 of this patch: https://lore.kernel.org/all/20251103061306.82034-1-dev.jain@arm.com/ > I have dropped stable since no real chance of failure was there. I couldn't figure out from the comments on v1 whether Will's concern was addressed: https://lore.kernel.org/all/aQn4EwKar66UZ7rz@willie-the-truck/ IOW, is the patch necessary? What are the failure scenarios and what does the caller do? It's good to propagate an error to the caller but patch also changes the current behaviour by bailing out earlier. -- Catalin