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:	Tue, 26 Jul 2011 10:41:22 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	Per Forlin <per.forlin@...aro.org>
Cc:	linaro-dev@...ts.linaro.org,
	Nicolas Pitre <nicolas.pitre@...aro.org>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-mmc@...r.kernel.org, linux-doc@...r.kernel.org,
	Venkatraman S <svenkatr@...com>,
	Linus Walleij <linus.walleij@...aro.org>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Arnd Bergmann <arnd@...db.de>,
	Sourav Poddar <sourav.poddar@...com>,
	Chris Ball <cjb@...top.org>,
	J Freyensee <james_p_freyensee@...ux.intel.com>,
	Randy Dunlap <rdunlap@...otime.net>
Subject: Re: [PATCH v3 2/3] mmc: core: add random fault injection

2011/7/26 Per Forlin <per.forlin@...aro.org>:
>>> And I know that init_fault_attr_dentries() can only create a
>>> subdirectory in debugfs root directory.  But I have a patch which
>>> support for creating it in arbitrary directory.  Could you take a look
>>> at this? (Note that this patch is based on mmotm and not yet tested)
>>>
> I looked at your patch and it raised two questions.
> I can't use FAULT_ATTR_INITIALIZER since mmc_host is allocated on the
> heap. It looks like setup_fault_attr(attr, str) will fail if str is
> NULL. How can I initialise the fault_attrs if not stack allocated?
> About the boot param initialisation of fault attr. There can only be
> one fault_mmc_request boot param for the entire kernel but there is
> one fault_attr per host, and there may be many hosts. It would be
> convenient if setup_fault_attrs would take (attr, boot_param_name),
> look up boot_param_name and use that otherwise set default values.

I think you can define one default fail_attr for boot time configuration
and copy it to per-host fail_attr in mmc_add_host_debugfs().

/* pseudo-code */

static DECLARE_FAULT_ATTR(default_mmc_fail_attr);

static int __init setup_fail_mmc_request(char *str)
{
	return setup_fault_attr(&default_mmc_fail_attr, str);
}
__setup("fail_mmc_request=", setup_fail_mmc_request);

...

void mmc_add_host_debugfs(struct mmc_host *host)
{
	...

#ifdef CONFIG_FAIL_MMC_REQUEST
	host->fail_attr = default_mmc_fail_attr;
	if (!debugfs_create_fault_attr("fail_mmc_request",
					root, &host->fail_attr))
		goto err_node;
#endif
	...
}
--
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