lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 17 Jan 2015 15:28:27 -0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Tristan Lelong <tristan@...ong.xyz>
Cc:	oleg.drokin@...el.com, andreas.dilger@...el.com, askb23@...il.com,
	john.hammond@...el.com, gdonald@...il.com, anhlq2110@...il.com,
	fabio.falzoi84@...il.com, oort10@...il.com, agimenez@...valve.es,
	rupran@...server.de, surya.seetharaman9@...il.com,
	Julia.Lawall@...6.fr, joe@...ches.com, a.terekhov@...il.com,
	liang.zhen@...el.com, vthakkar1994@...il.com, amk@...y.com,
	srikrishanmalik@...il.com, rd@...ekdostal.com, bergwolf@...il.com,
	dan.carpenter@...cle.com, paul.gortmaker@...driver.com,
	tapaswenipathak@...il.com, email@...istophjaeger.info,
	uja.ornl@...il.com, brilliantov@...ox.ru, dmitry.eremin@...el.com,
	HPDD-discuss@...ts.01.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] staging: lustre: fix sparse warning on LPROC_SEQ_FOPS
 macros

On Sat, Dec 06, 2014 at 04:03:22PM -0800, Tristan Lelong wrote:
> This patch fix a sparse warning in lustre sources
> 
> warning: incorrect type in argument 1 (different address spaces)
>     expected void [noderef] <asn:1>*to
>     got char *<noident>
> 
> This is done by adding the missing __user attribute on userland pointers inside the LPROC_SEQ_FOPS like macros:
> - LPROC_SEQ_FOPS
> - LPROC_SEQ_FOPS_RW_TYPE
> - LPROC_SEQ_FOPS_WR_ONLY
> - LDLM_POOL_PROC_WRITER
> 
> The patch also updates all the functions that are used by this macro:
> - lprocfs_wr_*
> - *_seq_write
> 
> as well as some helpers used by the previously modified functions (otherwise fixing the sparse warning add some new ones):
> - lprocfs_write_frac_helper
> - lprocfs_write_helper
> - lprocfs_write_u64_helper
> 
> The patch also fixes one __user pointer direct dereference by strncmp in function fld_proc_hash_seq_write.
> 
> Signed-off-by: Tristan Lelong <tristan@...ong.xyz>
> ---
> Changes in v2:
>         Use dynamic allocation for 'name' variable instead of having it on the stack, per Greg K-H suggestion.
> 
> Changes in v3:
> 	Rename added variable from 'name' to 'fh_name'.
> 	Revert to a stack declaration of 'fh_name' since it is not 80 bytes but only 8, per Andreas Dilger comment.
> ---
>  drivers/staging/lustre/lustre/fld/lproc_fld.c      | 14 ++++--
>  .../staging/lustre/lustre/include/lprocfs_status.h | 44 +++++++++--------
>  drivers/staging/lustre/lustre/ldlm/ldlm_internal.h |  5 +-
>  drivers/staging/lustre/lustre/ldlm/ldlm_pool.c     |  4 +-
>  drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  7 +--
>  drivers/staging/lustre/lustre/lov/lproc_lov.c      | 20 +++++---
>  drivers/staging/lustre/lustre/mdc/lproc_mdc.c      |  7 +--
>  .../lustre/lustre/obdclass/linux/linux-module.c    |  5 +-
>  .../lustre/lustre/obdclass/lprocfs_status.c        |  2 +-
>  drivers/staging/lustre/lustre/osc/lproc_osc.c      | 57 +++++++++++++---------
>  .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c    | 25 +++++-----
>  11 files changed, 114 insertions(+), 76 deletions(-)

I took your v2 version, please send me the difference as this is a
mess...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ