Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp986631imm; Wed, 18 Jul 2018 14:24:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfDw7fBqop2F7KQgQ8sHrLU8qsla6uax2kjhah3RT9f6FrZk/nK1PqkrR5erndSu1/9h7bU X-Received: by 2002:a62:9cd7:: with SMTP id u84-v6mr6858631pfk.90.1531949088913; Wed, 18 Jul 2018 14:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531949088; cv=none; d=google.com; s=arc-20160816; b=DenjcEluZfVqeLCzpxOaM3zNdakzyKGv2C+S0bdehCbkUexoqy3WR60J5EamcLVpVt tA2FMf4MiLlDS+4SovIgOuLQKtX41GZD9BdQ3yLmEobdOF/mmKuRtLk3HtqFvN9MRNWA 2rTDQcQhqUWuBJoADqcsbaKbID227Za6xnpvETvt97bVCm2DjHBratUH+Qoezph982cR U5zpinQ1w3rFktadHJ9efwB5pkqfSYt2K4Dhn9c8QT0FrixkSQ0eZgtgqES9WHftmbQX pc2WVOkQc3X6y+7hUbW3lsJtPgeeOVkWkydWCxmphqO0e9AQz0y+RfBZK5WJB+PcNqsz pu7w== 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:arc-authentication-results; bh=AFzl9OO3fdEkM+ouCEnHasge3wWD1mdJfBtdOtpqr74=; b=LrUZcJuGkv1LjsVyEAkbXx9bGhc7q7KBAwYOi07rkI3MmiLHAgr9gjnjaIMDh5qGO7 vBhSyR27qmBnb+TcsujqZ1Xfk1KkEA4XG5pUpgOWLpgiOrMh6lWt96v7bTL/mo4PcpQZ 1tl8OyGSI6xs/T2T5fEAn/uL5v9D6EqdV7T7Q75UcY8KDotUMc51yqAo4VxZ7nUHUDz6 0h17mC8fuch/S70m7HYuA66/DTseABqUJ3O7t/AbfH9AXB/yBlyD6c4Fh/JbH3ZFlbnS 2oUBUMHGHt4hD27SveVdksS9EEZES996xhsb1E6Ba7oA22topgzNhaLBuMMXAQkgKhqk bIzA== 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 k13-v6si4116469pgg.346.2018.07.18.14.24.10; Wed, 18 Jul 2018 14:24:48 -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; 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 S1729973AbeGRWBz (ORCPT + 99 others); Wed, 18 Jul 2018 18:01:55 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:41858 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729142AbeGRWBz (ORCPT ); Wed, 18 Jul 2018 18:01:55 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1ffttd-0006ep-7G; Wed, 18 Jul 2018 21:22:05 +0000 Date: Wed, 18 Jul 2018 22:22:05 +0100 From: Al Viro To: Linus Torvalds Cc: Miklos Szeredi , Stephen Rothwell , linux-fsdevel , Linux Kernel Mailing List Subject: Re: [RFC] call_with_creds() Message-ID: <20180718212205.GY30522@ZenIV.linux.org.uk> References: <20180718124340.GS30522@ZenIV.linux.org.uk> <20180718181252.GU30522@ZenIV.linux.org.uk> <20180718194637.GV30522@ZenIV.linux.org.uk> <20180718200411.GW30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 18, 2018 at 01:43:00PM -0700, Linus Torvalds wrote: > What I really think I'd prefer is to have some simple way to "poison" > current_cred(). It could be something as simple as a per-thread > counter, and we'd have current_cred() do > > WARN_ON_ONCE(in_interrupt() || current->cred_poison); Why is counter any better than LSB of a pointer?