From patchwork Fri Jun 28 10:39:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168062 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3522416ilk; Fri, 28 Jun 2019 03:40:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAXKwpTlelPk4dsM2xKTB5jXY+1uEx1hOV1AZvYdhk/K2DDe5VoVbYZ6YoTXVUVFA1lmyj X-Received: by 2002:a63:e0d:: with SMTP id d13mr8143369pgl.5.1561718436297; Fri, 28 Jun 2019 03:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561718436; cv=none; d=google.com; s=arc-20160816; b=cqwCFDnMOSFHqL52FMDUzZPF0Y58/OVuFfxlOfrHzzwdpyTMYjU7OixHVKIcWxZS3b Cr0aMLqKb/BEDuIGx9hcIwubVg8LXc6ULGdYJfzG3aNQflSUaRUaw6EVVptIxZMFhxV5 Co5hbV36gfIJJ89kuZz7LrgyJaobGbu7jAaHLUUnMtJ3c9DCgqgd70W+kdB4V2qxjx9n 4asgdWdCcXM/HvnSa/WkkALlCccDYusmdazSS4ex2wWh6MxYJfh1od4nmuBoOjgZdlk/ fXUaL3a5xHdQb4+T5iPMMeVV8sQFffMWgUG2N2ZWt6DD78YgalmOAGhduo2LUKvG56M2 pi9Q== 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:mime-version :message-id:date:subject:cc:to:from; bh=kImcAoU0RwTBNjcgSEvQppC506wCUmjoPlq1zNA+Q2c=; b=z7bm3k+j4Cz3bT9hTdC9xgqL3xmQQP0sq+icuM/gvkomHC2VTk5zbnZEb3niwaWm2z 7KxUdfyIwhaox+dlFFpX46BGMIwkviW6uRUBg0rNTuOH/xDY76d+fzfE/vXH37V7x7RB Hho675fyaMC9vDLvuQbxSOmeQdA7g+qNNxIhnCQvwaDPQKUvKDKlloN3BVEl43zkx4CX 86cn3vZ2bBxR925iQThYTJ8k88n9iKqj+OG7Ur3iMkHXh1YCd4tsVTe3CuNV+dq31BAp qAm3LUr0qKXMzwwe8fMvgYc2nbpLZim3elvf5Q2ncnAd4MF5DwgOo9yLjTrBDorjQCmz KtIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si1850065pgk.208.2019.06.28.03.40.35; Fri, 28 Jun 2019 03:40:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbfF1Kke (ORCPT + 30 others); Fri, 28 Jun 2019 06:40:34 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:43775 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726484AbfF1Kke (ORCPT ); Fri, 28 Jun 2019 06:40:34 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mqrjz-1iJykT2h0L-00mrot; Fri, 28 Jun 2019 12:40:08 +0200 From: Arnd Bergmann To: Jaegeuk Kim , Chao Yu Cc: Arnd Bergmann , Qiuyang Sun , Sahitya Tummala , Eric Biggers , Wang Shilong , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: fix 32-bit linking Date: Fri, 28 Jun 2019 12:39:52 +0200 Message-Id: <20190628104007.2721479-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:i9pne7gOZCrulnXnNLDG96catfF75e570yRKxFiuSSGz1wserXj V+2v6vNon66+ukSkKeYP5KgkYiApttcBaBPeaidxkb24oPlO/LH7M7D126r1GBTEdd3AUPT XVYSmsJyz5A2TCi4arN4hYixkHJpsVxqxfNhgPx8TlBTZfg/yCy23rrqI9LR6mBaIymqMc5 Jm+Rl+eFnIXH0yVU148rA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:FR3HnG46Egc=:FDEAcdE/ll0BOROb5cxi1M 2FF8mxEX6+baPUmlZWdyJJpJKqbmA+3tQ1w0h0leqhhoQ1ShzEK8Xg7EIzW59cXLTdEeMRjyO F3BXMV6Uw4i1jlubPWxCMnKIXmXPDWFkEDOTRr6KkNaRJLz7GcJcFPm0cP/VBGRgVbmIPbM9o VVzx6vgrWdknzPhbQbcUs8MgDgmORUd3uXP9/HRwbNoZFXMlgpsURQSBnV9DE06w3Og2jtLPx tyv4GD2nwmjH9PHWDqKp5zaLjbIgxjYX9FQcIDHLxmuQBcz584TpU2m6GfyhyhoTFvyiIrLNq vas2qDxdSSatWX9kb9NTDPOw2ACY5XBmeA6kLu6HIw+ke4k1FEAbMyN5QnJkx3UMr49WQ2nnF PDDd2RGdVu/DWE7WcxMnNO03Xc5PUH6Ng62S1PwM459/E3/uaJRGPBVXA+Bbcs8HhVWtt3sQX CS7kSAy3BbQAgCWY1H8yRqkuAeGegCERgf5T8Wa+Y4bZVCNpRS/qyLcNBV2D/YLX8yVU20D2k XJZ9BWn3LpPLkR5+liH14GSKQioBe9bzcbyN2vOBygcGMyCyZeaewEMsMAtAGIKSmsROqlfC4 3NG9W+OLmLG7unFxXcGzAGqBwXQ+ahaE0fOddfCO4gbiLsZ5rWXzYnWXf3li2/JDHvjCu985l II8BRHvm+HVJRqHL6oHR36eQM1d/WVhzRKqoYlu5WnP1pfWyttVi8DHJTnTYnLYaTpCsBAAmX Fn9UVF3LVasLObondlhoddMRvzhJMYQoUN63NA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Not all architectures support get_user() with a 64-bit argument: ERROR: "__get_user_bad" [fs/f2fs/f2fs.ko] undefined! Use copy_from_user() here, this will always work. Fixes: d2ae7494d043 ("f2fs: ioctl for removing a range from F2FS") Signed-off-by: Arnd Bergmann --- fs/f2fs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.0 diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 998affe31419..465853029b8e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3066,7 +3066,8 @@ static int f2fs_ioc_resize_fs(struct file *filp, unsigned long arg) if (f2fs_readonly(sbi->sb)) return -EROFS; - if (get_user(block_count, (__u64 __user *)arg)) + if (copy_from_user(&block_count, (void __user *)arg, + sizeof(block_count))) return -EFAULT; ret = f2fs_resize_fs(sbi, block_count);