From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nautica.notk.org ([91.121.71.147]:56633 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbeIFCdO (ORCPT ); Wed, 5 Sep 2018 22:33:14 -0400 Date: Thu, 6 Sep 2018 00:00:48 +0200 From: Dominique Martinet To: Andrew Morton Cc: Omar Sandoval , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexey Dobriyan , Eric Biederman , James Morse , Bhupesh Sharma , kernel-team@fb.com Subject: Re: [PATCH v3] proc/kcore: fix invalid memory access in multi-page read optimization Message-ID: <20180905220048.GC13782@nautica> References: <1536100545-26905-1-git-send-email-asmadeus@codewreck.org> <1536100702-28706-1-git-send-email-asmadeus@codewreck.org> <20180905135717.ff763b34c4a3f1ca500d715b@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180905135717.ff763b34c4a3f1ca500d715b@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Andrew Morton wrote on Wed, Sep 05, 2018: > lgtm. Let's add a nice little why-were-doing-this? Sure, thank you. > --- a/fs/proc/kcore.c~proc-kcore-fix-invalid-memory-access-in-multi-page-read-optimization-v3-fix > +++ a/fs/proc/kcore.c > @@ -464,7 +464,7 @@ read_kcore(struct file *file, char __use > ret = -EFAULT; > goto out; > } > - m = NULL; > + m = NULL; /* skip the list anchor */ > } else if (m->type == KCORE_VMALLOC) { > vread(buf, (char *)start, tsz); > /* we have to zero-fill user buffer even if no read */ -- Dominique