From patchwork Sat Dec 15 01:22:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Bowler X-Patchwork-Id: 10731945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9D301399 for ; Sat, 15 Dec 2018 01:22:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 978612D02C for ; Sat, 15 Dec 2018 01:22:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B5942D035; Sat, 15 Dec 2018 01:22:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E98882D02C for ; Sat, 15 Dec 2018 01:22:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727634AbeLOBWS (ORCPT ); Fri, 14 Dec 2018 20:22:18 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:38822 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbeLOBWS (ORCPT ); Fri, 14 Dec 2018 20:22:18 -0500 Received: by mail-io1-f68.google.com with SMTP id l14so5916672ioj.5 for ; Fri, 14 Dec 2018 17:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=draconx-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=yzw+aUt5r3sbLA4eDKeNyn2O7NTIY2blz7Qe0e1KQMk=; b=FGy/77OcoHBSxIOBU8hBOoJ1MnZBBlCI/uRLQwyOsBNhaU0p2xu8qE4KTtiKDk0L+H lYSbMP17Y1ekQ9tXhwbTwj8M7mmQXwKUN/Qg28s5vS15SrDF/afLwB3pfz652ZdivvYZ BpPO65zCJ5SJD9Wa2BMa2G+EfnOe8nFgDHzJp9vBwVnsYPrC8KWnp+dz1aQhZ+aF0Mcs iFixwtOGcUtrT9FqfIVt8hweArStP+SEFSc3inMCiIOjVFt6hwMWriHbBBuTLar8QhGa aqjEzhCG2gTm3qwkW1RphhpWYjVblkcrRAr5PebKuXaWKKyAjiwnHyfTmwjAWKQgeso/ Xucw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yzw+aUt5r3sbLA4eDKeNyn2O7NTIY2blz7Qe0e1KQMk=; b=FUSXUS0YO3Z9wN7KBaw6GxRdMDskBRCPfDMKVNaD//XT37tq9Tw73ajSF8hMXPNqtx U03+NDL0ERismsE5zWCuyfZFHpVb2vdnLJJPwh49WG9lSyZ7Y4KE6pSwctJ5LWMCNbJk +PXZmqFQniAkNLN67bnPK/RYP6YG8/DcWm0DndNEv8gBS4XmKJSTvJ5YSHKWbC4m/YPf goiJFLv65LbmW8se9xlWa3V02/74Djgx88TFbZdg0cKf8b6+eKImGPbwdHZQQysm/sYz ChiqhMr48DpEdN+BakVZtWYWwYKtrfZGt5v6+zyL74Rps/Sr1P7WupESgSKeclzRswev +x5g== X-Gm-Message-State: AA+aEWbxO1qhHKfF9S7ahtVNCYyohdJ9Wsn0bQPd5ncSWObsMTHr+3gP biKx/5OfZ3BXXcMXi2LKXR7gwcRe2lpknesu X-Google-Smtp-Source: AFSGD/XG5iVjajN69AbHH/lbzgmPl1iItB2iwTqwQxkvQug1MquwVLlh2INQMqYAT5pMDzU9AZ88sQ== X-Received: by 2002:a6b:1741:: with SMTP id 62mr4491312iox.251.1544836936826; Fri, 14 Dec 2018 17:22:16 -0800 (PST) Received: from localhost (ip-24-156-181-89.user.start.ca. [24.156.181.89]) by smtp.gmail.com with ESMTPSA id e22sm2575464iod.47.2018.12.14.17.22.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 Dec 2018 17:22:15 -0800 (PST) From: Nick Bowler To: linux-xfs@vger.kernel.org Cc: Brian Foster , Dave Chinner , "Darrick J. Wong" Subject: [RFC PATCH v2 0/3] Fixing xfs ioctls on x32 Date: Fri, 14 Dec 2018 20:22:56 -0500 Message-Id: <20181215012259.28358-1-nbowler@draconx.ca> X-Mailer: git-send-email 2.18.1 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP v2: Add a new patch which fixes xfstests/269 on both x32 and IA-32 userspace. Updated test results. Update commit message and comments in bulkstat patch based on feedback. An error I got running xfs_growfs on my x32 system opened this can of worms... This series is intended to fix all XFS ioctls which don't work from x32 userspace applications. Test is xfstests "check -g quick", excluding generic/081 and xfs/014 which don't behave well for me and don't seem related to XFS ioctls. Note that glibc's fallocate wrapper appears to be buggy on x32, which causes several test failures. I hacked around that in xfs_io (the fallocate syscall itself appears to work perfectly fine on x32) to get a cleaner test run. Obviously this bug should be fixed but it doesn't appear to be a kernel or xfsprogs problem. All tests are running with the same 4.20-rc6 kernel, but different userspace installations (pure x32 versus pure i686). The "After" results are obtained by reloading the xfs.ko kernel module with the patched version and running the same set of tests. All the remaining failures on x32 appear to be aio related, or are also failing on the i686 tests. I have no experience with aio and there's probably something to be fixed here but it seems unrelated to XFS ioctls and I think that's a story for another day. Before (i686 w/ 64bit kernel): Failures: generic/484 xfs/191-input-validation xfs/269 xfs/495 Failed 4 of 658 tests Before (x32): Failures: generic/018 generic/075 generic/079 generic/112 generic/113 generic/114 generic/198 generic/207 generic/210 generic/240 generic/252 generic/386 generic/427 generic/451 generic/465 generic/484 xfs/002 xfs/009 xfs/026 xfs/027 xfs/028 xfs/046 xfs/054 xfs/056 xfs/059 xfs/060 xfs/062 xfs/063 xfs/066 xfs/069 xfs/072 xfs/078 xfs/106 xfs/118 xfs/164 xfs/165 xfs/166 xfs/170 xfs/190 xfs/191-input-validation xfs/195 xfs/250 xfs/266 xfs/269 xfs/281 xfs/282 xfs/283 xfs/289 xfs/296 xfs/443 xfs/449 xfs/495 Failed 52 of 658 tests After (i686 w/ 64bit kernel): Failures: generic/484 xfs/191-input-validation xfs/495 Failed 3 of 658 tests After (x32): Failures: generic/112 generic/113 generic/114 generic/198 generic/207 generic/210 generic/240 generic/252 generic/427 generic/451 generic/465 generic/484 xfs/191-input-validation xfs/495 Failed 14 of 658 tests Nick Bowler (3): xfs: Align compat attrlist_by_handle with native implementation. xfs: Fix bulkstat compat ioctls on x32 userspace. xfs: Fix x32 ioctls when cmd numbers differ from ia32. fs/xfs/xfs_ioctl32.c | 58 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 51 insertions(+), 7 deletions(-)