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] [day] [month] [year] [list]
Message-Id: <874m8bpvmi.fsf@linux.vnet.ibm.com>
Date:	Wed, 29 Jun 2016 17:50:45 -0300
From:	Gabriel Krisman Bertazi <krisman@...ux.vnet.ibm.com>
To:	Frank Haverkamp <haver@...ux.vnet.ibm.com>
Cc:	gregkh@...uxfoundation.org, sebott@...ux.vnet.ibm.com,
	geliangtang@....com, linux-kernel@...r.kernel.org,
	bhelgaas@...gle.com, esa@...ux.vnet.ibm.com,
	breno.leitao@...il.com, schwidefsky@...ibm.com
Subject: Re: [PATCH] GenWQE: Change default access rights for device node

Frank Haverkamp <haver@...ux.vnet.ibm.com> writes:

> Since it should always be ok for normal users to operate the accelerator,
> it makes sense to change it in our driver, rather than adding udev rules
> for all Linux distributions.
>
> Signed-off-by: Frank Haverkamp <haver@...ux.vnet.ibm.com>

Reviewed-by: Gabriel Krisman Bertazi <krisman@...ux.vnet.ibm.com>

> ---
>  drivers/misc/genwqe/card_base.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/misc/genwqe/card_base.c b/drivers/misc/genwqe/card_base.c
> index 4cf8f82..768a057 100644
> --- a/drivers/misc/genwqe/card_base.c
> +++ b/drivers/misc/genwqe/card_base.c
> @@ -1355,6 +1355,19 @@ static struct pci_driver genwqe_driver = {
>  };
>
>  /**
> + * genwqe_devnode() - Set default access mode for genwqe devices.
> + *
> + * Default mode should be rw for everybody. Do not change default
> + * device name.
> + */
> +static char *genwqe_devnode(struct device *dev, umode_t *mode)
> +{
> +	if (mode)
> +		*mode = 0666;
> +	return NULL;
> +}
> +
> +/**
>   * genwqe_init_module() - Driver registration and initialization
>   */
>  static int __init genwqe_init_module(void)
> @@ -1367,6 +1380,8 @@ static int __init genwqe_init_module(void)
>  		return -ENOMEM;
>  	}
>
> +	class_genwqe->devnode = genwqe_devnode;
> +
>  	debugfs_genwqe = debugfs_create_dir(GENWQE_DEVNAME, NULL);
>  	if (!debugfs_genwqe) {
>  		rc = -ENOMEM;

-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ