From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 980EFC83005 for ; Tue, 28 Apr 2020 03:36:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 47170206D9 for ; Tue, 28 Apr 2020 03:36:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="SplrAUnt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47170206D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id EBB518E0005; Mon, 27 Apr 2020 23:36:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E6C0E8E0001; Mon, 27 Apr 2020 23:36:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D819C8E0005; Mon, 27 Apr 2020 23:36:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id BFC418E0001 for ; Mon, 27 Apr 2020 23:36:06 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 78C8F181AC9B6 for ; Tue, 28 Apr 2020 03:36:06 +0000 (UTC) X-FDA: 76755850332.26.chin44_8c9977e891406 X-HE-Tag: chin44_8c9977e891406 X-Filterd-Recvd-Size: 4213 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Apr 2020 03:36:06 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id r17so15649736lff.2 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=RkLdxYHyAZi0lVoRBXbA+hEDDrvpE23s31bWWKOoUGwiW2pHA5kIATvPYSEnbekEfQ AOC/yeyl0Z83YXuAlxjINHVK7OP7hqm4P+KYjTKNPi2RBGPpnxhyaSzYBGGUXkuTZ4Cf uS1BJUcryz2e81J7Lt9djpt+4NVTpvOpfpQvU3XIERPSoINPP2MAHOoA98wqc3Fz11UL Hp7dvn9w6taXDv3hEerpxRpKt5YobhY1xvsRzjxkwrq4m0VcBq1mCRs+n0t7GbpFqqTq m0wq8YdRU5UA3DUe6MW5Pr8FcmA9v5WNRguTodXfYZaZ4qqXPfUWs+avE/vwrORtuxgp SZjw== X-Gm-Message-State: AGi0Puaz5zJQEmJEGUXDbuIffoV6BFEJz6Cplh+ZLZgZUlsvADYk/17u rdgozyaU05jUHMAH+iffIEHmdGrPNr8= X-Google-Smtp-Source: APiQypIcRzob+xdXQjsWRjjgYT0msgAYbWjjpitWDyQtbD8ZOiEzP5wYUdS2z+ISOAiZ606qtpvEkA== X-Received: by 2002:ac2:5607:: with SMTP id v7mr17549028lfd.212.1588044963539; Mon, 27 Apr 2020 20:36:03 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id 25sm12801784lft.68.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-f49.google.com with SMTP id g10so15575802lfj.13 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" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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