Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3715495ybc; Mon, 25 Nov 2019 19:59:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwnPLWk7QjOrzFNS51BmQ7puJvqcu1AU5JBkN0ODMc+pn6DLrLR6kRr/duv5Z1gWTSjltR5 X-Received: by 2002:a17:906:7c4e:: with SMTP id g14mr40580954ejp.150.1574740788499; Mon, 25 Nov 2019 19:59:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574740788; cv=none; d=google.com; s=arc-20160816; b=x+BbX4ijU9Lwz+NkFpIGxyK/X75I6b62qtFtBakTCHRfYglhp4q0vNKPjJh7MXzivx pzBWx4gSwq6Lol2Ew93Eb+0eMZ8NWxqcyvzIJ1wUlwCPWFKraRFj0ry7HdfChhyDZmpH 6JiOBF5+4qIzp/wUrOn9xY4TgcK8aprvmz0E3u//q8p/qmfNjpB82xCJE2/OhWNM9B1x laJdEHk4EqW8plrRdv65MJC1LE+Rz8R+50UE+kO/BZB9K5GI7UnqYDkIPIfPv7noh8+f Irt0y5w06SDjS6+yd/fvi+Jtp9u/JRrpXd6abIXOLhgN+TiJhZZA3qmMCznTA2O2I9nh FSCg== 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=QAsbatHetIYu7IpZnpElY/9AbQdSftUbSJrBDOCvXM0=; b=Hdsl6mTiMschPcynYqnalxZVlDiM4MNO4v2exoZTdMBqiTkoqXRIY79aef9f6BEIPo LMv+OE9gxwW8lv/kjTsqR+ED2GkdMNCbjiU+M1Gv99VdnBDEGLSEDwFB6BkWo/onH7p6 s0207I92uOPRnvzb+gPfluIgEf7Q0QP9aDyWx1TD29BNebk3kgmBPFQl7kc064Bn18wn 7kJTs+RyWWsmdAW3tby9BH4y23VLrrm+Gw6w3Np3NdFOS5qc8OuTm9rOV1J3eehdH1Bv xZA0Ynju+eQ1Me8/in6paVOfZxa6SE2SE2oEH8Btitc4IRi+0w+bMBSVI82xypduZLMj FLGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DG7G+WpY; 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 z25si7394999edb.42.2019.11.25.19.58.40; Mon, 25 Nov 2019 19:59:48 -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=DG7G+WpY; 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 S1727261AbfKZDfJ (ORCPT + 99 others); Mon, 25 Nov 2019 22:35:09 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:44233 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbfKZDfI (ORCPT ); Mon, 25 Nov 2019 22:35:08 -0500 Received: by mail-lf1-f65.google.com with SMTP id v201so11757746lfa.11 for ; Mon, 25 Nov 2019 19:35:07 -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=QAsbatHetIYu7IpZnpElY/9AbQdSftUbSJrBDOCvXM0=; b=DG7G+WpYZwC1Yf9w/IXlwSm2PXKyPA9N12zDYr5fhKCt8mjbpZ7lRFkRwWkjNxnP3A rOb0Os3jYSFZkHLA35waGuSmCQJ1fZ34rjluiQU0RLmnsPtpVB53yJV3TyeapjGgRFBT 4Uew/6e3ELQfD63IoD7aqKY4BS2r2CL8sTrxY= 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=QAsbatHetIYu7IpZnpElY/9AbQdSftUbSJrBDOCvXM0=; b=o3rrfP6k+lTQk3qyY61GvL1FRF1oQWm2MEigR0NOeqKrriqmLYDnFJyAf1iT5N3jBd XMxcuKo7fHnn5mwX80NLLQIEB20fUPSU30Jrnl1AVnRHDijKAV3Xa+p6Ot16i2+Ut2Xw emT668krTI0M3eFFPZzRxzxfbmo9+IWZ5ZZpfAeN61BxDFqUFBcpMHP3ViqtLmGfJFqs N7xRJ/9xtcleyMHEX0oGDteaoxs5Y4B9hD61OpAgqTjypyC3x1prpx9ODtfisDuIdKC1 3nSJ2jt33Vhm0BdXT2m931hi97UEuMJtHM5lGXhbQi1xVWpEBlaHsnzkd/9KD/V4PiFb mFOA== X-Gm-Message-State: APjAAAW018VnBmkXG0ByN8ubjLIY/sBnetRwhKExZ7RrHNEHvQAogedL SdIDs65O3TbKC9Rao14aUsarBokQcu4= X-Received: by 2002:a05:6512:4db:: with SMTP id w27mr22967600lfq.4.1574739306304; Mon, 25 Nov 2019 19:35:06 -0800 (PST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id y6sm4731207ljm.95.2019.11.25.19.35.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Nov 2019 19:35:05 -0800 (PST) Received: by mail-lj1-f176.google.com with SMTP id y23so18389235ljh.10 for ; Mon, 25 Nov 2019 19:35:04 -0800 (PST) X-Received: by 2002:a05:651c:331:: with SMTP id b17mr24854198ljp.133.1574739304698; Mon, 25 Nov 2019 19:35:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Mon, 25 Nov 2019 19:34:48 -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 , Kirill Smelkov 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 7:21 PM Linus Torvalds wrote: > > Anyway, I think the thing to do (for now) is to just say "character > devices are FMODE_STREAM files if they have no llseek operations". > That should take care of both tty's and the sound devices. A cleaner thing might be to add an explicit field to 'struct file_operations' to show that it is a stream operation. That would make it much easier for drivers to say "mark me as a stream" without having to change their open routines (not all cases might even have open routines). The file operations already have a history of this kind of "this is what I support" flags with the "mmap_supported_flags" mask, which is a different (but at the same time somewhat similar) set of "this is the set of operations I support" thing. FMODE_STREAM wouldn't be that different. Anyway, I was clearly too optimistic as to how painless this would be. I tested it on my desktop and laptop, but they have very similar setups other than their form factor, so the fact that neither showed any issues was perhaps not all that meaningful. Linus