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] [day] [month] [year] [list]
Message-ID: <575012CF.9090306@huawei.com>
Date:	Thu, 2 Jun 2016 19:04:47 +0800
From:	Yisen Zhuang <Yisen.zhuang@...wei.com>
To:	David Miller <davem@...emloft.net>
CC:	<rjw@...ysocki.net>, <lenb@...nel.org>, <fengguang.wu@...el.com>,
	<andriy.shevchenko@...ux.intel.com>, <andrew@...n.ch>,
	<ivecera@...hat.com>, <f.fainelli@...il.com>,
	<haifeng.wei@...wei.com>, <charles.chenxin@...wei.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-acpi@...r.kernel.org>, <linuxarm@...wei.com>
Subject: Re: [PATCH v3 net-next 03/13] net: hisilicon: cleanup to prepare for
 other cases

Hi David,

Thanks for your comment, i will use dev name of this mdio bus instead of address.

Thanks,

Yisen

在 2016/6/2 7:07, David Miller 写道:
> From: Yisen Zhuang <Yisen.Zhuang@...wei.com>
> Date: Mon, 30 May 2016 20:34:14 +0800
> 
>> -static void hns_mdio_bus_name(char *name, struct device_node *np)
>> +static void hns_mdio_bus_name(char *name, phys_addr_t addr)
>>  {
>> -	const u32 *addr;
>> -	u64 taddr = OF_BAD_ADDR;
>> -
>> -	addr = of_get_address(np, 0, NULL, NULL);
>> -	if (addr)
>> -		taddr = of_translate_address(np, addr);
>> -
>> -	snprintf(name, MII_BUS_ID_SIZE, "%s@...x", np->name,
>> -		 (unsigned long long)taddr);
>> +	snprintf(name, MII_BUS_ID_SIZE,
>> +		 "hns-mdio@...x", (unsigned long long)addr);
> 
> This is a really bad idea.
> 
> You're passing in the resource address in here, which can be a bus
> address.
> 
> And on a machine with multiple bus domains, the same address can be
> used multiple times.  They are not unique at all in a multi-domain
> system.
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ