Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4399797ybl; Tue, 21 Jan 2020 19:49:37 -0800 (PST) X-Google-Smtp-Source: APXvYqynfq5o57LpbkUsSXAy4ZKRYXOOeWLTKcEzSo2XUkdpYXmd+CN61mCxsqbTYrqI5V2Mq3oy X-Received: by 2002:aca:ec93:: with SMTP id k141mr5154874oih.145.1579664976913; Tue, 21 Jan 2020 19:49:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579664976; cv=none; d=google.com; s=arc-20160816; b=knwer1lzWrNw9Sh63nOtn9fVDpzPk8ug5DSQ0i87CWB1qP4eYAvqccYXkmyZJOabIG 8R6jrNYnTeR/icYDyYGSBt2fnr4wTU077XywN+9Xrao6JnyXBS0ly6CPrqGi1op2x/FS 8s4TQHc5YkyLJQWTfH+paeYRWAU9QiraSYuVCQ8R7z8x1vaBl9iPSC1kIQ6YqlKFHqpG s9qMxFO+JiXdKH3irSqFpRslJQvh13xUB+babVEZJhIc0BzpnFulhsSBEjOEOEvCBUY2 2vymYwY3OCM6fxiYn9EA/QONuQBcNNz2i4VohNBPHJONTweZwU0GBICDluswpIqeC3of I3lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=6LujYH3pJmxnQud0C0PgekOmiu1eJWCO6m1XDIDyyLc=; b=eOV2qgE+w+d0XYN54H1HNSiBYRCQz5Kq7nwAZV5KmyoP8xwAVo26UUPG0opMRHAbkO rqMbQFxMZGq2UIQWxp5rzeQPA82MP/Qyo+fbXhSY0k+hRxAFD9x6HRjcntkz0fptgnLN TofPfAk4J9UWQ/idQ3mNdx5umT/8BVZQ3THJ8rWvcDae6ZFN+LP9MdHZqtgy56AE6m6k rMZ+9TkdXjJ+HrFyFa/Sj57Faa2kpt2VxL1pzTnsb73Pa/bdwCRiu+tayW8iW+lYIQ8X q15vEhoFenYk7l955pip6581m1dDt9LvU9tAdejxqxWCzJk04aYCWeFNOLmc6h7rrOzF mJdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r202si20973980oie.247.2020.01.21.19.49.13; Tue, 21 Jan 2020 19:49:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729110AbgAVDq3 (ORCPT + 99 others); Tue, 21 Jan 2020 22:46:29 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:51782 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728900AbgAVDq3 (ORCPT ); Tue, 21 Jan 2020 22:46:29 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 6BF011888F5AB7914759; Wed, 22 Jan 2020 11:46:27 +0800 (CST) Received: from [127.0.0.1] (10.173.221.31) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Wed, 22 Jan 2020 11:46:18 +0800 Subject: Re: [PATCH] arm64: mm: support setting page attributes for debug situation To: Will Deacon CC: , , , , , , , , , References: <5a3ab728-b895-0930-9540-5e9c586e8858@huawei.com> <20200116110914.GA16345@willie-the-truck> From: Yunfeng Ye Message-ID: Date: Wed, 22 Jan 2020 11:46:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20200116110914.GA16345@willie-the-truck> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.221.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/1/16 19:09, Will Deacon wrote: > On Fri, Jan 10, 2020 at 03:47:41PM +0800, yeyunfeng wrote: >> When rodata_full is set or pagealloc debug is enabled, block mappings or >> contiguou hints are no longer used for linear address area. Therefore, >> support setting page attributes in this case is useful for debugging >> memory corruption problems. >> >> Signed-off-by: Yunfeng Ye >> --- >> arch/arm64/mm/pageattr.c | 18 ++++++++++++++---- >> 1 file changed, 14 insertions(+), 4 deletions(-) > > Although I can kind of see what you're getting at, I'm not keen on merging > this without a user. If you're just referring to random debug hacks, then I > think this change could be part of those too. > Ok, thanks, I think when pagealloc debug is enabled, it is better not limited to the vmap area only. and when kernel memory corruption problems happen, it's useful to call set_memory_ro() function to debug these problem. > Will > > . >