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.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 DD859C43331 for ; Fri, 6 Sep 2019 17:15:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5D1320842 for ; Fri, 6 Sep 2019 17:15:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567790111; bh=Pdd5X5KdmhTY3zVAeyGvUCWFX8Plc6Z4m96rFXEwVAk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=GxL41qzM1unxlu1Pc5iJsW+446mX6DZKz5E7Mmg/JrogOKtiPJ6UP3Mi/pg5hnV4m 4qjjVeoUx2mrjwbfBeEw2/048of7G66FXYzLy8/YCQbQ0DtnPlMzc7P1TwUHLV7o9X yTEGPkaRvdW5Q03hCN3MemA0e05GYd50z8F/Coog= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404096AbfIFRPL (ORCPT ); Fri, 6 Sep 2019 13:15:11 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:46193 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391025AbfIFRPI (ORCPT ); Fri, 6 Sep 2019 13:15:08 -0400 Received: by mail-lf1-f65.google.com with SMTP id t8so5631033lfc.13 for ; Fri, 06 Sep 2019 10:15:07 -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=HgnD7xuPPV7kJPJv1y/oxrmL+dxJJMuTrQ4Q4FChOdU=; b=S6FXIRgesHQioG8oGxLk5Tjwzb4SPiDI6TQkN/1PfVNUkJMeUM47+DjxmFZZnsgnqF aVUh5gjMjdVeG3Ez1LdJPa9NKOGaCIHQumkrSOBf3OS+YC+yfMLrM6/zSsHJRG8ghrAg d5Mr3bY5beGZhlJwy9YNIxLVtQzi4ydOFbhE4= 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=HgnD7xuPPV7kJPJv1y/oxrmL+dxJJMuTrQ4Q4FChOdU=; b=bAsV2jTKjT8cqZ2o8OYERUtK0ik9VM5y4PiWVAg+VMIHm7Bc4ZnST+cvKwShOXuRIc HNkJS1Bk7Nz0Aj1PBQcFugsvAuzG0RczlhljGOwDKKHtgbMRnlqtxa87s4QRdwVyc+I5 KpEyqEWjsAcLZKm6drQ2d2Y89hH64Vodoj0nzgave4fXw4ySfc+IMqVxD/Di6LZ7Jrlp NjYmxi0OEuM4sIjGLwthgT7MrXezpZMPQdJQ8n20x44jL/3T5+f6JCC3E0wAmvZXADhU HOCcqEn6aM9XchXGpjci+v1o1wsiFjVlMHQqvLTAYAjMfj2jFPJWPJHStg8/PUFWyKxU /asA== X-Gm-Message-State: APjAAAX/cmHkUOIAr3Yt4xwOxe8HOgMx1mwpOC0EMBbXHI3sfKuT1XpM QEmrzUKMGYmMqvz13QTZXZE5lGrKNWE= X-Google-Smtp-Source: APXvYqwkj8Eq/zQ08jSu7+Tp0P85ye2lipR/sBPp+mKEWcNXyXk6UWQyfmu/tHhvKfAJXLpJpDtYkA== X-Received: by 2002:ac2:54a9:: with SMTP id w9mr7565225lfk.49.1567790106877; Fri, 06 Sep 2019 10:15:06 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id u8sm1403592lfb.36.2019.09.06.10.15.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Sep 2019 10:15:04 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id a4so6684521ljk.8 for ; Fri, 06 Sep 2019 10:15:04 -0700 (PDT) X-Received: by 2002:a2e:8507:: with SMTP id j7mr6626752lji.156.1567790104003; Fri, 06 Sep 2019 10:15:04 -0700 (PDT) MIME-Version: 1.0 References: <156763534546.18676.3530557439501101639.stgit@warthog.procyon.org.uk> <17703.1567702907@warthog.procyon.org.uk> <5396.1567719164@warthog.procyon.org.uk> <14883.1567725508@warthog.procyon.org.uk> <27732.1567764557@warthog.procyon.org.uk> <8e60555e-9247-e03f-e8b4-1d31f70f1221@redhat.com> In-Reply-To: From: Linus Torvalds Date: Fri, 6 Sep 2019 10:14:47 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Why add the general notification queue and its sources To: Steven Whitehouse Cc: David Howells , Ray Strode , Greg Kroah-Hartman , Nicolas Dichtel , raven@themaw.net, keyrings@vger.kernel.org, linux-usb@vger.kernel.org, linux-block , Christian Brauner , LSM List , linux-fsdevel , Linux API , Linux List Kernel Mailing , Al Viro , "Ray, Debarshi" , Robbie Harwood Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: Archived-At: List-Archive: List-Post: On Fri, Sep 6, 2019 at 10:07 AM Linus Torvalds wrote: > > Hmm. Maybe somebody can come up with a good legacy signaling solution > (and "just use another pipe for error notification and OOB data" for > the first one may _work_, but that sounds pretty hacky and just not > very convenient). ... actually, maybe the trivial solution for at least some prototyping cases is to make any user mode writers never drop messages. Don't use a non-blocking fd for the write direction. That's obviously *not* acceptable for a kernel writer, and it's not acceptable for an actual system daemon writer (that you could block by just not reading the notifications), but it's certainly acceptable for the "let's prototype having kernel support for /proc/mounts notifications using a local thread that just polls for it every few seconds". So at least for _some_ prototypes you can probably just ignore the overflow issue. It won't get you full test coverage, but it will get you a working legacy solution and a "look, if we have kernel support for this, we can do better". Linus