Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3307810imu; Mon, 17 Dec 2018 17:42:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/VcQAxXNKnIpC71Hp3V5VSoxxMPHL31Lf/mdCESfnWPlAfrtIBwltXoeyM0k+fob3kSiUsn X-Received: by 2002:a63:5122:: with SMTP id f34mr13614216pgb.218.1545097325024; Mon, 17 Dec 2018 17:42:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545097324; cv=none; d=google.com; s=arc-20160816; b=Ga5q0xOfp4UZCmRdWIdXCK1danYj5oL5PIOc0x6UiVofwAMC5+nQkVJ6yudlQJSY1o 8hCr17+oLDDwh81Ga4b6dMednHuQtsMlf3o/osXDKslsnN+mOmggGUYhiCU6waqbyTLs e20JZAXG/VILQP2Ealh/O2qSxA41CY080tZ9lFcbuM5SrycQa7ahYiHzBoX936IFr7U2 GIHC3lor89N0p3bIxO1nO8P95Y+YTQuXAU/FXai2FROHhTfPMfYwDabI0hMoDx/gaN9s J7GXkUCyRZOzOs1f6rrh5M8s7zR+jz2vDoDY57jZ2V6atR8GIcrLZMb00MZCSpRpN+M0 npbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AhRNVVJRYh2WlVypndBQtYUuTsqNkUmEZGEYV2Ar7CI=; b=0zWea0SWPxX+iw7rggovzLv/oqjuFaaW131ke316Mw8KZt4u/4rDldQ/AAQd//WlKH e5o0FRv6zCvTZzuvwiRzF9x7X8C4a7V+h1LX2TyzN1m2EQBRSjx00V+SkvgIUKHDiMvZ OEzEwkOW3Lp6r4628b+4ay4quaAE84lVDlU0IxAstfm6Ek/0sHtxTsALTtKuCZqUJC7f mvFRv0f2KskkgVIPdrgLAiIwtjiRbWKms41h/Bx0feLdvfP0R+iDUDV3udzSZLQh7Mgy OBvg8GMItMKODMWfs0Jlx4cPYZXnIF8T1SFAqUg7TSOfYCsgL5BCUIeEvzvcZNYkXp/0 q4LQ== ARC-Authentication-Results: i=1; mx.google.com; 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 o11si11610112pll.160.2018.12.17.17.41.50; Mon, 17 Dec 2018 17:42:04 -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; 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 S1726548AbeLRBkh (ORCPT + 99 others); Mon, 17 Dec 2018 20:40:37 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:36488 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbeLRBkh (ORCPT ); Mon, 17 Dec 2018 20:40:37 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.91 #2 (Red Hat Linux)) id 1gZ4N7-0003yN-HI; Tue, 18 Dec 2018 01:40:33 +0000 Date: Tue, 18 Dec 2018 01:40:33 +0000 From: Al Viro To: Linus Torvalds Cc: zohar@linux.ibm.com, linux-integrity@vger.kernel.org, James Morris James Morris , Linux List Kernel Mailing Subject: Re: [PATCH] ima: cleanup the match_token policy code Message-ID: <20181218014033.GS2217@ZenIV.linux.org.uk> References: <1545092089.4206.5.camel@linux.ibm.com> <20181218013348.GR2217@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218013348.GR2217@ZenIV.linux.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 18, 2018 at 01:33:48AM +0000, Al Viro wrote: > On Mon, Dec 17, 2018 at 04:36:54PM -0800, Linus Torvalds wrote: > > On Mon, Dec 17, 2018 at 4:14 PM Mimi Zohar wrote: > > > > > > Start the policy_tokens and the associated enumeration from zero, > > > simplifying the pt macro. > > > > I applied this directly, since I decided to just commit my own "don't > > use negative Opt_err" patch for the test_and_set_bit() cases, and they > > kind of go together. > > > > There's still a -1 in security/keys/encrypted-keys/encrypted.c, and > > there are also three cases of "Opt_error = -1" in the security layer. > > > > All of which look pointless and wrong, but not actively buggy, so I'll > > leave them alone. > > FWIW, that part of LSM shite is getting taken out and shot - LSM-related > preps in the beginning of mount API series are, at the moment, at > fs/btrfs/ctree.h | 4 - > fs/btrfs/super.c | 82 ++------- > fs/namespace.c | 9 +- > fs/nfs/internal.h | 2 +- > fs/nfs/super.c | 34 ++-- > fs/super.c | 23 +-- > include/linux/lsm_hooks.h | 17 +- > include/linux/security.h | 82 ++------- > security/security.c | 39 +++-- > security/selinux/hooks.c | 798 ++++++++++++++++++++++++++++++++------------------------------------------------------ > security/smack/smack_lsm.c | 359 +++++++++++++++------------------------ > 11 files changed, 523 insertions(+), 926 deletions(-) > and unlike the original variant there's not much touched in security/* > further in the series... > > No match_token() uses left in there after this part. In LSM, that is...