Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1082645rdb; Wed, 24 Jan 2024 04:32:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5t5WegbdW5+o2Dyuhsn3oXQPHYcouUISU3tFYhSLwlLh0XdGpcvTU99zghc4keJ8upfwT X-Received: by 2002:a05:6402:b05:b0:559:7dd9:a5b2 with SMTP id bm5-20020a0564020b0500b005597dd9a5b2mr1923495edb.16.1706099574694; Wed, 24 Jan 2024 04:32:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706099574; cv=pass; d=google.com; s=arc-20160816; b=YrJD2MXzYd5R5iShMFvDLPGvzWMMDaxE6DHGeV8Eu4wBRPTFxiGsmBFK3/IvJLr5Ud zPLU2FxCJA0RVhveyDTDCsRfSD/1tHigJDX7AAjY8TWEfnxLPP6lLRgZlI3ueNh9J0tR Mm/a/VR3Umaq6G+2KcDvmXa0+dFwpTXXH3uviZ3dXdwWkVFWwK2/VQ5lAtySOPRpX0CG bY0NM2/I5XI6gcpjeGTaqFtnnSSh6bj1OyLw5WixAYu/75U55DGYaFDpXZWbVKd8gIP1 8pSUo8nv/7rbXPWArPP9WzE3C92gh8h9sXUvVhfbQHomwWaI/HopFtebDmtMYaWgft+m BcHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JSX8irGjXDOM6POixw4odwEBI7MWt7//mB98OtmZge8=; fh=1dEapytw3BiNJ/4E0MHwU8fueKRTXtyc+nMaVMrC4z8=; b=rMiErgGih38USKCIN5JIfi6jA7Wa9OIMq4ZRXaUgflXM3XbliOMIshGZCMnSVA9ECy v5cm8/Sc65/xmmUpkvoYd+Q6RPTrR62xPIMPizq6oxYr6QswChe8PY1vQrBCfBrGwxBq JS5WJww4Sr+lmU8pLNQ/8+8zA3BRpHYvWhEPZcrjX1mdeDt0DCfYvZCtpBTQLWXywZmf CP5Hu3PBU9uitjitLwdFHhIEd5PA8IfLEqg+r9NoqemXO7kUakuWDIy9Ud4XbeHx6nLt tN0F4Qkz78qepQZwTDfMiynB8H3EtsPXVNsihU1JJY/egErg5g2zgu3AnnL0v+MjuTVb jG4g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HsMsFxQv; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-36982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36982-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g9-20020a056402428900b0055cc4404660si706176edc.322.2024.01.24.04.32.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 04:32:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HsMsFxQv; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-36982-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36982-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E75361F27D97 for ; Wed, 24 Jan 2024 12:32:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D69837762D; Wed, 24 Jan 2024 12:32:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HsMsFxQv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F010576918; Wed, 24 Jan 2024 12:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706099536; cv=none; b=sXd0UaH1ER/Nhg3Gozib6jiOzKcldv1aWizge1HcRWrQNXuTZMqorLHbbbvxzBcr06mq4qQcubCL0QKKXJMm+NEyfin38Q8P039XJN00yGxJNJ/KYbLhKPcMOVqW15q5j+4s0THg1PPW0gR7UXPHlpqMx/OrZaHSoOCNClw72j0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706099536; c=relaxed/simple; bh=GD414r5uUfQKTl7+Hf0W3x6sPSQMHCgSnh3nUJhrXYo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C+e13Aig0vqOP9ObEIZsmkO7wWPQGyTHi+iPcgJwOgHuabE+i7XTp/pqfeGhNntXRb6CpKDZs1L17Du28r4xhUlMf0dusiYS2f2h7GMLkfSCrwldTndl+upqh+U7661oDIiSSiMMdbcI9XjOfk89M/49LYpUpL7j9Jp8Uc3hyvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HsMsFxQv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44392C433C7; Wed, 24 Jan 2024 12:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706099535; bh=GD414r5uUfQKTl7+Hf0W3x6sPSQMHCgSnh3nUJhrXYo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HsMsFxQvYgqF/Nv7icAxBXrrdGaKv9+JWouJ+YFp0z1+A/tURCyu6VSW3kZNLiDR7 942VuXoSIPVa2hsTj2P/WzCRrun9XNtQudqe503xDFqrGM6yqqIVg6b2iQ2XeZOAsi 20YoFp+69COLxtwHyucg+E0Q7m4kIpm3BnFN/OMg= Date: Wed, 24 Jan 2024 04:32:13 -0800 From: Greg Kroah-Hartman To: Elizabeth Figura Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, wine-devel@winehq.org, =?iso-8859-1?Q?Andr=E9?= Almeida , Wolfram Sang , Arkadiusz Hiler , Peter Zijlstra Subject: Re: [RFC PATCH 2/9] ntsync: Reserve a minor device number and ioctl range. Message-ID: <2024012454-cosmos-sprint-7db7@gregkh> References: <20240124004028.16826-1-zfigura@codeweavers.com> <20240124004028.16826-3-zfigura@codeweavers.com> <2024012356-dove-duke-f7f6@gregkh> <1875326.tdWV9SEqCh@terabithia> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1875326.tdWV9SEqCh@terabithia> On Tue, Jan 23, 2024 at 09:43:09PM -0600, Elizabeth Figura wrote: > > Why do you need a fixed minor number? Can't your userspace handle > > dynamic numbers? What systems require a static value? > > I believe I added this because it's necessary for MODULE_ALIAS (and, more > broadly, because I was following the example of vaguely comparable devices > like /dev/loop-control). I suppose I could instead just remove MODULE_ALIAS > (or even remove the ability to compile ntsync as a module entirely). Do you really need MODULE_ALIAS()? Having it for char devices to be auto-loaded is not generally considered a good idea anymore as systems should have the module loaded before userspace goes and asks for it. It also reduces suprises when any random userspace program can cause kernel modules to be loaded for no real reason. > It's a bit difficult to figure out what's the preferred way to organize things > like this (there not being a lot of precedent for this kind of driver) so I'd > appreciate any direction. For now, I'd just stick to a dynamic id, no module alias, and if it's ever needed in the future, it can be added. But if you add it now, we can't ever remove it as it's user-visible functionality. thanks, greg k-h