From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) (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 0BC733FC5C6 for ; Wed, 27 May 2026 11:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.110 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779882307; cv=none; b=Q+vTmdARd7ZHkmieKH4/6LVCP+FxnNL7CbgPl6ypEd+Ea5lQCdoAhRHH6GStQ6PaF2BB9G6KUqy99prExGc1uoUfzxtMDjBTNRRW2cou48jucA1CTLQ1exwFovHOkrny+Qtafxs5g+DIjD0aCNXZ6iPSQKhigVV51yXj5XKI+2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779882307; c=relaxed/simple; bh=Uxbm2/HOe+usjvALvbjiaTjkzuEzrNq0Ax5SU6YIEaE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YkWlfjtS8lzljD1Dmcnjd6VDxsClu3pmd27SEYMiT4e0PEk/gvExKCAfactfMc4f//TrthonPcaw5h9iYlezW06OlOXZ+46ait/jQZN2jB/CdLH34u42sp5rLJyZXOeKskumAvNw/gD/HVtBKFfaSbMYkQqkzBhYxuyzBZSTyFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=KWwKGZre; arc=none smtp.client-ip=115.124.30.110 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="KWwKGZre" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1779882295; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=oUB0kHUhBy3ng5DetQ30N4vUPE1VonqsLOG2jbmUYA0=; b=KWwKGZreojKOhur/byN710zgQUAeEcVHDS8delAwewiY17gUqIbgVdKuZ98YzDUtOdwp3dV8xQxOf1ITwYMy7Y19hdO8/NlTtECJ/uaHDRRyOGBycEe6lKsLFTbkCIw6vUxFd96TnHj2bw8aLpL1f3upJ7+qUtsssjISHYRYua0= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam011083073210;MF=xueshuai@linux.alibaba.com;NM=1;PH=DS;RN=29;SR=0;TI=SMTPD_---0X3jezDI_1779882292; Received: from 30.246.179.14(mailfrom:xueshuai@linux.alibaba.com fp:SMTPD_---0X3jezDI_1779882292 cluster:ay36) by smtp.aliyun-inc.com; Wed, 27 May 2026 19:44:53 +0800 Message-ID: <8ebf43de-16c1-4798-8d48-c93390ab6df0@linux.alibaba.com> Date: Wed, 27 May 2026 19:44:47 +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 v14 4/8] mm/hwpoison: return -EFAULT when copy fail in copy_mc_[user]_highpage() To: Ruidong Tian , catalin.marinas@arm.com, will@kernel.org, rafael@kernel.org, tony.luck@intel.com, guohanjun@huawei.com, mchehab@kernel.org, tongtiangen@huawei.com, james.morse@arm.com, robin.murphy@arm.com, andreyknvl@gmail.com, dvyukov@google.com, vincenzo.frascino@arm.com, mpe@ellerman.id.au, npiggin@gmail.com, ryabinin.a.a@gmail.com, glider@google.com, christophe.leroy@csgroup.eu, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com, tglx@linutronix.de, mingo@redhat.com Cc: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Jonathan Cameron , Mauro Carvalho Chehab References: <20260518084956.2538442-1-tianruidong@linux.alibaba.com> <20260518084956.2538442-5-tianruidong@linux.alibaba.com> From: Shuai Xue In-Reply-To: <20260518084956.2538442-5-tianruidong@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/18/26 4:49 PM, Ruidong Tian wrote: > From: Tong Tiangen > > Currently, copy_mc_[user]_highpage() returns zero on success, or in case > of failures, the number of bytes that weren't copied. > > While tracking the number of not copied works fine for x86 and PPC, There > are some difficulties in doing the same thing on ARM64 because there is no > available caller-saved register in copy_page()(lib/copy_page.S) to save > "bytes not copied", and the following copy_mc_page() will also encounter > the same problem. > > Consider the caller of copy_mc_[user]_highpage() cannot do any processing > on the remaining data(The page has hardware errors), they only check if > copy was succeeded or not, make the interface more generic by using an > error code when copy fails (-EFAULT) or return zero on success. > > Signed-off-by: Tong Tiangen > Reviewed-by: Jonathan Cameron > Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Shuai Xue Thanks. Shuai