linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org
Cc: Brian Gerst <brgerst@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	x86 <x86@kernel.org>
Subject: Re: [tip: x86/entry] x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments
Date: Wed, 10 Jun 2020 13:42:51 +0200	[thread overview]
Message-ID: <a5b51084-f289-3363-a77b-ca3bf55d78b6@suse.cz> (raw)
In-Reply-To: <07d39c26-ff51-1d34-616d-e1d525bda04f@suse.cz>

On 10. 06. 20, 13:29, Jiri Slaby wrote:
> 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 <brgerst@gmail.com>
>> AuthorDate:    Fri, 13 Mar 2020 15:51:41 -04:00
>> Committer:     Thomas Gleixner <tglx@linutronix.de>
>> 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?

Got it:
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -1358,7 +1358,7 @@ static inline long ksys_lchown(const char __user
*filename, uid_t user,

 extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small);

-static inline long ksys_ftruncate(unsigned int fd, unsigned long length)
+static inline long ksys_ftruncate(unsigned int fd, loff_t length)
 {
        return do_sys_ftruncate(fd, length, 1);
 }

Will send a patch in few minutes.

thanks,
-- 
js
suse labs

  reply	other threads:[~2020-06-10 11:42 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 19:51 [PATCH v4 00/18] x86: syscall wrapper cleanups Brian Gerst
2020-03-13 19:51 ` [PATCH v4 01/18] x86, syscalls: Refactor SYSCALL_DEFINEx macros Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 02/18] x86, syscalls: Refactor SYSCALL_DEFINE0 macros Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 03/18] x86, syscalls: Refactor COND_SYSCALL macros Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 04/18] x86, syscalls: Refactor SYS_NI macros Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-23  8:11   ` [PATCH] x86/entry: Fix SYS_NI() build failure Ingo Molnar
2020-03-23 21:11     ` Brian Gerst
2020-03-13 19:51 ` [PATCH v4 05/18] x86-64: Use syscall wrappers for x32_rt_sigreturn Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/64: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 06/18] x86-64: Move sys_ni_syscall stub to common.c Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/64: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 07/18] x86-64: Split X32 syscall table into its own file Brian Gerst
2020-03-14 13:39   ` Dominik Brodowski
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/64: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 08/18] x86: Move max syscall number calculation to syscallhdr.sh Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 09/18] x86-64: Remove ptregs qualifier from syscall table Brian Gerst
2020-03-14 13:42   ` Dominik Brodowski
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/64: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 10/18] x86: Remove syscall qualifier support Brian Gerst
2020-03-14 13:43   ` Dominik Brodowski
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 11/18] x86-64: Add __SYSCALL_COMMON() Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/64: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 12/18] x86: Remove ABI prefixes from functions in syscall tables Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 13/18] x86: Clean up syscall_32.tbl Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/32: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 14/18] x86, syscalls: Rename 32-bit specific syscalls Brian Gerst
2020-03-14 13:45   ` Dominik Brodowski
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/32: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 15/18] x86: Use IA32-specific wrappers for syscalls taking 64-bit arguments Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/32: " tip-bot2 for Brian Gerst
2020-06-10 11:29     ` Jiri Slaby
2020-06-10 11:42       ` Jiri Slaby [this message]
2020-03-13 19:51 ` [PATCH v4 16/18] x86-32: Enable pt_regs based syscalls Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry/32: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 17/18] x86: Drop asmlinkage from syscalls Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] x86/entry: " tip-bot2 for Brian Gerst
2020-03-13 19:51 ` [PATCH v4 18/18] x86: Remove unneeded includes Brian Gerst
2020-03-21 15:30   ` [tip: x86/entry] " tip-bot2 for Brian Gerst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5b51084-f289-3363-a77b-ca3bf55d78b6@suse.cz \
    --to=jslaby@suse.cz \
    --cc=brgerst@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --subject='Re: [tip: x86/entry] x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).