Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4506510ybl; Mon, 9 Dec 2019 11:58:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwql9r5D9z4WHQFMxkqTPzGKBC92SHmpJQH9yqQOQj+OMpwj3Y4z/oC5MsffKiTlb1ZBN+F X-Received: by 2002:aca:c415:: with SMTP id u21mr749355oif.49.1575921501967; Mon, 09 Dec 2019 11:58:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575921501; cv=none; d=google.com; s=arc-20160816; b=rnrlZQ8fJ9hwNQquTVpPyOgf7pAuqOAeyySZmjTQJ0JHXg9IKSJ+96cqpwqFKXS+Ul OXJtKmbdC0BNr1laZhAA8EfsVafIqVyOLxvWTMnrbQGLTjrWi1xHXSc02odTakNN99br +fjefdnvdue9r8bbmQf1ljekJH0vbvLViekzNaYTjk74OZB1J45FJ1R2r991NHkR4od9 pYuPJxhdO2+du8+TG+b0J6kf6VAOZv5RG49ofAW0vLOG3KG84rTYF2oAhTLubuMTJr39 dRq6FDVY5s7Qz5mxgpyZf8TLZMZq46zKljHPZr+0j3IvDUdc06Wfu2Azy8LtVhMF1r3Y JSLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Fy4do8D4AbHlPrrld9DEB03gwXU38malxG3XTmmJQcM=; b=lhCeiQKBb3lQeM6OFFUOTALGsByHUdpb4VC3TGqzVsfKNVYzQZm0MrCLHSlosh4WHN Hod1fb+xzsVx67cjlhuiHKfOUXhA+TC57kKNmwU2NZ3k6CJPkniQbtppae2XcBM6tnsw EIIvbmOhWNK9v4ASCdNwnQPL1M2b81wFGC8HbB8YxyJqBiC6WU6gB7InbV/Jmububzl3 4R6F5IwO4NQbj9w98PPbrqetl2xEA5QedWY9ZmCSsvTSUOt76jjzrbh4LkAaI8nwIDD6 yrIxNRjrsO8NW/2cPa9aDAfLVTo+q/8rkSptP05ENGcZWOdq7Yo3prlINsqcAoYtrI8I S8rg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3si534933oih.186.2019.12.09.11.58.10; Mon, 09 Dec 2019 11:58:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726584AbfLIT5b (ORCPT + 99 others); Mon, 9 Dec 2019 14:57:31 -0500 Received: from mga04.intel.com ([192.55.52.120]:49527 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfLIT5b (ORCPT ); Mon, 9 Dec 2019 14:57:31 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Dec 2019 11:57:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,296,1571727600"; d="scan'208";a="264346146" Received: from nshalmon-mobl.ger.corp.intel.com (HELO localhost) ([10.252.8.146]) by FMSMGA003.fm.intel.com with ESMTP; 09 Dec 2019 11:57:21 -0800 Date: Mon, 9 Dec 2019 21:57:19 +0200 From: Jarkko Sakkinen To: Greg KH Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com, linux-security-module@vger.kernel.org, Suresh Siddha Subject: Re: [PATCH v23 12/24] x86/sgx: Linux Enclave Driver Message-ID: <20191209195719.GH19243@linux.intel.com> References: <20191028210324.12475-1-jarkko.sakkinen@linux.intel.com> <20191028210324.12475-13-jarkko.sakkinen@linux.intel.com> <20191128182450.GA3493127@kroah.com> <20191206203807.GA9971@linux.intel.com> <20191207080939.GA193518@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191207080939.GA193518@kroah.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo 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 Sat, Dec 07, 2019 at 09:09:39AM +0100, Greg KH wrote: > On Fri, Dec 06, 2019 at 10:38:07PM +0200, Jarkko Sakkinen wrote: > > > Why a whole cdev? > > > > > > Why not use a misc device? YOu only have 2 devices right? Why not 2 > > > misc devices then? That saves the use of a whole major number and makes > > > your code a _LOT_ simpler. > > > > The downside would be that if we ever want to add sysfs attributes, that > > could not be done synchronously with the device creation. > > That is what the groups member of struct misc_device is for. OK, cool, then there is no problem changing to misc. I haven't seen misc drivers (not that I've looked through every single of them so I suppose there are such) to use it and somehow have been blind to seeing it that it si there. Thanks again for the feedback. I'll fix this for the next patch set version. /Jarkko