Received: by 10.223.164.221 with SMTP id h29csp2159921wrb; Wed, 25 Oct 2017 13:19:49 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QdFQaHgoyzGV1evoBU7Eg50IhGWkNvHyBLog/eqTqPZO1tmwRYNyG/NqRaMei7S17G1PjM X-Received: by 10.84.133.163 with SMTP id f32mr2599857plf.387.1508962788998; Wed, 25 Oct 2017 13:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508962788; cv=none; d=google.com; s=arc-20160816; b=kih0GMQiHz23HyPreJ+kleaRWfoV/GcSspMGb14gpqZyqbEUSgAFBdSmZd5kJunJSl IXDcLNIN17Bl1cP4WR8dVM4hX1JjNvgmOVcYxOiGtDyPiKvUHFfy4p3XuiitFvy4Xmvq HhY8YUaOedA6pH1T8Uct26X48IHiNZaoxNxKsnPhhYxtGNb7T+YMuU82I0q+WnMaq3f3 cIuq2698e+rGC27Q529jU5uFJ19ISZ+Smva6BYfoyLLYHy9jd0vaCgilP8g7cF44LUi8 aGsaYPjCYkS53gtIiRUKa04/RHvexwU9ptrVrveK0ha098ifz36t55kePxuJqDbABIYI S6dA== 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:dkim-signature:arc-authentication-results; bh=M4BXSL+cvrtbwX9TjdVo6AQcqNpQcSv/StE3clp20zg=; b=ssME1CNTCsNwPhVsloSZ9nHvP9xGy6P9s/TBQV5E3jXAhrc3t2pUsGQEIRYf3KNHI+ AqUtsWA+USEgYEQzcm5AxixPflDuSmy/OqX05DptrqCWO/PHlxPGUN3sWblmcBNIky89 Hm7IfgAO9/jflR95ELUWmBHkHbUbbzFQ+UzIuGgT7zcaR7ehv3DSlqvjSDDTVB995GLQ 7exKDwQCS0+48bLu1KLmF31Emqgzo1O72xeOP3hcR7E8LAiN7uh2FUsomasQcFEUSPuZ ofJQaQGd/WCpig0Ch2YN4glgNzjrK4kEvK/m9v2xYznhKcWUxTYeiEtz218s6Bfvenpt rZ/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@obsidianresearch.com header.s=rsa1 header.b=Q6hfG5Kr; 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 t6si2233490pgr.822.2017.10.25.13.19.35; Wed, 25 Oct 2017 13:19: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; dkim=pass (test mode) header.i=@obsidianresearch.com header.s=rsa1 header.b=Q6hfG5Kr; 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 S932437AbdJYUSE (ORCPT + 99 others); Wed, 25 Oct 2017 16:18:04 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:42495 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbdJYUR7 (ORCPT ); Wed, 25 Oct 2017 16:17:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=M4BXSL+cvrtbwX9TjdVo6AQcqNpQcSv/StE3clp20zg=; b=Q6hfG5KroHBPY6aGSFi6TX6KaGcTGsqpshrEUZJ+al87HJQhcyhi6pq3z4UeyYS16ggbPHSv96h3xeY4ei7Ia/653Z9GPBzYnC5EaDFi4ER3Xj2I7b9+83b8LkoBwS64BEUuJEIa2j33+z9c1jtUTpM2atp3P3oUjmSAFBA4VAE=; Received: from jgg by quartz.orcorp.ca with local (Exim 4.84_2) (envelope-from ) id 1e7S7V-00011Q-0r; Wed, 25 Oct 2017 14:17:45 -0600 Date: Wed, 25 Oct 2017 14:17:44 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: PrasannaKumar Muralidharan , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Matt Mackall , Herbert Xu , Peter Huewe , Marcel Selhorst , Mimi Zohar , Dmitry Kasatkin , James Morris , "Serge E. Hallyn" , David Safford , David Howells , Jerry Snitselaar , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , open list , "moderated list:TPM DEVICE DRIVER" , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , "open list:INTEGRITY MEASUREMENT ARCHITECTURE (IMA)" , "open list:KEYS-TRUSTED" Subject: Re: [PATCH v2] tpm: use struct tpm_chip for tpm_chip_find_get() Message-ID: <20171025201744.GB2815@obsidianresearch.com> References: <20171025115508.5682-1-jarkko.sakkinen@linux.intel.com> <20171025193452.d4qa4dhacfgqejk7@linux.intel.com> <20171025194633.GB998@obsidianresearch.com> <20171025200746.svsraubdotjyzt2i@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171025200746.svsraubdotjyzt2i@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 25, 2017 at 10:07:46PM +0200, Jarkko Sakkinen wrote: > The id has a nice feature that it is unique for one boot cycle you can > even try to get a chip that has been deleted. It has the most stable > properties in the long run. It isn't unique, we can re-use ids them via idr_alloc(). We should never use index inside the kernel. > Address is a reusable identifier in one boot cycle. It is invalid to pass in a chip for which the caller does not hold a kref, so address is the safest argument. Jason From 1582261464717337557@xxx Wed Oct 25 20:08:40 +0000 2017 X-GM-THRID: 1582230549885813514 X-Gmail-Labels: Inbox,Category Forums