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:   Wed, 14 Oct 2020 16:55:10 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Srujana Challa <schalla@...vell.com>
Cc:     <herbert@...dor.apana.org.au>, <davem@...emloft.net>,
        <netdev@...r.kernel.org>, <linux-crypto@...r.kernel.org>,
        <sgoutham@...vell.com>, <gakula@...vell.com>,
        <sbhatta@...vell.com>, <schandran@...vell.com>,
        <pathreya@...vell.com>
Subject: Re: [PATCH v7,net-next,03/13] octeontx2-af: add debugfs entries for
 CPT block

On Mon, 12 Oct 2020 16:27:09 +0530 Srujana Challa wrote:
> +static ssize_t rvu_dbg_cpt_cmd_parser(struct file *filp,
> +				      const char __user *buffer, size_t count,
> +				      loff_t *ppos)
> +{
> +	struct seq_file *s = filp->private_data;
> +	struct rvu *rvu = s->private;
> +	char *cmd_buf;
> +	int ret = 0;
> +
> +	if ((*ppos != 0) || !count)
> +		return -EINVAL;
> +
> +	cmd_buf = kzalloc(count + 1, GFP_KERNEL);
> +	if (!cmd_buf)
> +		return -ENOSPC;
> +
> +	if (parse_cpt_cmd_buffer(cmd_buf, &count, buffer,
> +				 rvu->rvu_dbg.cpt_ctx.e_type) < 0)
> +		ret = -EINVAL;
> +
> +	kfree(cmd_buf);
> +
> +	if (ret)
> +		return -EINVAL;
> +
> +	return count;
> +}

No command parsers in debugfs, please. 

Expose read only files for objects you want to be able to dump.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ