Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1520212ybt; Mon, 15 Jun 2020 02:23:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAtEzb1CgYeiz6GX7C24oLTckgkSj7mHVE+NlKfgNLEDMHzRcozaWtpWXR9cuWiKyTwTAx X-Received: by 2002:a17:906:480f:: with SMTP id w15mr24779664ejq.430.1592213034835; Mon, 15 Jun 2020 02:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592213034; cv=none; d=google.com; s=arc-20160816; b=TX0vpTMjTmqr7S7gSqeoPy907DuiGpMHPP47vfhhwFJk2YGSP95g0L05uyKgTlIMV3 8KmWLVvwEj8wf2dtouLuzyN9QW0dFAHHQz0UvW8PfB3q0b8ujcU0RCHjQDsu+T3xe7O9 sM7cKGN3+ywKNXUKIfzO7ewQueA+0rJdIqN/RGJW8CXDZwgGDY+4H1Pdby1BVlD+w6ZG EQxHbMZ7dORd9WC5mRPctSN7vm4xgtvxougGg92TFNQrlT0AVKTAjO7JN1kIDPpeLR6k AxK2qLKODBiDxO8L5EPW8DquG2Vcqq8ZjMV6PEdWoKENJsDSgKdSpK/nM+gq/hU0Vs7W QefA== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=DGz7ILmTMWZBU8ecBqpEUKQbWSPwyJAhszPyaZ6d8rI=; b=S7i+msZi0lVIGPxFZJoRBlKHDVugKx/IaVULl7nr97dlcqkPR+xU+s5NvNUrwV/Kck Ec4nMu9rEqfMTVhjJoAr7dWE0PM2TjfalPP0k7hH6YHlSgNADtAV4bcMzX0NdvBVOcfh On49MN1sor21ujWBtDMLjzE6e5XgE6E9tPafMlL2EZMyZ+rAofoBajGjSvYlhBkFdWTp 0SFXxl4Y8Rr/Qgl59x+uYUF2ZKLsUHh6NWvbgL8VXkaz0XvArL44kAU5UXY/zYcD72UA 3wX7vRVgZEv0r9via5lyeLmL/fdu5WfEWSvotx61hyj/JUwWQACex8IiCzIENVtZvaSS FBzw== 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 c14si2826189edl.273.2020.06.15.02.23.31; Mon, 15 Jun 2020 02:23:54 -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 S1729158AbgFOJVo (ORCPT + 99 others); Mon, 15 Jun 2020 05:21:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728865AbgFOJVn (ORCPT ); Mon, 15 Jun 2020 05:21:43 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEE8AC061A0E; Mon, 15 Jun 2020 02:21:43 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jklJA-0005qE-LA; Mon, 15 Jun 2020 11:21:36 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id F20A11C00ED; Mon, 15 Jun 2020 11:21:35 +0200 (CEST) Date: Mon, 15 Jun 2020 09:21:35 -0000 From: "tip-bot2 for Jiri Slaby" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] syscalls: Fix offset type of ksys_ftruncate() Cc: Jiri Slaby , Thomas Gleixner , Brian Gerst , stable@vger.kernel.org, x86 , LKML In-Reply-To: <20200610114851.28549-1-jslaby@suse.cz> References: <20200610114851.28549-1-jslaby@suse.cz> MIME-Version: 1.0 Message-ID: <159221289568.16989.17711770547953767180.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 8e742aa79780b13cd300a42198c1a4cea9c89905 Gitweb: https://git.kernel.org/tip/8e742aa79780b13cd300a42198c1a4cea9c89905 Author: Jiri Slaby AuthorDate: Wed, 10 Jun 2020 13:48:51 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 15 Jun 2020 11:16:27 +02:00 syscalls: Fix offset type of ksys_ftruncate() After the commit below, truncate() on x86 32bit uses ksys_ftruncate(). But ksys_ftruncate() truncates the offset to unsigned long. Switch the type of offset to loff_t which is what do_sys_ftruncate() expects. Fixes: 121b32a58a3a (x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments) Signed-off-by: Jiri Slaby Signed-off-by: Thomas Gleixner Reviewed-by: Brian Gerst Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200610114851.28549-1-jslaby@suse.cz --- include/linux/syscalls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 7c354c2..b951a87 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1360,7 +1360,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); }