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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171221025902.GA10170@ziepe.ca>
Date:   Wed, 20 Dec 2017 19:59:02 -0700
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Anton Vasilyev <vasilyev@...ras.ru>
Cc:     Selvin Xavier <selvin.xavier@...adcom.com>,
        Devesh Sharma <devesh.sharma@...adcom.com>,
        Doug Ledford <dledford@...hat.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Leon Romanovsky <leon@...nel.org>,
        Michael Mera <dev@...haelmera.com>, linux-rdma@...r.kernel.org,
        linux-kernel@...r.kernel.org, ldv-project@...uxtesting.org
Subject: Re: hw: Fix permissions for OCRDMA_RESET_STATS

On Tue, Aug 08, 2017 at 06:56:37PM +0300, Anton Vasilyev wrote:
> Debugfs file reset_stats is created with S_IRUSR permissions,
> but ocrdma_dbgfs_ops_read() doesn't support OCRDMA_RESET_STATS,
> whereas ocrdma_dbgfs_ops_write() supports only OCRDMA_RESET_STATS.
> 
> The patch fixes misstype with permissions.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Anton Vasilyev <vasilyev@...ras.ru>
> Acked-by: Selvin Xavier <selvin.xavier@...adcom.com>
>  drivers/infiniband/hw/ocrdma/ocrdma_stats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_stats.c b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
> index 66056f9..d42c617 100644
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_stats.c
> @@ -834,7 +834,7 @@ void ocrdma_add_port_stats(struct ocrdma_dev *dev)
>  
>  	dev->reset_stats.type = OCRDMA_RESET_STATS;
>  	dev->reset_stats.dev = dev;
> -	if (!debugfs_create_file("reset_stats", S_IRUSR, dev->dir,
> +	if (!debugfs_create_file("reset_stats", S_IWUSR, dev->dir,
>  				&dev->reset_stats, &ocrdma_dbg_ops))
>  		goto err;
>  

I changed the S_IWUSR to 0200 to make checkpatch happy, slowly we are
trying to move to the standard style throughout, but applied to
for-next now.

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ