Received: by 10.192.165.148 with SMTP id m20csp5415924imm; Tue, 1 May 2018 14:47:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZovBxl9N5M5uZ+OhL+gfajJdMdr+i80fJX4FNwfzd8P4m58NtYCBH8zS3PuY1AFcne0BZtG X-Received: by 2002:a17:902:59ce:: with SMTP id d14-v6mr18052582plj.253.1525211264613; Tue, 01 May 2018 14:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525211264; cv=none; d=google.com; s=arc-20160816; b=OgAvmYOAKzihVTZc6sjIyfC7byIdDufoTr+Kk2Nh10L1yqv2jvS8QbAKD6bgy1uHY0 kfXFI2cGUiUT/j0DehTHZghT9fPGUWZiFnP/KeoYoS7UvS5j67fMK6tUbngIdV5fehhb 5ymBug/cSSzgdGfrtvAH+sDgmcWwRPuOYxjwZKe2G0n3S6f7kWfQY2YyHxi6aTlGfZaR 7PlXU7IgsMpbFwMSI4XoY0SpMFwljj4PGcAaXVoScvuxLn56B3yF8T1U8NHXMRfReSkG nwiYhFt2mA8H3ORDg26O2ChZyl3yjeGppcskoKpBFd8Y3IPIAWK47wgVUYVhzTyWOxLb RvpQ== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=mGgWnBf5FVCSrAs4VsVeZMKm9JzXmEQmli/COUOvUaU=; b=0WDWgz/I1icl2kXLxPOntiFF5tmlMvUYpzzbRvcJnUebKbNFhpXpdXSyzWhnET/b+8 eIVWnrX2aaPEzbJsxNBQoGMsh+HQvpCfzje7flvkxuNYXnjRNTzbkkssjrGxsbF2FGKQ BAnXl7098NbWpCvSII214d9mni6QUO+BcsA/dXHfcRBPikUzZEPB/KLLgLT3U7aZ8gr5 +8u40XwIFV0ZsoPBs3QdXUiliKiuhPn3SZyi7dc3Xso/kgk/bL5PC4UzSlIyjd4aHz8H zNxHwYmUeHKm5W9H3pzDlkwlWDIUD7Pr/3vaWU6TjFHt1+7eZbLBxljz8HSn63rgDj4V 0OLw== 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 61-v6si10056284plz.290.2018.05.01.14.47.28; Tue, 01 May 2018 14:47:44 -0700 (PDT) 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 S1750863AbeEAVqH (ORCPT + 99 others); Tue, 1 May 2018 17:46:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55858 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743AbeEAVqG (ORCPT ); Tue, 1 May 2018 17:46:06 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A28EB407; Tue, 1 May 2018 21:46:05 +0000 (UTC) Date: Tue, 1 May 2018 14:46:04 -0700 From: Andrew Morton To: Laura Abbott Cc: Dave Anderson , Kees Cook , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Ingo Molnar , Andi Kleen Subject: Re: [PATCH] proc/kcore: Don't bounds check against address 0 Message-Id: <20180501144604.1cf872e7938bffc01a26349f@linux-foundation.org> In-Reply-To: <20180501201143.15121-1-labbott@redhat.com> References: <1039518799.26129578.1525185916272.JavaMail.zimbra@redhat.com> <20180501201143.15121-1-labbott@redhat.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 May 2018 13:11:43 -0700 Laura Abbott wrote: > The existing kcore code checks for bad addresses against > __va(0) with the assumption that this is the lowest address > on the system. This may not hold true on some systems (e.g. > arm64) and produce overflows and crashes. Switch to using > other functions to validate the address range. > > Tested-by: Dave Anderson > Signed-off-by: Laura Abbott > --- > I took your previous comments as a tested by, please let me know if that > was wrong. This should probably just go through -mm. I don't think this > is necessary for stable but I can request it later if necessary. I'm surprised. "overflows and crashes" sounds rather serious??