Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9992870rwl; Wed, 11 Jan 2023 12:53:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXsgYm1jAZwLoGWWb7z3uptykH+pN6oOf/IyPuFS3XvRQ2e2LPWjZAgbCi4LcVTdntyABZ9C X-Received: by 2002:a17:907:c70c:b0:7c0:a247:2f3c with SMTP id ty12-20020a170907c70c00b007c0a2472f3cmr67475629ejc.1.1673470435312; Wed, 11 Jan 2023 12:53:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673470435; cv=none; d=google.com; s=arc-20160816; b=gJNdd5fx1PvF93VlU9j77wHGr7Kx19E2NcEEWSDNlHpThu3klbWIZ6QhXzC7qjgmg3 Af+xmTsGnTKJmP/p+QNpu0IgHOS0tApyIar6Nu1h9c0JST4hSL6QqgbntUUAggEbXO+T DPbE8moHmROs4PG8XHfa3QIMHhDUFkg0fqHLhNjJObkPzosdnqTG+alySISz7CcUIvMG WeunZLjZXxA+uXT61a5L9A5WWwYcJ0a4zqh5xm4P2nYOhZyKdEonf9EjjU+DZDB4eNa2 VGyzNWm2vdQHfJeBiozeSq6pDk4Vim6wFA81bSZQoqq7PaUk5dt9DWTxo72jbeOK8Ipj YJaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VQ5n5qj5M+uiaUGKz3q5lG4wOwFcki/Sdq/M4M0zrcE=; b=fReyagsmC59mC6WHzbUt0RtDCbQk8DII7hArxgAzmmjRBX0RNLPxNPDny3C3t1Y5uf 2NLFk7xeNkrRMiB5gDrzSzAFF/XHz42vsZFU//tLt1qZVLJallvq6xXs2uoDPI8cc8n4 TQsSJSTxyxH1cdI5H1cb6BFbW0BV93TwrA/7Ffc9f2lYttIQPmuz+souBRggWRaDw6tr qkk9rjpvv2xJTdgThttZT0xFYn0B2dPLTIvx6s+CHGHlVCZESxC2DB/ctX7MiKJLCfyl u0MF3KcUns7VlXFuzIRB53ViUKUGw6IN9ic3CkomjR8ZviG3tRlsmMrtn6Zi/YCRMx1V xUBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=MYsOORcs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xf9-20020a17090731c900b0084d33614fd0si6479385ejb.784.2023.01.11.12.53.42; Wed, 11 Jan 2023 12:53:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=MYsOORcs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232920AbjAKUqM (ORCPT + 51 others); Wed, 11 Jan 2023 15:46:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232361AbjAKUqJ (ORCPT ); Wed, 11 Jan 2023 15:46:09 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE3DE2AD6; Wed, 11 Jan 2023 12:46:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description; bh=VQ5n5qj5M+uiaUGKz3q5lG4wOwFcki/Sdq/M4M0zrcE=; b=MYsOORcsna5KxCkoYTgDCsHwdB uFUQBNQve5XOn4vXvpi3gI7n/FWKrUXU5ZXE5Ext2Rd1GHghmkJJlp65YZrOhyptDUwB0WYizq2U2 bSv5hsKON5ehF53ECVrIkVoemAPaHnPDjjRICwe9RnFQvZVuiLAiEbG3ZhToJ5HNQLMH90DFQeUeo 0JgoCeOZV5ez92Gws9TSXYG7qWYXXeBGi8Yzl6rWQboNDL5U/7jpwC7AOf/mX3oZnnMtTgz74CsNt YDe28lFD+843sstlJMRJXqlwrEq+3zebroCWTEq6xoPxtE+1h/u/Cmab+jvKQTilFnM5klvp0g3hF qpDv08LA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pFhyt-001Mlw-0T; Wed, 11 Jan 2023 20:45:55 +0000 Date: Wed, 11 Jan 2023 20:45:55 +0000 From: Al Viro To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Andrey Vagin , "Eric W. Biederman" , Serge Hallyn , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Karel Zak Subject: Re: [PATCH RESEND v3] nsfs: add compat ioctl handler Message-ID: References: <20221214-nsfs-ioctl-compat-v3-1-dce2d26e1fec@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221214-nsfs-ioctl-compat-v3-1-dce2d26e1fec@weissschuh.net> Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 11, 2023 at 04:46:30PM +0000, Thomas Wei?schuh wrote: > As all parameters and return values of the ioctls have the same > representation on both 32bit and 64bit we can reuse the normal ioctl > handler for the compat handler via compat_ptr_ioctl(). > > All nsfs ioctls return a plain "int" filedescriptor which is a signed > 4-byte integer type on both 32bit and 64bit. > The only parameter taken is by NS_GET_OWNER_UID and is a pointer to a > "uid_t" which is a 4-byte unsigned integer type on both 32bit and 64bit. > > Fixes: 6786741dbf99 ("nsfs: add ioctl to get an owning user namespace for ns file descriptor") > Reported-by: Karel Zak > Link: https://github.com/util-linux/util-linux/pull/1924#issuecomment-1344133656 > Signed-off-by: Thomas Wei?schuh Applied...