From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3690C433E0 for ; Tue, 26 May 2020 06:42:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FA1D207D8 for ; Tue, 26 May 2020 06:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590475368; bh=E7i/b2w8LCgpcEMWjCV0/7fQbTJXMdmPWp/J7Q0+yXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=IEdQCn/cqMW1ARidqdBuhedgLx/+ABM9ZGoREJmn1xF1dJqElOkGzI1webnzXyjuU C9MKUdMiP8SGdVsZp2EgX6smUbpHTSxjc2u0pXH1ro78kihH7XyA0nV2z8gt0Gl5Nu 8rX4q5zQltj2PJMY5IDbjOtkigvRF4246XwISsGQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730479AbgEZGms (ORCPT ); Tue, 26 May 2020 02:42:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:37088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbgEZGmr (ORCPT ); Tue, 26 May 2020 02:42:47 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 340C3207D8; Tue, 26 May 2020 06:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590475365; bh=E7i/b2w8LCgpcEMWjCV0/7fQbTJXMdmPWp/J7Q0+yXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sqVToUa4KhoeKIAh6sfg7/N81FYvMoi7Vyg/KCGXeza/vQQq/Wic58V5qouYHnCwP PD/HgX9MKepcpRtrJNUSW8x4PakqKFhhStYHosDDFOVBKPykavJU3r4X/L0i9RK1vb xVIQMaMqL4z8j6utXhDrhQi2QukoJm9FCvBqWgjM= Date: Tue, 26 May 2020 08:42:43 +0200 From: Greg KH To: "Paraschiv, Andra-Irina" Cc: linux-kernel@vger.kernel.org, Anthony Liguori , Benjamin Herrenschmidt , Colm MacCarthaigh , Bjoern Doebel , David Woodhouse , Frank van der Linden , Alexander Graf , Martin Pohlack , Matt Wilson , Paolo Bonzini , Balbir Singh , Stefano Garzarella , Stefan Hajnoczi , Stewart Smith , Uwe Dannowski , kvm@vger.kernel.org, ne-devel-upstream@amazon.com Subject: Re: [PATCH v2 07/18] nitro_enclaves: Init misc device providing the ioctl interface Message-ID: <20200526064243.GB2580410@kroah.com> References: <20200522062946.28973-1-andraprs@amazon.com> <20200522062946.28973-8-andraprs@amazon.com> <20200522070708.GC771317@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 25, 2020 at 11:49:50PM +0300, Paraschiv, Andra-Irina wrote: > > > On 22/05/2020 10:07, Greg KH wrote: > > On Fri, May 22, 2020 at 09:29:35AM +0300, Andra Paraschiv wrote: > > > +static char *ne_cpus; > > > +module_param(ne_cpus, charp, 0644); > > > +MODULE_PARM_DESC(ne_cpus, " - CPU pool used for Nitro Enclaves"); > > This is not the 1990's, don't use module parameters if you can help it. > > Why is this needed, and where is it documented? > > This is a CPU pool that can be set by the root user and that includes CPUs > set aside to be used for the enclave(s) setup; these CPUs are offlined. From > this CPU pool, the kernel logic chooses the CPUs that are set for the > created enclave(s). > > The cpu-list format is matching the same that is documented here: > > https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html > > I've also thought of having a sysfs entry for the setup of this enclave CPU > pool. Ok, but again, do not use a module parameter, they are hard to use, tough to document, and global. All things we moved away from a long time ago. Please use something else for this (sysfs, configfs, etc.) instead. thanks, greg k-h