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]
Message-Id: <05b9fddb-e6e5-102c-55af-e06cf3ca18f8@linux.vnet.ibm.com>
Date:   Wed, 5 Apr 2017 12:06:31 +0530
From:   Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
To:     Daniel Axtens <dja@...ens.net>, mpe@...erman.id.au
Cc:     linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        ego@...ux.vnet.ibm.com, bsingharora@...il.com,
        benh@...nel.crashing.org, paulus@...ba.org, anton@...ba.org,
        sukadev@...ux.vnet.ibm.com, mikey@...ling.org,
        stewart@...ux.vnet.ibm.com, eranian@...gle.com,
        Hemant Kumar <hemant@...ux.vnet.ibm.com>,
        Anju T Sudhakar <anju@...ux.vnet.ibm.com>
Subject: Re: [PATCH v6 02/11] powerpc/powernv: Autoload IMC device driver
 module



On Tuesday 04 April 2017 07:18 AM, Daniel Axtens wrote:
> Hi,
>
>> +		do {
>> +			pages = PAGE_SIZE * i;
>> +			pcni->vbase[i++] = (u64)phys_to_virt(pcni->pbase +
>> +							     pages);
>> +		} while (i < (pcni->size / PAGE_SIZE));
> I also just noticed that there's no check here against
> IMC_NEST_MAX_PAGES: should that be inserted? (If for no other reason
> than to stop every static analysis tool complaining!)
Yes make sense. Can add that in the next version.

Thanks for review
Maddy


> Daniel
>
>> +	}
>> +
>> +	return 0;
>> +err:
>> +	return -ENODEV;
>> +}
>> +
>> +static const struct of_device_id opal_imc_match[] = {
>> +	{ .compatible = IMC_DTB_COMPAT },
>> +	{},
>> +};
>> +
>> +static struct platform_driver opal_imc_driver = {
>> +	.driver = {
>> +		.name = "opal-imc-counters",
>> +		.of_match_table = opal_imc_match,
>> +	},
>> +	.probe = opal_imc_counters_probe,
>> +};
>> +
>> +MODULE_DEVICE_TABLE(of, opal_imc_match);
>> +module_platform_driver(opal_imc_driver);
>> +MODULE_DESCRIPTION("PowerNV OPAL IMC driver");
>> +MODULE_LICENSE("GPL");
>> diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
>> index e0f856bfbfe8..85ea1296f030 100644
>> --- a/arch/powerpc/platforms/powernv/opal.c
>> +++ b/arch/powerpc/platforms/powernv/opal.c
>> @@ -14,6 +14,7 @@
>>   #include <linux/printk.h>
>>   #include <linux/types.h>
>>   #include <linux/of.h>
>> +#include <linux/of_address.h>
>>   #include <linux/of_fdt.h>
>>   #include <linux/of_platform.h>
>>   #include <linux/interrupt.h>
>> @@ -30,6 +31,7 @@
>>   #include <asm/opal.h>
>>   #include <asm/firmware.h>
>>   #include <asm/mce.h>
>> +#include <asm/imc-pmu.h>
>>   
>>   #include "powernv.h"
>>   
>> @@ -631,6 +633,15 @@ static void opal_pdev_init(const char *compatible)
>>   		of_platform_device_create(np, NULL, NULL);
>>   }
>>   
>> +static void opal_imc_init_dev(void)
>> +{
>> +	struct device_node *np;
>> +
>> +	np = of_find_compatible_node(NULL, NULL, IMC_DTB_COMPAT);
>> +	if (np)
>> +		of_platform_device_create(np, NULL, NULL);
>> +}
>> +
>>   static int kopald(void *unused)
>>   {
>>   	unsigned long timeout = msecs_to_jiffies(opal_heartbeat) + 1;
>> @@ -704,6 +715,9 @@ static int __init opal_init(void)
>>   	/* Setup a heatbeat thread if requested by OPAL */
>>   	opal_init_heartbeat();
>>   
>> +	/* Detect IMC pmu counters support and create PMUs */
>> +	opal_imc_init_dev();
>> +
>>   	/* Create leds platform devices */
>>   	leds = of_find_node_by_path("/ibm,opal/leds");
>>   	if (leds) {
>> -- 
>> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ