Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3636526ybc; Mon, 25 Nov 2019 18:16:09 -0800 (PST) X-Google-Smtp-Source: APXvYqyvTrOg6QpZLGaC11y1jlGq4pbK16PmutZTFH5mNyNfKCb36X10E9MHAl8GDfRWbycBGFwr X-Received: by 2002:a50:9b10:: with SMTP id o16mr21993565edi.117.1574734569215; Mon, 25 Nov 2019 18:16:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574734569; cv=none; d=google.com; s=arc-20160816; b=hkp+dPHcYVB7Bj5LeoVcAhkxS4S3WQv4qMqXef0ka0S0kbr28Hgqq7kHFiYovQuWkP zHB1vYEAzoamNoejBWu6HRrl7SW4WlNloVBjh8f4XVTRAmulqYbOV9nreQcZko7A4OO5 mLWpRdk/nXpBJlopdIvfEUnCQs932dXianqU3CmKb2zyHSytPXweAXADzxKxZrtbm+sf QXt43xHT45j4Wdn44SoAjkkWyk03XpEeQ6USxj9YwQJW5+W0LfyonP8lapDN7U6kHboB +LyUZ0gSRMd5FHeqPodeVhXVBqDqShL4BGkHXLpQVuMXjlqU4Gc7PLAMyPVnDuIAYsIY fEiQ== 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=dtgS4AGmvnEOifgu2Dt4VbOy1bsdf4mvEndYAr4ZPQc=; b=D69LRz8qStJkefwmAt4epHUvG6h4aKXD4rltjbWRWOgvH8MUmnZzzRl8CxDJBkkA7G gApLKbcNJ+zTBYHUFPYQsQ+zy9fiO0MjYO7V6mgtBGC0k7KKqpjMOHQ4kPGn3svkEJK+ lA2pedDAJehBy/RfGCIWUBWczyK7T0xM///Mi7kp3awysC+sLIvvQZfuGgbSpxwv73wn O180RRqww4+waUAydvBfUP44bbQkNEiFVCuzvMpfdQq6GFmEjuVYxKubNWEfX8emh2I4 aBD9GDGlTYQjLKpQHcNmPpPT3O4SdQIbToX02J6C4Y2p/hnDGTSS5k+daO6IonIxUxze qjvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Xcu+cb5O; 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 gx18si5996616ejb.245.2019.11.25.18.15.45; Mon, 25 Nov 2019 18:16:09 -0800 (PST) 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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Xcu+cb5O; 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 S1727263AbfKZB7F (ORCPT + 99 others); Mon, 25 Nov 2019 20:59:05 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:44833 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726970AbfKZB7E (ORCPT ); Mon, 25 Nov 2019 20:59:04 -0500 Received: by mail-lf1-f67.google.com with SMTP id v201so11615475lfa.11 for ; Mon, 25 Nov 2019 17:59:03 -0800 (PST) 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=dtgS4AGmvnEOifgu2Dt4VbOy1bsdf4mvEndYAr4ZPQc=; b=Xcu+cb5O2TRvEmYjhRf68ZKdECWrEP4UqOWaPs6ps+DSWuyv4onfE367judclAVziS +C2IgAqMN/5ZRCLuU/DyFk9kn0jx94QeB0m6YUmx8qcLUXgMFhZqfYnwHO4pU0q8eSri u5hc3Hq2+9rvh6b1Ao1AXld8Rpmhd4L7sDx2Q= 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=dtgS4AGmvnEOifgu2Dt4VbOy1bsdf4mvEndYAr4ZPQc=; b=T8mZVB2UavjFQi0jBRiCb7PjquItnOdAHPOPGEZSW0bLso0rU3Qwxk6Npl0KkjhigZ 2h1IfYeGLfu5IofA7vVgq3nQ7aCvdwB9n1QaefeGYf4YdusP37dLCRWz8BfjojZrFTLo sgk5hfbZep1Ya2gTcY7vhkKfRogEkdh4RCPWy0FWBoaeiRBdhTw5hlpyfOCpAtllpG6W Br5G96Z+ICKqkVoHAZoSpGvCpes5A7X32j6YxqQ1MSYF5goFxoT+1CxiWTgagHjcdY/J 2eGPeimB/yAHrzQ7RWNF/ue/nR8ovflrgX/OmYLC6SswbIQp3TIKtGzpvoaaM8sgQIkS DkDA== X-Gm-Message-State: APjAAAVoMQxserb3ZaucBuVT7JJbNzIDZbKrr1xeqtXgHDtkmHjB5pnn P2/REECNXDz+dAvbnNfJVY5JldwuFcQ= X-Received: by 2002:a05:6512:4c1:: with SMTP id w1mr22696691lfq.141.1574733542332; Mon, 25 Nov 2019 17:59:02 -0800 (PST) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id g11sm4418497lfb.94.2019.11.25.17.59.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Nov 2019 17:59:01 -0800 (PST) Received: by mail-lj1-f179.google.com with SMTP id t5so18258512ljk.0 for ; Mon, 25 Nov 2019 17:59:00 -0800 (PST) X-Received: by 2002:a2e:2c19:: with SMTP id s25mr24510476ljs.26.1574733540177; Mon, 25 Nov 2019 17:59:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 25 Nov 2019 17:58:43 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Commit 0be0ee71 ("fs: properly and reliably lock f_pos in fdget_pos()") breaking userspace To: "Kenneth R. Crudup" Cc: Linux Kernel Mailing 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, Nov 25, 2019 at 2:55 PM Linus Torvalds wrote: > > Anyway, here's a TOTALLY UNTESTED patch that may help pinpoint which > thing it is that causes issues. > > It might also be so noisy as to be useless, I didn't think it through > a lot. Yeah, I ended up testing it between merges, and it points out a lot of files. Too many to usefully narrow down which one then might cause problems for you. The main cause of that is that it will complain for _every_ O_PATH open, because those use the 'empty_fops' and don't actually allow any operations at all (neither read/write nor llseek). We could have marked those O_STREAM, since they can't be used for any seeking operations. So to get rid of at least _that_ endless noise, add this to the patch: --- a/fs/open.c +++ b/fs/open.c @@ -748,7 +748,7 @@ static int do_dentry_open(struct file *f, f->f_wb_err = filemap_sample_wb_err(f->f_mapping); if (unlikely(f->f_flags & O_PATH)) { - f->f_mode = FMODE_PATH | FMODE_OPENED; + f->f_mode = FMODE_PATH | FMODE_OPENED | FMODE_STREAM; f->f_op = &empty_fops; return 0; } the above is entirely whitespace-damaged, but you can see what it's doing. That should cut down on all the noise generated by O_PATH opens. It might still be a bit noisy even with the above, but I think it will at least be better. Linus