From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbbLIAr7 (ORCPT ); Tue, 8 Dec 2015 19:47:59 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:49993 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752037AbbLIAr6 (ORCPT ); Tue, 8 Dec 2015 19:47:58 -0500 Date: Tue, 8 Dec 2015 16:30:27 -0500 From: Greg KH To: Wim de With Cc: oleg.drokin@intel.com, andreas.dilger@intel.com, lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: lustre: add __user attributes to llite/file.c Message-ID: <20151208213027.GA31006@kroah.com> References: <1449606856-21619-1-git-send-email-nauxuron@wimdewith.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449606856-21619-1-git-send-email-nauxuron@wimdewith.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2015 at 09:34:16PM +0100, Wim de With wrote: > This fixes the following sparse warnings: > > drivers/staging/lustre/lustre/llite/file.c:1310:38: expected void const [noderef] *from > drivers/staging/lustre/lustre/llite/file.c:1310:38: got struct ll_recreate_obj * > drivers/staging/lustre/lustre/llite/file.c:1328:35: warning: incorrect type in argument 2 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:1328:35: expected void const [noderef] *from > drivers/staging/lustre/lustre/llite/file.c:1328:35: got struct lu_fid * > drivers/staging/lustre/lustre/llite/file.c:1475:35: warning: incorrect type in argument 2 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:1475:35: expected void const [noderef] *from > drivers/staging/lustre/lustre/llite/file.c:1475:35: got struct lov_user_md_v1 * > drivers/staging/lustre/lustre/llite/file.c:1500:35: warning: incorrect type in argument 2 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:1500:35: expected void const [noderef] *from > drivers/staging/lustre/lustre/llite/file.c:1500:35: got struct lov_user_md_v1 *lumv1p > drivers/staging/lustre/lustre/llite/file.c:1505:44: warning: incorrect type in argument 2 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:1505:44: expected void const [noderef] *from > drivers/staging/lustre/lustre/llite/file.c:1505:44: got struct lov_user_md_v3 *lumv3p > drivers/staging/lustre/lustre/llite/file.c:1516:17: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:1516:17: expected void const volatile [noderef] * > drivers/staging/lustre/lustre/llite/file.c:1516:17: got unsigned short * > drivers/staging/lustre/lustre/llite/file.c:1829:27: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:1829:27: expected void [noderef] *to > drivers/staging/lustre/lustre/llite/file.c:1829:27: got void * > drivers/staging/lustre/lustre/llite/file.c:2214:24: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2214:24: expected void const volatile [noderef] * > drivers/staging/lustre/lustre/llite/file.c:2214:24: got int * > drivers/staging/lustre/lustre/llite/file.c:2221:21: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2221:21: expected void const volatile [noderef] * > drivers/staging/lustre/lustre/llite/file.c:2221:21: got int * > drivers/staging/lustre/lustre/llite/file.c:2245:43: warning: incorrect type in argument 2 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2245:43: expected void const [noderef] *from > drivers/staging/lustre/lustre/llite/file.c:2245:43: got char * > drivers/staging/lustre/lustre/llite/file.c:2275:24: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2275:24: expected void const volatile [noderef] * > drivers/staging/lustre/lustre/llite/file.c:2275:24: got int * > drivers/staging/lustre/lustre/llite/file.c:2292:35: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2292:35: expected void [noderef] *to > drivers/staging/lustre/lustre/llite/file.c:2292:35: got void * > drivers/staging/lustre/lustre/llite/file.c:2299:44: warning: incorrect type in argument 2 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2299:44: expected void [noderef] *arg > drivers/staging/lustre/lustre/llite/file.c:2299:44: got void * > drivers/staging/lustre/lustre/llite/file.c:2304:43: warning: incorrect type in argument 2 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2304:43: expected void const [noderef] *from > drivers/staging/lustre/lustre/llite/file.c:2304:43: got char * > drivers/staging/lustre/lustre/llite/file.c:2310:46: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2310:46: expected void [noderef] *to > drivers/staging/lustre/lustre/llite/file.c:2310:46: got char * > drivers/staging/lustre/lustre/llite/file.c:2323:21: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2323:21: expected void const volatile [noderef] * > drivers/staging/lustre/lustre/llite/file.c:2323:21: got int * > drivers/staging/lustre/lustre/llite/file.c:2350:35: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2350:35: expected void [noderef] *to > drivers/staging/lustre/lustre/llite/file.c:2350:35: got void * > drivers/staging/lustre/lustre/llite/file.c:2361:36: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2361:36: expected void const [noderef] * > drivers/staging/lustre/lustre/llite/file.c:2361:36: got char * > drivers/staging/lustre/lustre/llite/file.c:2389:35: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2389:35: expected void [noderef] *to > drivers/staging/lustre/lustre/llite/file.c:2389:35: got char * > drivers/staging/lustre/lustre/llite/file.c:2483:36: warning: incorrect type in argument 1 (different address spaces) > drivers/staging/lustre/lustre/llite/file.c:2483:36: expected void const [noderef] * > drivers/staging/lustre/lustre/llite/file.c:2483:36: got void * > > It simply casts pointers to __user pointers in most cases, and changes a > few pointers to __user pointers. But that's not really fixing the issue here :( Doing this type of work is non-trivial for lustre, I wouldn't even recommend trying it out. It is going to require changes in how some of the structures are layed out, and probably some userspace tool changes as well. Sorry, I can't take this patch as-is. greg k-h