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=DKIMWL_WL_HIGH,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 45D50C43140 for ; Thu, 5 Sep 2019 20:39:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63B102082E for ; Thu, 5 Sep 2019 20:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567715965; bh=RSkSn9n0VYq6sHsxkptF3DWqaIDhNkIX2gQgyw9ZrNs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=QSBKs4ZZvgi/IcBl67uT1gkEJtnqyJhvw27WAt96AyTiqXrAt8rU43NsxstEGms4w JkbuVK4foVTDAIaSaDe5wLUMpazMrYDGHA1MSlPnE1S1C2rxbpM71TJAUz0mSh62lk OI+ih94Vbz0y0C3pi9IFpNPYQCQ+x3JnX17FA/kE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390751AbfIEUjX (ORCPT ); Thu, 5 Sep 2019 16:39:23 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:45448 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390045AbfIEUjX (ORCPT ); Thu, 5 Sep 2019 16:39:23 -0400 Received: by mail-lf1-f65.google.com with SMTP id r134so3122154lff.12 for ; Thu, 05 Sep 2019 13:39:21 -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=JszmXlgx1+xgmZVB9Ngs6u7Ky/QX8naYvJJhJ3ScXns=; b=dUEsT8ouSuhTdLO9XeIJ7j2pUQ/Jzy9iWK7dNbuhxCeiK9q0D7pXpiEMTKij3qFmLF /0ePwe6D4PLTWPKkntRM1vtWtPyFUYzwKF5X1Vep8dqqrs4xqpQeioJiw+0evrb+dVxs mvw4lOCfYV3TKiH7AH5TB6rlYwT5QQmegELDY= 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=JszmXlgx1+xgmZVB9Ngs6u7Ky/QX8naYvJJhJ3ScXns=; b=Je78XQj1IOpxrOzjM/7Xq+bnsSNY+T+1S1LN/fOjU3a+qaOBQa+aHYmS+Sq2FvZ3Fa Jhh/Rh8wyf1iyC4M23vOLwRVKf5oMtdQT3a1QHTlcz9gsTVkFs2GtaK2P9jON7ca+yDq vSqLXNPIYGC83GiR25U3HKjyeRBCwkRxjwoC/H18q61N+r0UY55910D0FI7IvhDXJg1O P17DFiDZsCrbbQeqOR5JkEe3HT73UscnzeFB5tPh8ZtvwinBlKv4RJyBbwxmEzwmysD1 1O/i1/z9trU1mym4+TZNKBRknFrg17DCMw/0og9BMmAWFsxEkfPovUkFMe9jRnjToZ/r y8fg== X-Gm-Message-State: APjAAAW0/hv+VHjI9hPrSHjdV7jnLlXrbgjkRUvq7GTQSYcmfyYX9FC2 Pk8LeWR83raPOOrIAHEblxR2DBC4aS4= X-Google-Smtp-Source: APXvYqyJAVCZxR5XEHK4m+Ax/589+KmPaLHPmAl/EQZoUy9QWm2BSZ+69sXI8mK7qeld93aSpFbtYw== X-Received: by 2002:a19:cc15:: with SMTP id c21mr3752885lfg.64.1567715960271; Thu, 05 Sep 2019 13:39:20 -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 x18sm559980ljc.51.2019.09.05.13.39.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Sep 2019 13:39:18 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id t8so3112129lfc.13 for ; Thu, 05 Sep 2019 13:39:17 -0700 (PDT) X-Received: by 2002:ac2:47f8:: with SMTP id b24mr3791028lfp.134.1567715957179; Thu, 05 Sep 2019 13:39:17 -0700 (PDT) MIME-Version: 1.0 References: <156763534546.18676.3530557439501101639.stgit@warthog.procyon.org.uk> <17703.1567702907@warthog.procyon.org.uk> In-Reply-To: From: Linus Torvalds Date: Thu, 5 Sep 2019 13:39:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Why add the general notification queue and its sources To: Ray Strode Cc: David Howells , Greg Kroah-Hartman , Steven Whitehouse , 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: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Thu, Sep 5, 2019 at 11:33 AM Ray Strode wrote: > > Hi, > > On Thu, Sep 5, 2019 at 1:20 PM Linus Torvalds > wrote: > > You've at least now answered part of the "Why", but you didn't > > actually answer the whole "another developer" part. > It's certainly something we've wanted in the GNOME world for a long time: > > See for instance > > https://bugzilla.redhat.com/show_bug.cgi?id=991110 That is *way* too specific to make for any kind of generic notification mechanism. Also, what is the security model here? Open a special character device, and you get access to random notifications from random sources? That makes no sense. Do they have the same security permissions? USB error reporting is one thing - and has completely different security rules than some per-user key thing (or system? or namespace? Or what?) And why would you do a broken big-key thing in the kernel in the first place? Why don't you just have a kernel key to indirectly encrypt using a key and "additional user space data". The kernel should simply not take care of insane 1MB keys. Big keys just don't make sense for a kernel. Just use the backing store THAT YOU HAVE TO HAVE ANYWAY. Introduce some "indirect key" instead that is used to encrypt and authenticate the backing store. And mix in /proc/mounts tracking, which has a namespace component and completely different events and security model (likely "none" - since you can always read your own /proc/mounts). So honestly, this all just makes me go "user interfaces are hard, all the users seem to have *completely* different requirements, and nobody has apparently really tested this in practice". Maybe a generic notification mechanism is sensible. But I don't see how security issues could *possibly* be unified, and some of the examples given (particularly "track changes to /proc/mounts") seem to have obviously better alternatives (as in "just support poll() on it"). All this discussion has convinced me of is that this whole thing is half-baked and not ready even on a conceptual level. So as far as I'm concerned, I think I want things like actual "Tested-by:" lines from actual users, because it's not clear that this makes sense. Gnome certainly should work as a regular user, if you need a system daemon for it with root privileges you might as well just do any notification entirely inside that daemon in user space. Same goes for /proc/mounts - which as mentioned has a much more obvious interface for waiting anyway. User interfaces need a lot of thought and testing. They shouldn't be ad-hoc "maybe this could work for X, Y and Z" theories. Linus