Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4260913pxb; Tue, 10 Nov 2020 11:45:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSilrmIz1sYpCH8yUjairzS4aJI9muYYWBzN9OJJ7rVO5yd1JUtY68zGu1gBgZTClHModq X-Received: by 2002:a17:906:38d3:: with SMTP id r19mr4730218ejd.525.1605037558927; Tue, 10 Nov 2020 11:45:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605037558; cv=none; d=google.com; s=arc-20160816; b=qC+dbmvEuA0g3tebPD/JEgEAqBSvsofJrQbPWyacDGxowx/Gl5sPYwDzXy3WusYGzz WvmRq7C4sstWSwT+kmiZJn2clzX0/BP1ou5Nb5pv8wpptgWf3nKVP1HX124uoqPgq6xP ZzoTGXDR0d7YMeAUXD2KHxPSRWQJXvLg4IM03m1T6A44dQYePX6xV4fSb3KZChFUNtsF oLPaSAE8Bs00dJIbdbq5zcxIUvlKAw/G4qkejlBhMfTcY/hjSd6BQnpRndsarM7DrUfF r4QNq6v8H/y5ogpEXpvv07gELwmDItIGHq47pFnqKkAh/XHqn+uWEn2DHH69ARahqAM4 Z+Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0eCu126V8XAtkUgKu9Pm9beJMz9E3ENBO3RApqCTwzQ=; b=tJ+6W8FaG4iRUmdwBis8wtUv0U/ImH46OHH8ew6RhKwufgMfSbWEr6QsTcPGDfjbg5 /WGY5QtUzF/4z2glbM60yc4yXAToEQswHqG3/TTZVzriz4PxbaHYK6dah8QQbf/2eMjP mBxmBp6fop6kfV/M8lJTUvh01HRamUpXF+AV/F8bXtuiY6QSHbZiiadLAiMWoAeGNJmX EOSofcuHmLQ+zA2pxBqjheW0eCuyiuFGQIfhKk/HaFCIoyST5Xm63ziB0gV65fLLIKM+ 0Fq3ooBPY9NfLblSS/LZGNZ/fjJeZv7FSef2zkNzCkCBxU0YVKyZm41XvZpj7GYya0ms 56bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uwK0m1ZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si10635486edn.152.2020.11.10.11.45.35; Tue, 10 Nov 2020 11:45:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uwK0m1ZD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731652AbgKJToG (ORCPT + 99 others); Tue, 10 Nov 2020 14:44:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:36578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726467AbgKJToF (ORCPT ); Tue, 10 Nov 2020 14:44:05 -0500 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A0A820825; Tue, 10 Nov 2020 19:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605037445; bh=seNybUnu/z66DWRDuPPyP69NxwKQVHVpyPN9eY37It0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uwK0m1ZDOh/aPdTFbY070MiBo5SLzbYd7MQgBz8ixdmUB7b+s36x4PTxPMZD0iU1S nNPoHgdqo8I50QP6lVW0P1OtiJWF5OTsXB86jXPPEVLEVVAkG8FVPUNETH2WZmHl6t O4vOkUwtMbKDwOeA2muP/zuVeDjJpkuPol1Bbu1g= Date: Tue, 10 Nov 2020 11:44:03 -0800 From: Eric Biggers To: Chao Yu Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH v5 2/2] f2fs: fix compat F2FS_IOC_{MOVE, GARBAGE_COLLECT}_RANGE Message-ID: References: <20201110012437.26482-1-yuchao0@huawei.com> <20201110012437.26482-2-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201110012437.26482-2-yuchao0@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 09:24:37AM +0800, Chao Yu wrote: > Eric reported a ioctl bug in below link: > > https://lore.kernel.org/linux-f2fs-devel/20201103032234.GB2875@sol.localdomain/ > > That said, on some 32-bit architectures, u64 has only 32-bit alignment, > notably i386 and x86_32, so that size of struct f2fs_gc_range compiled > in x86_32 is 20 bytes, however the size in x86_64 is 24 bytes, binary > compiled in x86_32 can not call F2FS_IOC_GARBAGE_COLLECT_RANGE successfully > due to mismatched value of ioctl command in between binary and f2fs > module, similarly, F2FS_IOC_MOVE_RANGE will fail too. > > In this patch we introduce two ioctls for compatibility of above special > 32-bit binary: > - F2FS_IOC32_GARBAGE_COLLECT_RANGE > - F2FS_IOC32_MOVE_RANGE > > Reported-by: Eric Biggers > Signed-off-by: Chao Yu Reviewed-by: Eric Biggers