Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp466292ybg; Wed, 10 Jun 2020 05:37:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVqAAj3JPet4rTrw6UqQnG9L4C0Uvbpxl3mpE+d7Fm62IDHv8ZViwVIV+5RoefEU0W1FhJ X-Received: by 2002:a50:8d18:: with SMTP id s24mr2248522eds.303.1591792648450; Wed, 10 Jun 2020 05:37:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591792648; cv=none; d=google.com; s=arc-20160816; b=v5GLl4LdCChuETuNfs+68hIWqaHgfcdMMlDXYzAA9ruxktXeEsByhEX4YbitTlhFBx NGei61fmFq43MyBkW8qdXrEOM896F+dU2s7awb/vFd1rAGEVic4HL+7rTH1nWYY558fE 7xfwqtOwMBiw3mrLBNXncwZCbBfBCkyAU2AvQLldHNG/O75ZmoLfgbMIcRV7unMjzZPU gDHyTe2PA8LhjyPjSmtqPE5JrBUyldgvMivI/ZfuEFKtM9dQ3NroRx9njdeXnVO1Kcto O0AvuaJ0cl0qwAdliOFHe2ONj0BoEAt0Lix5T9MEjcY+9KTiYOcXPKpd28tquwPIG2b9 m0Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=gEwAMEos9mJeyuBEtMGoJ7WeF5TrT6RnXqrCBNOkXKo=; b=Ga/rSDqqBXkEQtHZQokP+EGTFPQ5U2S5a90zwbiNFaG40N7Ufc01ndA/3uffgke0TF diIEW3wKQT5OkaBTnzdhnXTe8IjcpXPu9CwtS/eKPCx2ndgXDhumDLtqvRrblsPFXVz6 QQXejsYfnb5eeLatRLLE8OguKHtdRLnTj2gN8zVD/NGHTw0Zcj2RPlv22+646G/eSgTC A65VJyzdGphiIS0ZjM0ZI0RA8MKqsHjH2XIsyn2PwMe7UJEo3HH2bRhBM6GYNZf3P0JC moIGstKSsQpoThV1i+HmXjPCgFXo3PTBra0ah11U58FYi5jSN6fNEZq/nTAE3p5mrX19 f8Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mFmvftu8; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t16si9295893ejf.398.2020.06.10.05.37.05; Wed, 10 Jun 2020 05:37:28 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mFmvftu8; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729016AbgFJMcg (ORCPT + 99 others); Wed, 10 Jun 2020 08:32:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727927AbgFJMcg (ORCPT ); Wed, 10 Jun 2020 08:32:36 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02B16C03E96B for ; Wed, 10 Jun 2020 05:32:33 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id s18so1959861ioe.2 for ; Wed, 10 Jun 2020 05:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gEwAMEos9mJeyuBEtMGoJ7WeF5TrT6RnXqrCBNOkXKo=; b=mFmvftu8um4zSR74X94iYcbVafHOUT2/kfnxIJ6pJmXtt0NZ3RA0PpVJ8D/cwBTozI QcOGchsvt4jIO6zcGpXfP/UNpTM2ormEecd5+Qerse5Atz4s7WgwhLW8kEv+LqVyMtrC ibxnSuEP39roA3Apd+7h7YQQJPAi/+w34lpryuPYQDE9nqREIVU2xUVrBKWDL6MUtejy 8WU1be9W4z/vfTj6xHrkXP/dVPap963HqP7gzUskmX/VB/n1JqLl51jdAzHhkj9AuCRw /hZw6aPdKa1j7o8C7nWTA1xzJEor+5oMmSxkaeC5c9rcmzrjZm+gsNJo+M2E+Zlvdzs/ BYmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gEwAMEos9mJeyuBEtMGoJ7WeF5TrT6RnXqrCBNOkXKo=; b=rXmrN8ubOIh8TiqXQa9iD1kICpxZ0k1lNnSuELTFYT1Axuj9/VR/wxS/zt5ISZ1obb PwSu0Nlwx3TmaUs3P6XI7oUs4aTQiVGhP1AO0EYb8RQKCvMxmcdhcYp2twtr3hBNq571 gcQjaVQ+8WUdY8hrBZEYhClihyGm5xV1UYC0LDCza/agV3Zt8DU52G9/8/T+04VV3q69 sc5UK3TZEPuU050SXvorRVxJ2K2nQX/UBuBm5fR8l/Aiixq+RyV4Wgr7M8uK1goJ0JtE Uu8oU1n7pYwvFtwzsxq5o6Sib9npolj82XZKX0CxDOTgaI4+YJReWaKtcBD2J8aXz4W/ Zg4w== X-Gm-Message-State: AOAM530Uy/9YCYyuVgTOKIG/e5OmoRfYgdyqB8wyA1wjoT1yDZ+MPECW ps8ymg/Az8OjKkwhhMi8R6v/set286pWUUTzhw== X-Received: by 2002:a05:6602:50:: with SMTP id z16mr3084684ioz.22.1591792353125; Wed, 10 Jun 2020 05:32:33 -0700 (PDT) MIME-Version: 1.0 References: <20200610114851.28549-1-jslaby@suse.cz> In-Reply-To: <20200610114851.28549-1-jslaby@suse.cz> From: Brian Gerst Date: Wed, 10 Jun 2020 08:32:22 -0400 Message-ID: Subject: Re: [PATCH] syscalls: fix offset type of ksys_ftruncate To: Jiri Slaby Cc: Thomas Gleixner , "the arch/x86 maintainers" , Linux Kernel Mailing List , Dominik Brodowski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 10, 2020 at 7:48 AM Jiri Slaby wrote: > > After the commit below, truncate on i586 uses ksys_ftruncate. But > ksys_ftruncate truncates the offset to unsigned long. So switch the type > of offset to loff_t which is what the lower do_sys_ftruncate expects. > > Signed-off-by: Jiri Slaby > Fixes: 121b32a58a3a (x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments) > Cc: Brian Gerst > Cc: Thomas Gleixner > Cc: Dominik Brodowski > --- > 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 63ffa6dc9da3..e97ca179d0dc 100644 > --- a/include/linux/syscalls.h > +++ b/include/linux/syscalls.h > @@ -1370,7 +1370,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); > } Reviewed-by: Brian Gerst