From patchwork Wed Jun 28 08:04:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 781490 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wyFk60LFVz9s7g for ; Wed, 28 Jun 2017 18:06:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="tVGvqbhN"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wyFk56Q4GzDr4g for ; Wed, 28 Jun 2017 18:06:37 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="tVGvqbhN"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wyFh95wBfzDqlL for ; Wed, 28 Jun 2017 18:04:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=canb.auug.org.au header.i=@canb.auug.org.au header.b="tVGvqbhN"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3wyFh92xgnz9s7g; Wed, 28 Jun 2017 18:04:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1498637097; bh=yGaNgof5efEH+MH+v4nEUNUTKyc29s9u6Bqh8D3N2jc=; h=Date:From:To:Cc:Subject:From; b=tVGvqbhNjCJ+l8cYl1gsfYHppwKzNQu8T3ktnQZFMEmzgUk2ArB3al1s+Jp6LCfZs A+IA3O/cY5KQK6UTONvyLgus6+OFg2J3cfhHI5D0MC454dxEsard5gziqTq5hAuiRa S10QUU3SvC+GzaEoUNzGV34Ja6hHkjp1I814K2bCJrVCcDzo081+tirhm+xEL72XDP AB+GYOQmCD8bCUpJU4E0Nj7qkdJgzjuYCqGUu4RcmZhxxJrPuS38r9gV19lqDSEe7x pn0cXpE2izALWH9mvc29HOAIsCyPp0Z7WgTagInuRRx67UGlYWfq8+kMVtqfvFMhp0 SUf3Gs+I7+OEQ== Date: Wed, 28 Jun 2017 18:04:56 +1000 From: Stephen Rothwell To: Jens Axboe Subject: linux-next: build failure after merge of the block tree Message-ID: <20170628180456.30cb9242@canb.auug.org.au> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Martin K. Petersen" , Linux Kernel Mailing List , Linux-Next Mailing List , PowerPC Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi Jens, After merging the block tree, today's linux-next build (powerpc allnoconfig) failed like this: fs/fcntl.o: In function `do_fcntl': fcntl.c:(.text+0x6d4): undefined reference to `__get_user_bad' fcntl.c:(.text+0x730): undefined reference to `__get_user_bad' Probably caused by commit c75b1d9421f8 ("fs: add fcntl() interface for setting/getting write life time hints") On powerpc (at least) you cannot use get_user() to fetch anything larger than "unsigned long" i.e. 32 bits on 32 bit powerpc. This has been discussed before (and, I think, a fix attempted). For now I have applied the following patch: From: Stephen Rothwell Date: Wed, 28 Jun 2017 17:50:31 +1000 Subject: [PATCH] fs: don't read an enum directly from a u64 __user * Signed-off-by: Stephen Rothwell --- fs/fcntl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 24e233c75a33..19825eb7c40d 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -277,6 +277,7 @@ static long fcntl_rw_hint(struct file *file, unsigned int cmd, { struct inode *inode = file_inode(file); u64 *argp = (u64 __user *)arg; + u64 h; enum rw_hint hint; switch (cmd) { @@ -285,8 +286,9 @@ static long fcntl_rw_hint(struct file *file, unsigned int cmd, return -EFAULT; return 0; case F_SET_FILE_RW_HINT: - if (get_user(hint, argp)) + if (copy_from_user(&h, argp, sizeof(h))) return -EFAULT; + hint = (enum rw_hint)h; if (!rw_hint_valid(hint)) return -EINVAL; @@ -299,8 +301,9 @@ static long fcntl_rw_hint(struct file *file, unsigned int cmd, return -EFAULT; return 0; case F_SET_RW_HINT: - if (get_user(hint, argp)) + if (copy_from_user(&h, argp, sizeof(h))) return -EFAULT; + hint = (enum rw_hint)h; if (!rw_hint_valid(hint)) return -EINVAL;