Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp183505lqc; Thu, 7 Mar 2024 14:12:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWY6/PNbhs8CbO++pU9i6Hkf1ugFR5u3lF9FC1tvacwUZb2ElvEnA6DKlGuYaCPnAX6Ny7Dn5tDFx2e22EQszW6w5aBxlFgnk3cWeZxYw== X-Google-Smtp-Source: AGHT+IEPNqguLozb/sAVarCtxP0Oy1dG38TdVuFu0tRDQrunU3lF3qy3LzTMYJIPJG6YjnER9EpG X-Received: by 2002:a50:aa9d:0:b0:566:6a9d:6147 with SMTP id q29-20020a50aa9d000000b005666a9d6147mr1178762edc.0.1709849547438; Thu, 07 Mar 2024 14:12:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709849547; cv=pass; d=google.com; s=arc-20160816; b=Sfee7E5ponG1fRdEFOwOZEeKBXIThOLu7KwGU4VD6Rmc36aI6slvbpUITraK4RGNwh Z4+hyXi3yFsGrOpm5r3qGPM8t8s4/Z42jTQha/NZJX6jLiaZtLl+Pi4vWmLrA/kPux9p CKLYZB8oC3SETJ7NhH+TX8lAGm6kqSkc3kpq4H9NpsMBd46uMPzWnkNF3pOhbpHxDZx5 04sBVFTRBzCG5hCaG8wq/LwEVMP1SAGaidVk1j9Oe5rpw1kpBQ2m60mF7gzK0pJrU0Xk J1bNZXLmfdaPVrEzhequPbuQlDmElCKRJL6wdRiRFTEjCww2XzJAu0LMHnNBKxN8Mmhk vDaQ== 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=w+ndGAYLWM1I0yjcZ/k9iYhfNeLg10T4HUK7/3ulQCw=; fh=hfOpcs9GzE+PDg572xoHOhrug1V7/b/bKzjpuWZ/dnw=; b=R0KY8lN6qFgQPbp9HPu0av4JFBt9o2V/SMsCS442kYibVm5USHBn0/kLevKMNM8zlO hQ3x9XnpExtTEdNUd9hfdaFw9kaKusfDmTE3WfN4LJLLkOdfCW4Kainu7BIbRBmcy9Jx UUy0CkTFr+bGK9SucaTQYohkVWFFIBmJxP1rXLTdoj8ktyu3aTpJIKo44gRxBTPCrcXZ cTxqIWKNPt4miPaNQQD6Ktb8nU62TdpNaByIVJo1NHn3j0Fo24Nzh5dZsHXSjKVJnKZ5 jofzM24VJzeiooanokdl5/Zn1e0vDYZ6d7bL4QNbAYGnfGQUjzc1Z0oBNwUaQmzUYnKm RaFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="B/e8h3Xe"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-96311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96311-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. [147.75.80.249]) by mx.google.com with ESMTPS id cm3-20020a0564020c8300b00566b46a9208si6508239edb.228.2024.03.07.14.12.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 14:12:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="B/e8h3Xe"; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-96311-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96311-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 2D7581F22593 for ; Thu, 7 Mar 2024 22:12:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91722140361; Thu, 7 Mar 2024 22:12:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="B/e8h3Xe" 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 AB28D13BAEF; Thu, 7 Mar 2024 22:12:06 +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=1709849526; cv=none; b=bIVCdL0lqUs+2hxlQGHD7MJy8kjUA2bm1vJit8cUrQZjCbP3Ri6wPjiz+xi7CxwzIFHLlkNMn8OHypaO4BnoUcOVIxpIWcIzPoiPLX7T1taQMIf408heeDrzEwQY5rSOPbiGKBbvit8m57AWJQ5Fv4KxiiXmSmfCol5H5coWbSY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709849526; c=relaxed/simple; bh=qv8+spMNjo+8OovqII5cP9bZdZgkXALJcuSfu6n5vvU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UxNDukiFQ1ux6PMr/SNXrIvAQDdL0p/hrvLgALpYfOdCwYvJd2j3PY41tKw2bVi2Hv8V+s6E5tfPWBDt3/IqluRx5fIL/vQ+j2uJIlvcNAJfdN8FTVRzZ1eFkyLvQZ1kkiluUBuaQPJmZ5kg5nnnip7PutWjYlUPNwPte4DapJs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B/e8h3Xe; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA0EFC433F1; Thu, 7 Mar 2024 22:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709849526; bh=qv8+spMNjo+8OovqII5cP9bZdZgkXALJcuSfu6n5vvU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B/e8h3Xe/bwwVojLCUzEbzD1vJb03wkXcvFdwpIN7zgCuL9UzlPe/d/KEog+HT+j0 tmbv+RuNV/k7Cw9fugQCEScWqz65P6+M21SQFmr9SnTeTe7GIpqdMaiZbOBYSt3Ws8 tVs+pGew39WQS5iXbWMdbN3hyri7Vd9PV80y208E= Date: Thu, 7 Mar 2024 22:12:04 +0000 From: Greg Kroah-Hartman To: Elizabeth Figura Cc: Arnd Bergmann , Jonathan Corbet , Shuah Khan , 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 , Andy Lutomirski , linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Randy Dunlap Subject: Re: [PATCH v2 02/31] ntsync: Introduce NTSYNC_IOC_CREATE_SEM. Message-ID: <2024030721-expletive-repose-0a89@gregkh> References: <20240219223833.95710-1-zfigura@codeweavers.com> <20240219223833.95710-3-zfigura@codeweavers.com> 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: <20240219223833.95710-3-zfigura@codeweavers.com> On Mon, Feb 19, 2024 at 04:38:04PM -0600, Elizabeth Figura wrote: > This corresponds to the NT syscall NtCreateSemaphore(). > > Semaphores are one of three types of object to be implemented in this driver, > the others being mutexes and events. > > An NT semaphore contains a 32-bit counter, and is signaled and can be acquired > when the counter is nonzero. The counter has a maximum value which is specified > at creation time. The initial value of the semaphore is also specified at > creation time. There are no restrictions on the maximum and initial value. > > Each object is exposed as an file, to which any number of fds may be opened. > When all fds are closed, the object is deleted. > > Objects hold a pointer to the ntsync_device that created them. The device's > reference count is driven by struct file. > > Signed-off-by: Elizabeth Figura I want to take these, but I need someone who knows how to review locking/sync primitives to give it a review to verify that it is working properly within the kernel constraints we have here. Anyone want to give it a review? thanks, greg k-h