From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 134EF335BA for ; Sun, 26 Jan 2025 17:20:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737912048; cv=none; b=AsYs6NUpzXRb3r7N6qM4/aFu5EjddSzO28m9Yi+e/n6leENm081V57yPqXQ+pdmcfl82i8obdB3qlGGPqpaA40jDLuVgJZSTle7YZa4xYj9W4esmaBPR1aL6XeTrKNZ6rP2DS1HIpYhBTBVg6D+K4YGm+v0JU726MDisR/ZkYxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737912048; c=relaxed/simple; bh=/bF5csZ59VBsLW13WANfeYIyBynIZ3tFAZ6n8aneg9s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Cj6QuL8wmBp9LPEbsYRN2QuQ6yNfx5dSdNg1MCQul4nXCG8syaMK3V+5OGxuzLHOAmNaBwreTY+FlHnPjXXYk+2y1t0d0EFOMzYDRJhxy8aYTkTmc7+TRQXI4olJf7awWyqXPE0p2NFoTViDGau2fjSZBzzcqivvNSKNUFXMBdI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=YuP45Sef; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="YuP45Sef" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1737912043; bh=/bF5csZ59VBsLW13WANfeYIyBynIZ3tFAZ6n8aneg9s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YuP45SefHN0oZi7V8fxDhz1GopUrT4Wgp9vZruj3r+nmqzu+2BLmwu2kLfX3nBEf4 iytNZNYaKaKS5cpX6krLWWnrX9oCEWHktNbPWLCXI2KeuF37ssthPh8OsQlVMwO1iY cbaIjHYde6Rq4PU6DR9L5/PYizRVlguLEd7uwgTo= Date: Sun, 26 Jan 2025 18:20:42 +0100 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Arnd Bergmann Cc: Anna-Maria Gleixner , Frederic Weisbecker , Thomas Gleixner , linux-kernel@vger.kernel.org, Richard Cochran , Cyrill Gorcunov Subject: Re: [PATCH] posix-clock: Remove duplicate ioctl handler Message-ID: <3401475f-bdbd-4b3f-8961-d3d747dc82f1@t-8ch.de> References: <20250125-posix-clock-compat-cleanup-v1-1-c8b0f377905b@weissschuh.net> <06196213-3106-4b69-a15d-4b2e4ac6f187@app.fastmail.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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <06196213-3106-4b69-a15d-4b2e4ac6f187@app.fastmail.com> Hi Arnd, On 2025-01-25 15:28:29+0100, Arnd Bergmann wrote: > On Sat, Jan 25, 2025, at 11:20, Thomas Weißschuh wrote: > > static int posix_clock_open(struct inode *inode, struct file *fp) > > { > > int err; > > @@ -174,7 +154,7 @@ static const struct file_operations > > posix_clock_file_operations = { > > .open = posix_clock_open, > > .release = posix_clock_release, > > #ifdef CONFIG_COMPAT > > - .compat_ioctl = posix_clock_compat_ioctl, > > + .compat_ioctl = posix_clock_ioctl, > > #endif > > I would remove the #ifdef/#endif as well here. I would also suggest > using compat_ptr_ioctl(), so on s390 the pointers get converted > correctly, even if it clears the upper bit on the integer arguments. Using compat_ptr_ioctl() here will break the logic from the closely related fix to the PTP ioctl handler [0]. There is no other posix_clock_file_operations implementer than PTP. I can drop the #ifdef. Thomas [0] https://lore.kernel.org/lkml/20250125-posix-clock-compat_ioctl-v2-1-11c865c500eb@weissschuh.net/