Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3458699ybd; Fri, 28 Jun 2019 09:00:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqRn1Alx3aIkFHp746PYmf7+F0d+6zZo8oCMq6+P5u/A+fhQZCSj53QxKktnzAT6SJoO7r X-Received: by 2002:a17:90a:80c4:: with SMTP id k4mr14263269pjw.74.1561737621127; Fri, 28 Jun 2019 09:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561737621; cv=none; d=google.com; s=arc-20160816; b=SYdwGfXXxRoSiFVyNIvThW0OKeApvv40JuEhbPKTrUJB0rfxb134auZClSnYFhDSQT nQ/eYvgPOdquRFJDPjt1SZpVp9iOHJERQcHo2fra5ArdBgzCxQ4w+1G7+70/2hga+4Ou 1yiyY9Cdd/aYV+XaSiKZxwTw7OV2YjGGN12I6D0r/oNivcwUfRfcFe/FRuAWflF4uNUt cObFJfhXWBD4Q03UAikmuivlgeITUPNMSyvYrhqnQaThb3qG71/HY9pKI6cH+hvGH/rY jBcjdG1X6qUU4bWjXyRK/wRiAZl/KF0q+jKajKEo3IMJ/EJuf+4kz//S1smZcnTK1a2R 6NiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ae+wjn//tDSFbQRTH4L+ejww2HFe/JEkBMbq92udtz8=; b=U2/5B1jsYIkod4SNHd7c9LUc5aKYO+VkN67JP4phqPZbDmxpftj5dTakeoAZKff8qr rSLDJHMmG9+rqZ7HeRuE+Ob3Y6BrLoJ/DoODna8lwHovbtu9jiJWvb59ebjUP2r3Oh0x 7U10EMyB7xzQOlhjtstI9XdiQaltGAsS0Mw34XQ0Higw4OQx+dKZm6LYQwndFXrlEEek HA8FMQ0yA3buRFb5O8TySTFfRwcmD7PZLXyph2C1qbN1cYkCldpafMO6d0oGvzXxoQnT sDEEG1UHFIP+J5PacbQPPlMp+2jX6mQw0+p2bFBCVx47HwiyxPvil+pM0pGlu2N6ItuE 9/8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dvEtN3iN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si2591547plp.296.2019.06.28.09.00.04; Fri, 28 Jun 2019 09:00:21 -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; dkim=pass header.i=@kernel.org header.s=default header.b=dvEtN3iN; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbfF1P77 (ORCPT + 99 others); Fri, 28 Jun 2019 11:59:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:39204 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726657AbfF1P76 (ORCPT ); Fri, 28 Jun 2019 11:59:58 -0400 Received: from localhost (unknown [104.132.1.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D871D20828; Fri, 28 Jun 2019 15:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561737596; bh=SlP82znV2OC7MdqO29KK1B36hJIqNFdblP/sjEhF12w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dvEtN3iN2/OmgCD7y14qVBt9dGQwwnPg4NW0dqXv/w/HwM9UwkHzlpJUnDlRorJ7l Ny/1sWFpfpUwFKU6A/bLJVqlMassrzrcyBXXhE8q8zpn1fi0OY4yPKCEqqg8W3A4TL sqCnIrxI0arf5dsrM27rrSVoiAUiUYqgzol3e0sg= Date: Fri, 28 Jun 2019 08:59:56 -0700 From: Jaegeuk Kim To: Arnd Bergmann Cc: Chao Yu , Qiuyang Sun , Sahitya Tummala , Eric Biggers , Wang Shilong , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] f2fs: fix 32-bit linking Message-ID: <20190628155956.GB27114@jaegeuk-macbookpro.roam.corp.google.com> References: <20190628104007.2721479-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190628104007.2721479-1-arnd@arndb.de> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, If you don't mind, can I integrate this into the original patch in the queue? Thanks, On 06/28, Arnd Bergmann wrote: > 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(-) > > 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); > -- > 2.20.0