Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp427447ybe; Fri, 6 Sep 2019 01:34:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzODwCaBNJdyhcf/Pg+X1F568PSujWnRdrMaT13twyBt8z2MWUkWzhzZpncti8+BvEQHjCY X-Received: by 2002:aa7:8b01:: with SMTP id f1mr9440420pfd.173.1567758870165; Fri, 06 Sep 2019 01:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567758870; cv=none; d=google.com; s=arc-20160816; b=wWQm6K98+vc5To3u3aL8eKYeXJx5BbxCy3Nzxj4RNHRSndU1QfigFHnqwJyFtOyDJI n2rwVinMMr5OAc7HJMfEsngoqUOGVHyg7L4+SuxwabriFxzgJ0jzACigb48KaXPUha40 W6b+scZIe1xHEAPAMJjGuY6zvZXtvoNQRX/RV2p6DXJe+RBODkBD85vClG+lYlUgZKLD TPXJEy+XQXvxtIY6Dhg1roE+aQyK4oomVPcrkvKam9sVJka9HtTrRidYnlpSuQtBMzrt ECw3Z8EwI1/UKmzVpH+BkgHt4dW3AAGibA9GDxhk64U9WWh7m5y3hX58yIdOTECu0A4Z HABQ== 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=JszmXlgx1+xgmZVB9Ngs6u7Ky/QX8naYvJJhJ3ScXns=; b=xA0gk1Gkj7cVA6kK3bUMC1u0BhEXDMzQ9j2cN0TWY006mqbNViReUzOWv/g65ii73G e/uaLOoIoeCrsFgeJBXjj69r5T/nZfvaP7ZyTM0pwrGVOJP2g0DqGHFhiYwZ1DBoVMDy jvJj+c5jzpVMFiHbtIbY5I7VWkpXTXSzfBmqYIV3C5IvshLL2qegr9DaSDp08K5Dtb56 8b3yYL5Gd7vK0MTfV5Z0Bt6FPT7/9koKccTzcmdB42U/D2q+h/2byZPAJwU+jFJDFcqR Tk3vciplkEnLWcBx3ODWFBokNEEM5MehoGeHIE2wYuR0VGC4MgKOkFo1CUsZRPgjCVx/ +v1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=dUEsT8ou; 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 t17si4313211pjw.47.2019.09.06.01.34.11; Fri, 06 Sep 2019 01:34:30 -0700 (PDT) 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=dUEsT8ou; 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 S2391675AbfIEUjW (ORCPT + 99 others); Thu, 5 Sep 2019 16:39:22 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:37377 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391316AbfIEUjW (ORCPT ); Thu, 5 Sep 2019 16:39:22 -0400 Received: by mail-lf1-f67.google.com with SMTP id w67so3150991lff.4 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=Iuwc5dsIErjQAJiiVWj98Vq5p1knviqUGAZwmI43bznfP7Dt9iIpIzgpJ1I8xCnXRD lGDw+HL3yV2MoIzGS/r/j0lLGYgb92dbTWydaDAwAKpSrEsapEfzba4eWOZ7/t3TeQMp ymzOWCPy53RQxK+t1/lZ2Lcuk60EpDxpYjGPM1+xy4b2gUb4KrP+escZkbwnOwPxxBDW ms97kgbCRTdSedYCiilWVWw0lFxi3Jigtgvq+n7j9AIF01tWUGbPylooD/5fw1fxqG9u skVaxL8P98im3zkV9ZZIxIsCmrUUKGQyZwTm3/6ik/y+40zEwXpgM8d+F8f6csAp0C/B nIOA== X-Gm-Message-State: APjAAAUFTleuS7dkEG7qocyyDfKf6RS5ewYtP0i8kE3tSfHOxvxI447B UDIpiXZKmOPIo3fDDIj+GtGFBQdFcuc= X-Received: by 2002:ac2:4a70:: with SMTP id q16mr3771590lfp.4.1567715959060; Thu, 05 Sep 2019 13:39:19 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id r16sm643239lfi.77.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-f41.google.com with SMTP id u29so3142004lfk.7 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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