Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp424829ybg; Wed, 10 Jun 2020 04:32:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza7pWT2IcFkBa2HvOVihxUTdEAMXhabd3PW87Gxekva+hvpQJ7lUT28guRmRQ11BsxeblA X-Received: by 2002:a17:906:2409:: with SMTP id z9mr2812747eja.442.1591788735746; Wed, 10 Jun 2020 04:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591788735; cv=none; d=google.com; s=arc-20160816; b=t+cocA9SZDtCIFPbgDdHaJXK7OF9k/UstUuV3112WlrWIdsQb8zONBjXGifkgcLYXN QRUy1pO16dEf2j+WaNuMjOTmavVqypOOvQJvIazSzI9jtwmnFsffN1NEVYAyT/wDkBM1 iIEjt+itmKcUgaNHuyogAWU78vIowwQMQoTVsWXZtD03DpdaE9eV0d9ts/TU3Sb7yqKx eS0x4+rBVcxHfXDaksiXo7N9OKp/+H8WYsHKl0dYXFjdXY2y0tekorqO7PSHSyCAAJRK bGgJfPlzMJv/58xkg/OqgXg45Lu4MmdDjl+Q6DJwJZXWE0KsFXAuKVqMrzWQRpHMUsQD hEgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=/QsD4ZsjsrH3IeER9QslzjOBFHHcYVvlyT8YjGBwSJA=; b=yf0siNqDlWtA/pj+XsO8KC6to8KxabFp2ZqjPFo25wZ2ltfgTx/5Pd4nO/HbioBfI1 jjccd5ViiVK4s+pPVmjc/+Hw3QVfyA7KX8Wk/z7w93DkJRndF53+Zj1F7ZGy6+XOluOq bAW9H26i5XpNsmAv/mgdmXVseSI+ZGmcVgMhqcEYQ4uvHtmPHo6tyUk52wGRoGxtcsFE o3lJq7mnk2dt4AvBdiSwVQI3gFA1syKp5cMiE05hgM/ExUUOAGnAt7Uim2+1xn9riGb7 5qm4c7FTR3YzFntvyiuTLi8rxBRra276swkFsj1O9fZBaxhNF6vv3nexu4gIKOSRlBgd 5u0A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g1si12235311edv.486.2020.06.10.04.31.53; Wed, 10 Jun 2020 04:32:15 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728532AbgFJL3g (ORCPT + 99 others); Wed, 10 Jun 2020 07:29:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:47636 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728458AbgFJL3f (ORCPT ); Wed, 10 Jun 2020 07:29:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B5C74AE63; Wed, 10 Jun 2020 11:29:35 +0000 (UTC) Subject: Re: [tip: x86/entry] x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments To: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org Cc: Brian Gerst , Thomas Gleixner , Dominik Brodowski , x86 References: <20200313195144.164260-16-brgerst@gmail.com> <158480463257.28353.7220752053626182323.tip-bot2@tip-bot2> From: Jiri Slaby Autocrypt: addr=jslaby@suse.cz; prefer-encrypt=mutual; keydata= mQINBE6S54YBEACzzjLwDUbU5elY4GTg/NdotjA0jyyJtYI86wd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+d1sN/VTSPyfQARAQABiQIfBBgBAgAJBQJOkueGAhsM AAoJEL0lsQQGtHBJN7UQAIDvgxaW8iGuEZZ36XFtewH56WYvVUefs6+Pep9ox/9ZXcETv0vk DUgPKnQAajG/ViOATWqADYHINAEuNvTKtLWmlipAI5JBgE+5g9UOT4i69OmP/is3a/dHlFZ3 qjNk1EEGyvioeycJhla0RjakKw5PoETbypxsBTXk5EyrSdD/I2Hez9YGW/RcI/WC8Y4Z/7FS ITZhASwaCOzy/vX2yC6iTx4AMFt+a6Z6uH/xGE8pG5NbGtd02r+m7SfuEDoG3Hs1iMGecPyV XxCVvSV6dwRQFc0UOZ1a6ywwCWfGOYqFnJvfSbUiCMV8bfRSWhnNQYLIuSv/nckyi8CzCYIg c21cfBvnwiSfWLZTTj1oWyj5a0PPgGOdgGoIvVjYXul3yXYeYOqbYjiC5t99JpEeIFupxIGV ciMk6t3pDrq7n7Vi/faqT+c4vnjazJi0UMfYnnAzYBa9+NkfW0w5W9Uy7kW/v7SffH/2yFiK 9HKkJqkN9xYEYaxtfl5pelF8idoxMZpTvCZY7jhnl2IemZCBMs6s338wS12Qro5WEAxV6cjD VSdmcD5l9plhKGLmgVNCTe8DPv81oDn9s0cIRLg9wNnDtj8aIiH8lBHwfUkpn32iv0uMV6Ae sLxhDWfOR4N+wu1gzXWgLel4drkCJcuYK5IL1qaZDcuGR8RPo3jbFO7Y Message-ID: <07d39c26-ff51-1d34-616d-e1d525bda04f@suse.cz> Date: Wed, 10 Jun 2020 13:29:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <158480463257.28353.7220752053626182323.tip-bot2@tip-bot2> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21. 03. 20, 16:30, tip-bot2 for Brian Gerst wrote: > The following commit has been merged into the x86/entry branch of tip: > > Commit-ID: 121b32a58a3af89a780cf194ce3769fc4120e574 > Gitweb: https://git.kernel.org/tip/121b32a58a3af89a780cf194ce3769fc4120e574 > Author: Brian Gerst > AuthorDate: Fri, 13 Mar 2020 15:51:41 -04:00 > Committer: Thomas Gleixner > CommitterDate: Sat, 21 Mar 2020 16:03:24 +01:00 > > x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments > Hi, this breaks creation of sparse files (e.g. by tar) on i586 (in 5.7). tar does this: > openat(4, "sparsefile", O_WRONLY|O_CREAT|O_EXCL|O_NOCTTY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC, 0600) = 5 > _llseek(5, 0, [0], SEEK_SET) = 0 > _llseek(5, 8589934592, [8589934592], SEEK_SET) = 0 > write(5, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"..., 512) = 512 > _llseek(5, 8589935104, [8589935104], SEEK_SET) = 0 > _llseek(5, 0, [8589935104], SEEK_CUR) = 0 > ftruncate64(5, 8589935104) = 0 > utimensat_time64(5, NULL, [UTIME_OMIT, {tv_sec=1591782127, tv_nsec=400000000} /* 2020-06-10T11:42:07.400000000+0200 */], 0) = 0 > fchown32(5, 0, 0) = 0 > fchmod(5, 0644) = 0 > close(5) = 0 It should result in a sparsefile of size 8589935104, but after this commit, it's only 512 bytes. The archive is this: XQAAgAD//////////wAXC8aHklo7p4/HJQ64D7SVnhAZOByg5PlRjaTJjmKhpQbF1loXWBYREoWY DagQFjCR/jUwLV7mWbgHwcINuoi1bu/eDQHOp5mXL9bq/twuolv5Y2krdqZEztWCBydhsNFwBxHi U47whwTByiH4Ot16JcEkr4BFWXHXMTRs1lfVmIOE13bldiM6MzQUC7212b81Rn13fw06uk+aoP74 OvatxDoW95Y7/xeMyDQ7uk8L1OfFGVRfU+PFycrb1gDZc6hLY2kDY15PGxCMSzHHGDE3nTr9Imdw UoUYqYNhi3tztLuue2rvzngAsMvHIEJaE6i2E5+X7lwlHZhg9Wp2T9ow9DyaJYLr/N+Jln7P1C97 2hT9YzrPNupujamDoBv0kIA3zgAw/xHvZX/I3tfa5Z8+TjrhfgJ8poGKK1S1e8LR+657FbBH3B46 HZFclvO0bUvL1xyRx0OPM1Dzzd+lH8VgF6RYHj1vDJCcR8nbtEfgN5W+cN44xdPO1VN/6Ffnj5Af 84sDSaBSn7HTnaaJRX0KPa3zfdUzTv/ykgihysjhxAV9CW02ZiVffVgrK5UHVuoWzqQ76+83fYsM rSWRtoL0a3eo/hbqPvHg1Q8dRvbjwLs610lu3QIkvQ0DOK7zUHx44ODHfLBS2LJcw5TCiU25xGCm NXS1oRaVdqnCV6Rl5KZHPiHF7ZRxQFQxLgreu8z0INZ41T74pGbfGvNRqyLy9wxiO4/uCICO0om/ oHlgowb9RWX9/0Z2 Feed it through (on i586): mkdir directory; base64 -d | tar JxvC directory/ and check the size of directory/sparsefile. Reverting the commit on the top of 5.7 doesn't help. I suppose it doesn't take the original path in the code there... Any ideas? > For the 32-bit syscall interface, 64-bit arguments (loff_t) are passed via > a pair of 32-bit registers. These register pairs end up in consecutive stack > slots, which matches the C ABI for 64-bit arguments. But when accessing the > registers directly from pt_regs, the wrapper needs to manually reassemble the > 64-bit value. These wrappers already exist for 32-bit compat, so make them > available to 32-bit native in preparation for enabling pt_regs-based syscalls. > > Signed-off-by: Brian Gerst > Signed-off-by: Thomas Gleixner > Reviewed-by: Dominik Brodowski > Link: https://lkml.kernel.org/r/20200313195144.164260-16-brgerst@gmail.com thanks, -- js suse labs