Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3652126ybz; Mon, 27 Apr 2020 20:37:57 -0700 (PDT) X-Google-Smtp-Source: APiQypJ7Vb+mEO79LatsYSFLCksgSy/ooP34cDr1IZBpBN3RjIrcrqLnnavDjuN+WpxvJ+NHcQUK X-Received: by 2002:a17:907:2098:: with SMTP id pv24mr23245853ejb.22.1588045077256; Mon, 27 Apr 2020 20:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588045077; cv=none; d=google.com; s=arc-20160816; b=gTog+gahJPVpUVT9VPqnAureR9J0T0GV8iCvY/NatcGr+z4YaA0ELo16FVRT2PohAO giyT14Dzfkr4TzXOdfVpyVD0ZwFdmtwv/rcPRGGqTmuMHmiS+JB41XBBPbYYlQOEqew3 ZiBGgpCdV67emFjwZxTvTD9zpufyfvgRLDsoB0EMmeal9MxkoV2gZ5rBNM5aZjUbcg0O nbBvq11ye3GwfFk7OQBPFgk6NvVYqn+UBLyvRd2Au2nuoahq9rKtPuJ4zooUc7oC7fNE 0ka8wKfrzGtydIPVNF0PY/Z7LIIUcunQ/MH4azTCAStpOARg+oizPc/r5jm/HVi8O6CX UTZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Q1Hl4EoAQeecS6RJeMB353EzxseO3r7Hp2yIzNObp3I=; b=HNIhUDlxQIDXA1e0sGrAnc60Gmc40amjgrw8WPRGyT8762g+CaHzWVe8mAAA0tCnah 5cgE1GQHP/+MYiVzIagzhleBKVv54lIO0mDikDIA8HoAmQk4b4hYNAFfxkI1bWI5qdaj 8Xp6TZ/vbXppZ4UFFzQIceKeeVir10HTVOUwKi8ntBoHiflgbC6gh/EpKYgBzJajIavR xivsntgF7jKCGBBPAH2IjMs5kbSYF8agogzqGj5eAKXY91XZB1Vw6OBHxD0eG2aFBjYw u7ee8UrEB18ebJ9oMf8K88DvI1KZAxrVRGtfThguitj+j77qP8VfRFqGYQHo1NzM+lro +2gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=SplrAUnt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si965481edr.528.2020.04.27.20.37.33; Mon, 27 Apr 2020 20:37:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=SplrAUnt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbgD1DgG (ORCPT + 99 others); Mon, 27 Apr 2020 23:36:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbgD1DgG (ORCPT ); Mon, 27 Apr 2020 23:36:06 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2D3FC03C1A9 for ; Mon, 27 Apr 2020 20:36:05 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id m2so15639325lfo.6 for ; Mon, 27 Apr 2020 20:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q1Hl4EoAQeecS6RJeMB353EzxseO3r7Hp2yIzNObp3I=; b=SplrAUntYpA62B1N75YvHPdEO4shjtitO6O7fp81NGqZCL/liBkn4YGhS2ufiW89mA 6QRtLc38lw6xNb2vgvLJDvqC9mE3aqUJAqwD+PeOfBSBP94LeZ1hMSN6COmTdIaxaQpS UpK5WWl4Kpc44DM72q0SRTuLkDG5Cy7pTFjlU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q1Hl4EoAQeecS6RJeMB353EzxseO3r7Hp2yIzNObp3I=; b=mTsxgPPCXvW1Zi/fcqKUP3AnF7y8cxraihjGe1moKqEK8HKPB1mLubFexqGpsZJrxh I/kXz3hgI+4ZsNxJ5NVzDqzoG8rxrTy5tMrNMHqzA5QMLviDqmIibGygAFNQpWI1fC+F WZD5LNvl7BxztUwOGV8VEvN3PtLuHzjAkfM+RdkAuoaHp/nlSFm47H9kVmX59IXzwAFk 9DtP0MhsXpEBusGfJspwnAsvksNOzTPnzfXnc2wBVB7P/fG0RKmuY/wEcNeuor/Em83i ENp4X6yYclMMMSDijBp7WKwlQNUPvkY4Yikde0etMjM4skv3Rrq9z/PldirCiOqGDCMQ 1m1A== X-Gm-Message-State: AGi0Pubxl+WVbUCNLZM1xY0+78F3p8fvj8Afjgqw++1C0TvaapJwXDhb hfy4+3DqlE5zyM5187P6P+c1boQIgdw= X-Received: by 2002:a19:ae06:: with SMTP id f6mr17411962lfc.97.1588044963580; Mon, 27 Apr 2020 20:36:03 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id j14sm13090863lfm.73.2020.04.27.20.36.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Apr 2020 20:36:02 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id k28so15651043lfe.10 for ; Mon, 27 Apr 2020 20:36:02 -0700 (PDT) X-Received: by 2002:a19:9109:: with SMTP id t9mr18095968lfd.10.1588044961861; Mon, 27 Apr 2020 20:36:01 -0700 (PDT) MIME-Version: 1.0 References: <20200428032745.133556-1-jannh@google.com> <20200428032745.133556-3-jannh@google.com> In-Reply-To: <20200428032745.133556-3-jannh@google.com> From: Linus Torvalds Date: Mon, 27 Apr 2020 20:35:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/5] coredump: Fix handling of partial writes in dump_emit() To: Jann Horn Cc: Andrew Morton , Christoph Hellwig , Linux Kernel Mailing List , Linux-MM , linux-fsdevel , Alexander Viro , "Eric W . Biederman" , Oleg Nesterov , Russell King , Linux ARM , Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Rich Felker , Linux-sh list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 8:28 PM Jann Horn wrote: > > After a partial write, we have to update the input buffer pointer. Interesting. It seems this partial write case never triggers (except for actually killing the core-dump). Or did you find a case where it actually matters? Your fix is obviously correct, but it also makes me go "that function clearly never actually worked for partial writes, maybe we shouldn't even bother?" Linus