Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp830834rdb; Tue, 23 Jan 2024 17:14:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGO9cZoNhFkbvQ4fcIyWNbiFVZNVoUvBaVDmhq61tBOrzFVW9O4PT8uq5lr9lCBXlWOPyGB X-Received: by 2002:a17:903:264b:b0:1d7:6301:96d7 with SMTP id je11-20020a170903264b00b001d7630196d7mr77743plb.115.1706058866425; Tue, 23 Jan 2024 17:14:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706058866; cv=pass; d=google.com; s=arc-20160816; b=EoGeXCTqq5Pu4OOB6XyaoY0LpmLn9N5Y3XHNy6LoykbY1NXPqgjOo0r1UUl3TK8nV1 SxCoZAX1rH6Z70SDTCYaylK3Gc8EePkoZZ/kZOHEPp7PxiEIzOK3pUHasEHNxlWU9lMk hQQnDQHY9aUyNzALIVhfN5HfQb9opvBnMexr1tpQofyp8A5y5b6j76GKz3EEvOrqYN7u ez09wkHpTxUsTHgkHPIEwQQDrMW939n9G2zKT4XBr+5m1MF/0CBS4v8WOOajzO1c2L29 wtHFnGOmQ9jn86JzN7RZb6aZoVF6V8L65Ejti6uJk/3mCPzOIzdX8GpPzoR4mzuRvBQw m8qA== 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=OQ4L1QmGRrHuHhSKUrr4h7hTxIBpYoBb/YNz5gKguAI=; fh=1dEapytw3BiNJ/4E0MHwU8fueKRTXtyc+nMaVMrC4z8=; b=llkDrVSn9h5P6c5wpw86BN8sfYyIgOAtKD8b4poHpfrJWov/1CuQWaDMEOikgJcs7y KTJ72nU2NdDiRkzYiBgpf8YqlSiQoctFpMU+jXL8PxPkfUwN9rRZtnGHqiBY08xp1Qwd a8af4Rghv2/lJzIou4NTgzPAQY20RVOcxDGV+9DLA5O4hLxGSH5IgpA4WjqBkyXzrVxn jRlYqWc9mdtqHpy90ExD4BbK0+vzZL7Q/KWKpOkWGeeYRb5YYMAeVXfgpEBYXtXVys9J Gfr9IT3u0rtODz+yEuUM17HSWAiuDITwXAvu5ECE9KKsLvQ0SrsmZLWkNaDFTwm/QyiO 7pXA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e+HrVT+5; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-36257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s10-20020a170902b18a00b001d7310fd553si6432520plr.153.2024.01.23.17.14.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 17:14:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=e+HrVT+5; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-36257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36257-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id F190428D0D6 for ; Wed, 24 Jan 2024 01:14:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87D66137C; Wed, 24 Jan 2024 01:14:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="e+HrVT+5" 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 9E4AA1FAA; Wed, 24 Jan 2024 01:14:18 +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=1706058858; cv=none; b=i5NabR/bHDIMHhtIULXe6bBMuPFVHZghu3/QRkhDbsM0CTQgkoMUyT4a5Q8by9MhYc9dXyAlh5M4YrWWbGG0Ycz6IWI1lP6kVu0vHOHRF5Oz/U63qurpT5p3X2BLh220MgVvUDuXgFQNhAeN7o9PLhP/kWbfQVnLcmBv5a0hIDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706058858; c=relaxed/simple; bh=qWcnJt0pf9bdDGsYcKVLk1NGTUvvib50FPZ8UjiLKug=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IgAf7xmMxZEVTAmUUTh4XbUzlZ9bQ0rgVsChKofO0azItK1BsWjAehRvtzYXr53RxBbHDueXsZu2SGCqcUabpM9GAe2RSxx8+eTT8c8v0EbrEow72geq4bbOHQXWe3e7fAg/n4sGA2msU5yDKDlpwqq3h64Sz04Js0PSjI3Zrr8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=e+HrVT+5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA5D3C433F1; Wed, 24 Jan 2024 01:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706058858; bh=qWcnJt0pf9bdDGsYcKVLk1NGTUvvib50FPZ8UjiLKug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e+HrVT+5RZvgPrFmWTd5dXq9JwoZ2LyffRT5//NQHo8gKxQtSATCZqdkRqVpPGe1Y jsZA/B+5B38PgXqB0sJaJBEaPKPKUG9n7Y23iJ2DJKq6Dvz7GPHEKQY/jkQgJH3dU9 zIsyfoJleOh/3IA6c/JSimg4qBvDW5BUZ0S25COg= Date: Tue, 23 Jan 2024 17:14:17 -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 3/9] ntsync: Introduce NTSYNC_IOC_CREATE_SEM and NTSYNC_IOC_DELETE. Message-ID: <2024012301-dork-awry-c9ad@gregkh> References: <20240124004028.16826-1-zfigura@codeweavers.com> <20240124004028.16826-4-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: <20240124004028.16826-4-zfigura@codeweavers.com> On Tue, Jan 23, 2024 at 06:40:22PM -0600, Elizabeth Figura wrote: > +static int ntsync_create_sem(struct ntsync_device *dev, void __user *argp) > +{ > + struct ntsync_sem_args __user *user_args = argp; > + struct ntsync_sem_args args; > + struct ntsync_obj *sem; > + __u32 id; > + int ret; > + > + if (copy_from_user(&args, argp, sizeof(args))) > + return -EFAULT; > + > + if (args.count > args.max) > + return -EINVAL; No bounds checking on count or max? What's the relationship between count and max? Some sort of real documentation is needed here, the changelog needs to explain this. Or somewhere, but as-is, this patch series is pretty unreviewable as I can't figure out how to review it because I don't know what it wants to do. thanks, greg k-h