Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp62430imm; Wed, 5 Sep 2018 15:02:38 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb+Q80I3a0mKi6EM//+KNrQXG6qNZSWMQK857d9BlJ3kfm3ceYPHgzTAk+afjKj+G4oRSL/ X-Received: by 2002:a62:6d02:: with SMTP id i2-v6mr43387799pfc.218.1536184957947; Wed, 05 Sep 2018 15:02:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536184957; cv=none; d=google.com; s=arc-20160816; b=Ow044/6aVtD2cDLV1NiD3sHfpYMqGe2qUMUmouubWgn8QcOD20wjPGn09Ptcq46yMV X51S6i19JRmtqzFMju8SFcKaVtWFRnDqnzaFZ1wfZKYCXKxjwLxR9xjy5SIRFBOg5a7q V0GjOMzFCv2mV5Hc4myxE2pl9y/kDY2xCw/bkJge/K3EV/cKoSboSdfeyDrl9yXo6BLl nPXMgP301CMSjXypUWnyfLp/RUVn18EAUQz7BG+9MrGjnTYTwEyDnfr9LiS41pkWY0vv jcmEYId9tDkPQGBPhbLlRlc7LqaLzmAAeemCTxWYgI+OXPRX90QTVMfjZCz3QDmnRvjx 4pmg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=go6LvhRHVNKOOOaLsMEvBYGyfhbqwSBW0JgG2Tj5H1w=; b=SD9NXrB0/BiLqkfNnITg+74/0ztZcEHLLQ5/Xv7HJDh1ViCcU7q1DTVG2wnlHScSYn +AEBKGqADLjrVATtqQOdQvc8Z4sExz9N0PpAO86roGN93wyjeOYTFF0cAh+tkv2VK5Ic cvI9B4gQK+Z05zc9mwDSle/CZti/pxJeU47RCsM8U1XOdBiV5QYUIg3QU9bbomr/wnEn EMPtNrKpvZKq8Y3HSMZnj9VZ+SYfcarmrGqPE5bZHIclbaoDoGKa4AvUBfvx9WwEnCCz l61/jOFXuHBMLNr1XUZUwXzShhH/9FQ4GWyYMpk8DappI9agkEL+EiMDOxV+g1ad0AOR UK8A== 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 o7-v6si2960878pgi.53.2018.09.05.15.02.20; Wed, 05 Sep 2018 15:02:37 -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 S1727738AbeIFCdO (ORCPT + 99 others); Wed, 5 Sep 2018 22:33:14 -0400 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 Received: by nautica.notk.org (Postfix, from userid 1001) id 6E5F4C009; Thu, 6 Sep 2018 00:01:03 +0200 (CEST) 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> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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