Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2476371imj; Mon, 11 Feb 2019 03:35:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IblO5NJARUK0szTrtE8f5OxbihbZGfiLhZMFDJBZrx0aAyl+vYstzdx5OGWRunF3vrj5d6X X-Received: by 2002:a62:5e41:: with SMTP id s62mr35943059pfb.232.1549884956177; Mon, 11 Feb 2019 03:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549884956; cv=none; d=google.com; s=arc-20160816; b=ZLwc2eeOpf5QVO0eQVHo4opmfyso+4b57zS9PwPjCToLXopHzfxyfCa+NrYPVCJ14k 9ZLHuIwaCUgo8SPNCeTxSfrWh5bM64lflnHpgvsqQI2Gslosr4ZTomgmeAZYi0xkN/9t Jq++eP3SRcpJuuRT03zEvqnZKbNWqb0kvxI5TBneOkzpznxTFMvonko75hKFloCBmNt7 7Xphf/kiDEej7IhUv3qgfzwzOfMeRjVeF4hFZRyHTww/wFXVAaA26ssHVmdmY1ci7FjS Xqa9iqwGMFAyhZgX0UcBtxv6ryvPzueyIe86Gc6NZQ05jDu+JgSwQOK37oqK+ez7JZeS jjXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=28ky+bXLHZL8Q6irz0Ndlv4sv4qKX3u+rWXsKsrWEWg=; b=Fbc2rW7jlPxvoJGd+2dmddRUXiM8rcU+46H/2G/I/oT1+/+mrHAtuBn447i9KHkN0X 9rBIfAN3A3rvl26z7/BPJc/iYVaCg3PrQ1LJXg0WBN+buqV9pqXEfbDMaG1yga7vVmOn UWhD1/vvenpjB0AaqC+69MyvoQDyWXTjFLy82z/Wu/cA90luS2XLM3/bVsCLGUMgX3iF uMWTdqc1N5h0JtkYU/3T3Nz1IBUAVGWewFepQFSJFLv28DnspK/NbVqCvCsYfNMX7bYL 4BfXEkgefPdvnupwi84b8/A9s0Uo+oghPLgYeIexTBthQ72Drvmvw51FLtGBqWo7vRAq yGTg== 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 t10si1663046plh.91.2019.02.11.03.35.40; Mon, 11 Feb 2019 03:35:56 -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 S1726831AbfBKLev (ORCPT + 99 others); Mon, 11 Feb 2019 06:34:51 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:46026 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbfBKLev (ORCPT ); Mon, 11 Feb 2019 06:34:51 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6A25080D; Mon, 11 Feb 2019 03:34:50 -0800 (PST) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BFAC33F557; Mon, 11 Feb 2019 03:34:48 -0800 (PST) Date: Mon, 11 Feb 2019 11:34:46 +0000 From: Will Deacon To: "kassey@126.com" Cc: "kassey1216@gmail.com" , linux-kernel , willy , linux-arm-kernel , "catalin.marinas" , "mark.rutland" , "robin.murphy" , "ard.biesheuvel" Subject: Re: Re: arm64: copy_from_user access the last page of ddr has problem on 4.14 kernel Message-ID: <20190211113446.GB32385@fuggles.cambridge.arm.com> References: <20190116164817.GG1910@brain-police> <20190120020829.GA28576@brain-police> <201902011746430858184@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201902011746430858184@126.com> User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 01, 2019 at 05:46:44PM +0800, kassey@126.com wrote: > ? ? ?sorry for late response.? > ? ? ?we did have process in userspace doing mmap.? > ? ? ?mult device can reprocued this issue, so we do not suspect the ddr > not stable.? Multiple devices of the same SoC? > ? ? ?can you help review ?below patch to against with such issue, because > we find if enable kasan , issue not seen. Unfortunately, I'm not sure what more we can do with this unless we have a reliable way to reproduce the problem. What is the output that you're expecting to see in the page? You said that you're seeing the problem in sel_write_load(), but afaict that /is/ dealing with binary policy data for SELinux, which may well look like the corruption you describe. Did you run memtest as I suggested? Will ? > The corruption you have is reasonably regular: > ? > > 0079c00 6d6d 7061 0000 0000 0848 fd8f 0001 0000 > > 0079c10 0048 fd8f 0001 0000 0001 0000 0003 0000 > > 0079c20 2000 fd83 0001 0000 1fff fd86 0001 0000 > > 0079c30 0000 0000 0000 0000 700f 0000 0000 0000 > ? > Here's "mmap" again, but the record is twice as long: > ? > > 0079c40 6d6d 7061 0000 0000 f448 ffff 0001 0000 > > 0079c50 f748 ffff 0001 0000 0001 0000 0004 0000 > > 0079c60 3000 fd8c 0001 0000 2fff fd8e 0001 0000 > > 0079c70 0000 0000 0000 0000 700f 0000 0000 0000 > > 0079c80 c103 0606 0100 be00 1009 3b00 3b07 0607 > > 0079c90 0100 5700 1006 e800 8c03 3103 0100 0a00 > > 0079ca0 0000 cf00 bf08 0a00 0100 5700 1006 3700 > > 0079cb0 3906 0606 0100 1600 0004 4700 9902 0207 > ? > And then the whole structure repeats: > ? > > 0079cc0 6d6d 7061 0000 0000 f808 ffff 0001 0000 > > 0079cd0 f1c8 ffff 0001 0000 0001 0000 0005 0000 > > 0079ce0 d000 fff8 0001 0000 efff fffa 0001 0000 > > 0079cf0 0000 0000 0000 0000 700f 0000 0000 0000 > ? > > 0079d00 6d6d 7061 0000 0000 f1c8 ffff 0001 0000 > > 0079d10 f388 ffff 0001 0000 0001 0000 0003 0000 > > 0079d20 c000 ffdf 0001 0000 6fff fff8 0001 0000 > > 0079d30 0000 0000 0000 0000 700f 0000 0000 0000 > > 0079d40 9407 0901 0100 5300 0204 b400 d503 0a04 > > 0079d50 0100 0000 0001 0200 7309 0202 0100 0200 > > 0079d60 5000 0200 7309 0202 0400 ff00 f7ff 94ff > > 0079d70 b400 0208 0100 dc00 0000 b400 5803 0607 > > 0079d80 6d6d 7061 0000 0000 f7c8 ffff 0001 0000