[PATCH v5] Add kernel parameter to blacklist modules

2016-07-19 Thread Prarit Bhargava
ctionality of permanently blacklisting a module by its name via the kernel parameter module_blacklist=module_name. [v2]: Rusty, use core_param() instead of __setup() which simplifies things. [v3]: Rusty, undo wreckage from strsep() [v4]: Rusty, simpler version of blacklisted() Signed-off-by: Prarit

[PATCH v3] Add kernel parameter to blacklist modules

2016-06-23 Thread Prarit Bhargava
simplifies things. [v3]: Rusty, undo wreckage from strsep() Signed-off-by: Prarit Bhargava Cc: Jonathan Corbet Cc: Rusty Russell Cc: linux-...@vger.kernel.org --- Documentation/kernel-parameters.txt |3 +++ kernel/module.c | 29 + 2 files c

[PATCH v3] Add kernel parameter to blacklist modules

2016-07-06 Thread Prarit Bhargava
r module_blacklist=module_name. [v2]: Rusty, use core_param() instead of __setup() which simplifies things. [v3]: Rusty, undo wreckage from strsep() Signed-off-by: Prarit Bhargava Cc: Jonathan Corbet Cc: Rusty Russell Cc: linux-...@vger.kernel.org --- Documentation/kernel-parameters.txt |3 ++

[PATCH] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-06 Thread Prarit Bhargava
ermal zone from being created if the ucode hasn't been loaded. Signed-off-by: Prarit Bhargava Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc: Chaya Rachel Ivgi Cc: Sara Sharon Cc: linux-wirel...@vger.kernel.org Cc: net...@

Re: [PATCH] init, fix initcall blacklist for modules

2016-06-14 Thread Prarit Bhargava
On 06/13/2016 04:59 PM, Rasmus Villemoes wrote: > On Mon, Jun 13 2016, Prarit Bhargava wrote: > >> Sorry ... forgot to cc everyone on the last email. >> >> P. >> >> 8< >> >> sprint_symbol_no_offset() returns the string "function_n

[PATCH v2] Add kernel parameter to blacklist modules

2016-06-14 Thread Prarit Bhargava
ruct which simplifies things. Signed-off-by: Prarit Bhargava Cc: Jonathan Corbet Cc: Rusty Russell Cc: linux-...@vger.kernel.org --- Documentation/kernel-parameters.txt |3 +++ kernel/module.c | 25 + 2 files changed, 28 insertions(+) di

Re: [PATCH] Add kernel parameter to blacklist modules

2016-06-14 Thread Prarit Bhargava
On 06/14/2016 01:17 PM, Christoph Hellwig wrote: > On Mon, Jun 13, 2016 at 08:32:41AM -0400, Prarit Bhargava wrote: >> Blacklisting a module in linux has long been a problem. The process of >> blacklisting a module has changed over time, and it seems that every OS >

Re: [PATCH] Add kernel parameter to blacklist modules

2016-06-14 Thread Prarit Bhargava
On 06/14/2016 04:51 PM, Henrique de Moraes Holschuh wrote: > > And if such a module blacklist feature ends up being invoked by the > "nuke_module_from_orbit=" parameter, I will pay the author > (and the subsystem maintainer that manages to get that merged) a couple > beers should we ever meet i

Re: [PATCH v2] Add kernel parameter to blacklist modules

2016-06-15 Thread Prarit Bhargava
On 06/14/2016 05:20 PM, Rusty Russell wrote: > Prarit Bhargava writes: >> Blacklisting a module in linux has long been a problem. The current >> procedure is to use rd.blacklist=module_name, however, that doesn't >> cover the case after the initramfs and before a bo

[PATCH] init, allow blacklisting of module_init functions

2016-06-15 Thread Prarit Bhargava
ule function names with the extended string. This patch adds the functionality to block a module's module_init() function by finding the space in the string and truncating the comparison to that length. Signed-off-by: Prarit Bhargava Cc: Andrew Morton Cc: Thomas Gleixner Cc: Yang Shi

Re: [PATCH] init, allow blacklisting of module_init functions

2016-06-16 Thread Prarit Bhargava
On 06/15/2016 04:25 PM, Rasmus Villemoes wrote: > On Wed, Jun 15 2016, Prarit Bhargava wrote: > >> At some point I was 100% sure this worked. I do remember testing it against >> just a loadable module and had positive testing results. > > I think the current %ps/%pf

Re: [PATCH RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-13 Thread Prarit Bhargava
On 07/13/2016 02:50 AM, Kalle Valo wrote: > Prarit Bhargava writes: > >>> We implement thermal zone because we do support it, but the problem is >>> that we need the firmware to be loaded for that. So you can argue that >>> we should register *later* when th

Re: [PATCH RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-13 Thread Prarit Bhargava
On 07/13/2016 03:24 AM, Luca Coelho wrote: > On Wed, 2016-07-13 at 09:50 +0300, Kalle Valo wrote: >> Prarit Bhargava writes: >> >>>> We implement thermal zone because we do support it, but the >>>> problem is >>>> that we need the firmwar

Re: [PATCH] ACPI: Execute the _PTS method when system reboot

2016-05-31 Thread Prarit Bhargava
On 05/29/2016 11:28 PM, Ocean HY1 He wrote: >> -Original Message- >> From: Prarit Bhargava [mailto:pra...@redhat.com] >> Sent: Tuesday, May 24, 2016 6:16 PM >> To: Ocean HY1 He; j...@redhat.com >> Cc: linux-a...@vger.kernel.org; linux-kernel@vger.kernel.o

[PATCH] arch/x86: Remove second call to topology_update_package_map()

2016-10-12 Thread Prarit Bhargava
operly. This patch drops the later call in smp_init_package_map() and moves smp_init_package_map() out of smp_store_boot_cpu_info(). Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Peter Zijlstra Cc: Len Brown Cc: Boris

Re: [PATCH] arch/x86: Remove second call to topology_update_package_map()

2016-10-12 Thread Prarit Bhargava
On 10/12/2016 10:36 AM, Prarit Bhargava wrote: > This was noticed during the investigation of > > http://git.kernel.org/tip/2a51fe083eba7f99cbda72f5ef90cdf2f4df882c > > A note for reviewers on the cleanup in smp_init_package_map(): The > per_cpu variable x86_bios_cpu_apicid

Re: [PATCH] arch/x86: Remove second call to topology_update_package_map()

2016-10-12 Thread Prarit Bhargava
On 10/12/2016 03:51 PM, Tim Chen wrote: > On Wed, 2016-10-12 at 11:06 -0400, Prarit Bhargava wrote: >> >> On 10/12/2016 10:36 AM, Prarit Bhargava wrote: >>> >>> This was noticed during the investigation of >>> >>> http://git.kernel.org/tip/2a51

Re: [PATCH] arch/x86: Remove second call to topology_update_package_map()

2016-10-12 Thread Prarit Bhargava
On 10/12/2016 06:06 PM, Tim Chen wrote: > On Wed, 2016-10-12 at 16:54 -0400, Prarit Bhargava wrote: >> >> On 10/12/2016 03:51 PM, Tim Chen wrote: >>> >>> On Wed, 2016-10-12 at 11:06 -0400, Prarit Bhargava wrote: >>>> >>>> >>>>

Re: [PATCH] arch/x86: Fix kdump on x86 with physically hotadded CPUs

2016-10-06 Thread Prarit Bhargava
On 10/05/2016 12:14 PM, Jiri Olsa wrote: > On Tue, Oct 04, 2016 at 04:38:16PM +0200, Thomas Gleixner wrote: >> On Tue, 4 Oct 2016, Prarit Bhargava wrote: >>> On 10/04/2016 06:58 AM, Thomas Gleixner wrote: >>>> While it is the right thing to initialize the package m

Re: [PATCH] arch/x86: Don't try to poke disabled/non-existent APIC

2016-10-25 Thread Prarit Bhargava
my > P3 machine boots again. > > Cc: sta...@vger.kernel.org > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: x...@kernel.org > Cc: Prarit Bhargava > Cc: Peter Zijlstra > Cc: Len Brown > Cc: Borislav Petkov > Cc: Andi Kleen > Cc: Jiri Olsa &

[PATCH] perf/x86/intel/uncore: Initialize with correct logical package ID

2017-01-03 Thread Prarit Bhargava
t the logical package value will be incorrect. The code should not use 0 as the physical ID, and should use the boot cpu's physical package ID in this calculation. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org C

Re: [PATCH] kernel/watchdog.c: Do not hardcode CPU 0 as the initial thread

2017-01-03 Thread Prarit Bhargava
On 12/01/2016 03:06 PM, Don Zickus wrote: > On Tue, Nov 29, 2016 at 08:15:21AM -0500, Prarit Bhargava wrote: >> When CONFIG_BOOTPARAM_HOTPLUG_CPU0 is enabled, the socket containing the >> boot cpu can be replaced. During the hot add event, the message >> >> NMI wa

Re: [PATCH] perf/x86/intel/uncore: Initialize with correct logical package ID

2017-01-03 Thread Prarit Bhargava
On 01/03/2017 02:24 PM, Prarit Bhargava wrote: > On multi-socket Intel v3 processor systems (aka Haswell) kdump can fail with: > > BUG: unable to handle kernel paging request at 006563a1 > IP: [] hswep_uncore_cpu_init+0x52/0xa0 > PGD 0 [2.313897] > Oops:

Re: Odd build breakage in 4.9-rc7

2016-12-01 Thread Prarit Bhargava
On 11/30/2016 05:41 PM, Nicolas Pitre wrote: > On Wed, 30 Nov 2016, Linus Torvalds wrote: > >> On Wed, Nov 30, 2016 at 10:50 AM, Prarit Bhargava wrote: >>> >>> It comes back. The steps to reproduce this are: >>> >>> 1. checkout latest linux.gi

Re: Odd build breakage in 4.9-rc7

2016-12-01 Thread Prarit Bhargava
On 11/30/2016 05:41 PM, Nicolas Pitre wrote: > On Wed, 30 Nov 2016, Linus Torvalds wrote: > >> On Wed, Nov 30, 2016 at 10:50 AM, Prarit Bhargava wrote: >>> >>> It comes back. The steps to reproduce this are: >>> >>> 1. checkout latest linux.gi

[PATCH] kernel/watchdog.c: Do not hardcode CPU 0 as the initial thread

2016-11-29 Thread Prarit Bhargava
be used to set and clear the value of firstcpu_err. firstcpu_err is set when the first watchdog thread is enabled, and cleared when the last watchdog thread is disabled. This patch is based on top of linux-next akpm-base. Signed-off-by: Prarit Bhargava Cc: Borislav Petkov Cc: Tejun Heo Cc

[PATCH] ACPI / APEI: Fix NMI notification handling

2016-11-29 Thread Prarit Bhargava
p in the NMI handler") by properly returning NMI_HANDLED and only calling the work queue if NMI_HANDLED has been set. Fixes: 2383844d4850 ("GHES: Elliminate double-loop in the NMI handler") Signed-off-by: Prarit Bhargava Cc: Borislav Petkov Cc: Rafael J. Wysocki Cc: Len Brown Cc: Pau

[PATCH v2] ACPI / APEI: Fix NMI notification handling

2016-11-30 Thread Prarit Bhargava
I_HANDLED and only calling the work queue if NMI_HANDLED has been set. v2: Borislav, setting of NMI_HANDLED moved & cleaned up changelog. Fixes: 2383844d4850 ("GHES: Elliminate double-loop in the NMI handler") Signed-off-by: Prarit Bhargava Cc: Borislav Petkov Cc: Rafael J. Wysocki

Re: Odd build breakage in 4.9-rc7

2016-11-30 Thread Prarit Bhargava
On 11/30/2016 01:18 PM, Linus Torvalds wrote: > On Wed, Nov 30, 2016 at 9:24 AM, Jarod Wilson wrote: >> >> Now, if I omit the -j8 and do a single-threaded build, then things work >> fine. Prarit bisected this failure to commit >> 9a6fb28a355d2609ace4dab4e6425442c647894d, and indeed, when reverti

Re: Odd build breakage in 4.9-rc7

2016-11-30 Thread Prarit Bhargava
On 11/30/2016 01:36 PM, Linus Torvalds wrote: > On Wed, Nov 30, 2016 at 10:28 AM, Prarit Bhargava wrote: > ]> >> In my case I tracked this to commit 3637efb00864 ("x86/mce: Add PCI quirks to >> identify Xeons with machine check recovery") which adds the inclu

[PATCH] kernel/watchdog.c: Only output hw-PMU message once

2016-11-21 Thread Prarit Bhargava
and the message has caused confusion for users of systems that support socket removal. This patch modifies the message so that it only outputs a single time during runtime. Signed-off-by: Prarit Bhargava Cc: Borislav Petkov Cc: Tejun Heo Cc: Don Zickus Cc: Hidehiro Kawai Cc: Thomas Gleixner

Re: [PATCH] kernel/watchdog.c: Only output hw-PMU message once

2016-11-21 Thread Prarit Bhargava
On 11/21/2016 12:48 PM, Don Zickus wrote: > On Mon, Nov 21, 2016 at 11:35:19AM -0500, Prarit Bhargava wrote: >> When CONFIG_BOOTPARAM_HOTPLUG_CPU0 is enabled, the socket containing the >> boot cpu can be replaced. During the hot add event, the message >> >> NMI wa

[PATCH 0/2] hwrng: revert managed API changes for amd and geode

2017-03-14 Thread Prarit Bhargava
grate to managed API"), and 6e9b5e76882c ("hwrng: geode - Migrate to managed API"). Signed-off-by: Prarit Bhargava Fixes: 31b2a73c9c5f ("hwrng: amd - Migrate to managed API"). Fixes: 6e9b5e76882c ("hwrng: geode - Migrate to managed API") Cc: Matt Mackall

[PATCH 1/2] hwrng: amd - Revert managed API changes

2017-03-14 Thread Prarit Bhargava
and region after the first load of the driver. Revert the changes made by 31b2a73c9c5f ("hwrng: amd - Migrate to managed API"). Signed-off-by: Prarit Bhargava Fixes: 31b2a73c9c5f ("hwrng: amd - Migrate to managed API"). Cc: Matt Mackall Cc: Herbert Xu Cc: Corentin LABBE Cc

[PATCH 2/2] hwrng: geode - Revert managed API changes

2017-03-14 Thread Prarit Bhargava
ter the first load of the driver. Revert the changes made by e9afc746299d ("hwrng: geode - Use linux/io.h instead of asm/io.h"). Signed-off-by: Prarit Bhargava Fixes: 6e9b5e76882c ("hwrng: geode - Migrate to managed API") Cc: Matt Mackall Cc: Herbert Xu Cc: Corentin LABBE C

[PATCH v2] init, allow blacklisting of module_init functions

2016-06-16 Thread Prarit Bhargava
to block a module's module_init() function by finding the space in the string and truncating the comparison to that length. [v2]: li...@rasmusvillemoes.dk, switch to strreplace() Signed-off-by: Prarit Bhargava Cc: Andrew Morton Cc: Thomas Gleixner Cc: Yang Shi Cc: Prarit Bhargava Cc:

Re: [tip:x86/urgent] perf/x86/intel/uncore: Do not use hard coded physical package id 0

2017-01-11 Thread Prarit Bhargava
On 01/11/2017 05:33 AM, tip-bot for Prarit Bhargava wrote: > Commit-ID: 42433049c51e326baa1f45c834af9572fdb65b35 > Gitweb: http://git.kernel.org/tip/42433049c51e326baa1f45c834af9572fdb65b35 > Author: Prarit Bhargava > AuthorDate: Tue, 3 Jan 2017 14:24:31 -0500 > Com

[PATCH] x86/mm: minor warning message cleanup

2016-08-09 Thread Prarit Bhargava
Capitalize R in RIP. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Andrew Morton Cc: Ard Biesheuvel Cc: Tony Luck --- arch/x86/mm/extable.c |2 +- 1 file changed, 1

Re: [RESEND PATCH v4] x86/hpet: Reduce HPET counter read contention

2016-08-10 Thread Prarit Bhargava
On 08/10/2016 02:37 PM, Long, Wai Man wrote: > Hi, > > I would like to restart the discussion about the merit of this patch. > > This patch was created in response to a problem we have on the 16-socket > Broadwell-EX systems (up to 768 logical CPUs) that were under development. > About 10% of

Re: [PATCH][v8] PM / hibernate: Verify the consistent of e820 memory map by md5 value

2016-08-29 Thread Prarit Bhargava
[My apologies for breaking threading. I'm not sub'd to LKML ...] On Mon 2016-08-29 00:35:40, Chen Yu wrote: >+ if (memcmp(result, buf, MD5_DIGEST_SIZE)) { >+ pr_err("PM: e820 map conflict detected.\n"); >+ panic("BIOS is playing funny tricks with us.\n"); >+ }

[PATCH RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-11 Thread Prarit Bhargava
of the time. This patch moves the firmware check to iwl_mvm_thermal_zone_register() and stops the thermal zone from being created if the ucode hasn't been loaded. Signed-off-by: Prarit Bhargava Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Intel Linux Wireless Cc: Kalle Valo Cc

Re: [PATCH RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-11 Thread Prarit Bhargava
On 07/11/2016 12:07 PM, Coelho, Luciano wrote: > On Mon, 2016-07-11 at 11:18 -0400, Prarit Bhargava wrote: >> Didn't get any feedback or review comments on this patch. Resending >> ... >> >> P. > > Sorry, this got flooded down my inbox. NP, Luciano -- My

Re: [PATCH RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-11 Thread Prarit Bhargava
On 07/11/2016 02:00 PM, Emmanuel Grumbach wrote: > On Mon, Jul 11, 2016 at 6:18 PM, Prarit Bhargava wrote: >> >> Didn't get any feedback or review comments on this patch. Resending ... >> >> P. > > This change is obviously completely broken. It simply

Re: [PATCH RESEND] iwlwifi, Do not implement thermal zone unless ucode is loaded

2016-07-11 Thread Prarit Bhargava
On 07/11/2016 02:27 PM, Grumbach, Emmanuel wrote: > On Mon, 2016-07-11 at 14:19 -0400, Prarit Bhargava wrote: >> >> On 07/11/2016 02:00 PM, Emmanuel Grumbach wrote: >>> On Mon, Jul 11, 2016 at 6:18 PM, Prarit Bhargava >>> wrote: >>>> >>>>

[PATCH] init, fix initcall blacklist for modules

2016-06-13 Thread Prarit Bhargava
comparing to the length of the function_name. Signed-off-by: Prarit Bhargava --- init/main.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/init/main.c b/init/main.c index 4c17fda5c2ff..09a795e91efe 100644 --- a/init/main.c +++ b/init/main.c @@ -708,

[PATCH] init, fix initcall blacklist for modules

2016-06-13 Thread Prarit Bhargava
hen comparing module_init() function names. This patch resolves the issue by comparing to the length of the function_name. Signed-off-by: Prarit Bhargava Cc: Andrew Morton Cc: Thomas Gleixner Cc: Yang Shi Cc: Ingo Molnar Cc: Mel Gorman Cc: Rasmus Villemoes Cc: Kees Cook Cc: Yaowei Bai Cc: An

[PATCH] Add kernel parameter to blacklist modules

2016-06-13 Thread Prarit Bhargava
le dummy_module [ 85.127433] module dummy_module has been blacklisted. This module will not load. Signed-off-by: Prarit Bhargava Cc: Jonathan Corbet Cc: Rusty Russell Cc: linux-...@vger.kernel.org --- Documentation/kernel-parameters.txt |3 +++ kernel/module.c

Re: [PATCH 0/2 v6] printk, Add monotonic and real printk timestamps

2016-03-08 Thread Prarit Bhargava
On 03/08/2016 02:59 AM, Thomas Gleixner wrote: > On Tue, 23 Feb 2016, Prarit Bhargava wrote: > >> This patchset adds monotonic and real printk timestamps. The first patch >> changes CONFIG_PRINT_TIME from a bool to an int to allow for the additional >> timestamps t

Re: [PATCH 0/3] idle, Honor Hardware Disabled States

2016-03-28 Thread Prarit Bhargava
On 03/24/2016 05:54 PM, Len Brown wrote: > On Wed, Mar 23, 2016 at 7:50 PM, Prarit Bhargava wrote: >> >> >> On 03/23/2016 04:05 PM, Len Brown wrote: >>> This patch assumes that if a package state is disabled, >>> the corresponding core state must be

[PATCH] x86, msr, remove unused native_read_tscp()

2016-03-22 Thread Prarit Bhargava
_read_tscp(unsigned int *aux) Cc: x...@kernel.org Cc: Borislav Petkov Cc: Andy Lutomirski Signed-off-by: Prarit Bhargava --- arch/x86/include/asm/msr.h |8 1 file changed, 8 deletions(-) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 93fb7c1..7a79ee2 10

Re: [PATCH 0/3] idle, Honor Hardware Disabled States

2016-03-23 Thread Prarit Bhargava
e: > > https://bugzilla.kernel.org/show_bug.cgi?id=109081 Len, should I rebase on top of this? Would that work for you? P. > > and will be upstream shortly. > > thanks, > -Len > > > > On Mon, Mar 21, 2016 at 8:49 AM, Prarit Bhargava wrote: >> So

Re: [PATCH resend] init/main.c: Simplify initcall_blacklisted()

2016-03-24 Thread Prarit Bhargava
e symbol name even once in the common case. > > Signed-off-by: Rasmus Villemoes Acked-by: Prarit Bhargava P. > --- > init/main.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/init/main.c b/init/main.c > index b3c6e363ae18..d76d9

[PATCH 3/3 v3] powercap, intel_rapl, Add ignore_max_time_window_check module parameter for broken BIOSes

2016-03-19 Thread Prarit Bhargava
patch adds a ignore_max_time_window_check module parameter to avoid the maximum time window check in set_time_window(). [v2]: change name to max_time_window_check, fix (val == 0) check [v3]: fix typo in debug message Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jov

[RESEND PATCH 0/3 v4] powercap, intel_rapl, implement time window checks

2016-03-21 Thread Prarit Bhargava
hecks on broken BIOSes. Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jovanovic Cc: Seiichi Ikarashi Cc: Mathias Krause Cc: Ajay Thomas Signed-off-by: Prarit Bhargava Prarit Bhargava (3): powercap, intel_rapl, implement get_max_time_window powercap, intel_rapl, implement

[PATCH 1/3 v4] powercap, intel_rapl, implement get_max_time_window

2016-03-21 Thread Prarit Bhargava
straint_0_time_window_us:1:976 Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jovanovic Cc: Seiichi Ikarashi Cc: Mathias Krause Cc: Ajay Thomas Signed-off-by: Prarit Bhargava --- drivers/powercap/intel_rapl.c | 31 +++ drivers/powercap/p

[PATCH 3/3 v3] powercap, intel_rapl, Add ignore_max_time_window_check module parameter for broken BIOSes

2016-03-21 Thread Prarit Bhargava
patch adds a ignore_max_time_window_check module parameter to avoid the maximum time window check in set_time_window(). [v2]: change name to max_time_window_check, fix (val == 0) check [v3]: fix typo in debug message Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jov

[PATCH 2/3 v4] powercap, intel_rapl, implement check for minimum time window

2016-03-21 Thread Prarit Bhargava
rep ^ /sys/devices/virtual/powercap/intel-rapl/intel-rapl\:0/constraint_0_time_window_us -bash: echo: write error: Invalid argument /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_time_window_us:1:976 Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje J

[PATCH 2/3] intel_idle, Introduce cstate limits and fix hardware cstate disable value

2016-03-21 Thread Prarit Bhargava
-software-developer-manuals.html Cc: x...@kernel.org Cc: Len Brown Cc: "Peter Zijlstra (Intel)" Cc: Borislav Petkov Cc: Andi Kleen Cc: Alexander Shishkin Cc: Dasaratharaman Chandramouli Cc: linux...@vger.kernel.org Signed-off-by: Prarit Bhargava --- drivers/idle/intel_idl

[PATCH 1/3] idle, rename MSR_NHM_SNB_PKG_CST_CFG_CTL to MSR_PKG_CST_CONFIG_CONTROL

2016-03-21 Thread Prarit Bhargava
Peter Zijlstra (Intel)" Cc: Borislav Petkov Cc: Andi Kleen Cc: Alexander Shishkin Cc: Dasaratharaman Chandramouli Cc: linux...@vger.kernel.org Signed-off-by: Prarit Bhargava --- arch/x86/include/asm/msr-index.h |2 +- drivers/idle/intel_idle.c |4 ++-- tools

[PATCH 3/3] cpuidle, Prevent users from enabling cstates that are disabled in Hardware

2016-03-21 Thread Prarit Bhargava
The current codebase allows a user to enable a cstate even though the hardware has disabled it. This patch adds state checking and prevents userspace from setting a hardware disabled cstate to enabled. Signed-off-by: Prarit Bhargava --- drivers/cpuidle/governors/ladder.c |3 +++ drivers

[PATCH 0/3] idle, Honor Hardware Disabled States

2016-03-21 Thread Prarit Bhargava
ratharaman Chandramouli Cc: linux...@vger.kernel.org Signed-off-by: Prarit Bhargava Prarit Bhargava (3): idle, rename MSR_NHM_SNB_PKG_CST_CFG_CTL to MSR_PKG_CST_CONFIG_CONTROL intel_idle, Introduce cstate limits and fix hardware cstate disable value cpuidle, Prevent users fro

[PATCH] x86, msr: Allow read access to /dev/cpu/X/msr

2015-06-26 Thread Prarit Bhargava
: x...@kernel.org Cc: Len Brown Cc: Prarit Bhargava Cc: Dasaratharaman Chandramouli Signed-off-by: Prarit Bhargava --- arch/x86/kernel/msr.c | 11 --- tools/power/x86/turbostat/turbostat.8 |8 tools/power/x86/turbostat/turbostat.c | 17 -

Re: [PATCH] x86, msr: Allow read access to /dev/cpu/X/msr

2015-06-26 Thread Prarit Bhargava
On 06/26/2015 03:23 PM, Brian Gerst wrote: > On Fri, Jun 26, 2015 at 1:52 PM, Prarit Bhargava wrote: >> Customers write system monitoring software for single systems as well as >> clusters. In load-balancing software it is useful to know how "busy" a >> core is.

Re: [PATCH] x86, msr: Allow read access to /dev/cpu/X/msr

2015-06-28 Thread Prarit Bhargava
On 06/27/2015 11:52 AM, Andy Lutomirski wrote: > On Sat, Jun 27, 2015 at 1:39 AM, Ingo Molnar wrote: >> >> * Ingo Molnar wrote: >> >>> So what's wrong with exposing them as a simplified PMU driver? >>> >>> That way we only expose the ones we want to - plus tooling can use all the >>> rich >>>

Re: [PATCH] x86, bitops, variable_test_bit should return 1 not -1 on a match

2015-08-21 Thread Prarit Bhargava
On 08/21/2015 02:51 AM, Ingo Molnar wrote: > > * Prarit Bhargava wrote: > >> This issue was noticed while debugging a CPU hotplug issue. On x86 >> with (NR_CPUS > 1) the cpu_online() define is cpumask_test_cpu(). >> cpumask_test_cpu() should return 1 if the

Re: [PATCH] x86, bitops, variable_test_bit should return 1 not -1 on a match

2015-08-21 Thread Prarit Bhargava
On 08/21/2015 04:08 AM, H. Peter Anvin wrote: > Wrong fix, though. Instead we should change it to use the set instruction, > which would also make it easier to use the CC_SET/CC_OUT proposed macros to > use assembly out in the future. > > The downside with set is that it only sets a single by

[PATCH v2] x86, bitops, variable_test_bit should return 1 not -1 on a match

2015-08-24 Thread Prarit Bhargava
etc, (Set if Carry, "Sets the byte in the operand to 1 if the Carry Flag is set, otherwise sets the operand to 0.") instead of !! Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Prarit Bhargava ---

[PATCH] tools, Add CFLAGS_SECURITY for RELRO and PIE

2015-07-15 Thread Prarit Bhargava
= dso ]] && grep -m1 -F -q '(DEBUG)' dynamic_section && PIE=yes printf "RELRO=%s\nPIE=%s\n\n" $RELRO $PIE done; unset f and also used 'LD_DEBUG=statistics ' to check to see if there were any serious performance issues. Signed-off-by: Prarit Bha

Re: [PATCH v2] powercap, intel_rapl.c, fix BIOS lock check

2015-12-10 Thread Prarit Bhargava
On 12/09/2015 07:52 PM, Rafael J. Wysocki wrote: > On Wednesday, December 09, 2015 03:31:23 PM Jacob Pan wrote: >> On Thu, 10 Dec 2015 00:38:27 +0100 >> "Rafael J. Wysocki" wrote: >> >>> OK, I've put it into my bleeding-edge branch as 4.5 candidate, but do >>> we want it in "stable" and therefor

[PATCH] printk, allow different timestamps for printk.time [v2]

2016-01-28 Thread Prarit Bhargava
c: John Stultz Cc: Xunlei Pang Cc: Thomas Gleixner Cc: Baolin Wang Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Petr Mladek Cc: Tejun Heo Cc: Peter Hurley Cc: Vasily Averin Cc: Joe Perches Signed-off-by: Prarit Bhargava --- Documentation/kernel-parameters.txt |6 ++- include/lin

Re: [PATCH] printk, allow different timestamps for printk.time [v2]

2016-01-28 Thread Prarit Bhargava
On 01/28/2016 07:52 AM, Vasily Averin wrote: > Dear Prarit, > Hi Vasily, Thanks for your suggestions. > I have no objections about your patch, > bit in fact I doubt we really need to convert each timestamp in kernel logs. > How do you think is it probably better to convert only one timestamp

[PATCH 2/3] powercap, intel_rapl, implement check for minimum time window

2015-12-21 Thread Prarit Bhargava
rep ^ /sys/devices/virtual/powercap/intel-rapl/intel-rapl\:0/constraint_0_time_window_us -bash: echo: write error: Invalid argument /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_time_window_us:1:976 Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje J

[PATCH 0/3 v2] powercap, intel_rapl, implement time window checks

2015-12-21 Thread Prarit Bhargava
ments barrier checking for the time windows, and adds reporting of a known bug in which the maxmimum time window value may be erroneously set to 0, as well as a module parameter to avoid the maximum window checks on broken BIOSes. [v2]: update 3/3 with minor changes Prarit Bhargava (3): pow

[PATCH 1/3] powercap, intel_rapl, implement get_max_time_window

2015-12-21 Thread Prarit Bhargava
straint_0_time_window_us:1:976 Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jovanovic Cc: Seiichi Ikarashi Cc: Mathias Krause Cc: Ajay Thomas Signed-off-by: Prarit Bhargava --- drivers/powercap/intel_rapl.c | 31 +++ drivers/powercap/p

[PATCH 3/3] powercap, intel_rapl, Add ignore_max_time_window_check module parameter for broken BIOSes

2015-12-21 Thread Prarit Bhargava
patch adds a ignore_max_time_window_check module parameter to avoid the maximum time window check in set_time_window(). [v2]: change name to max_time_window_check, fix (val == 0) check Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jovanovic Cc: Seiichi Ikarashi Cc: Math

[PATCH] sched, output warning when isolcpus kernel parameter is invalid

2016-02-04 Thread Prarit Bhargava
() to indicate to the user that something has gone awry, and returns 0 on error. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Prarit Bhargava --- kernel/sched/core.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index

Re: [PATCH] printk, allow different timestamps for printk.time [v2]

2016-02-04 Thread Prarit Bhargava
On 02/04/2016 11:48 AM, Petr Mladek wrote: > On Thu 2016-01-28 07:43:49, Prarit Bhargava wrote: >> +static u64 printk_get_ts(void) >> +{ >> +u64 mono, offset_real; >> + >> +if (printk_time == 0) >> +return 0; >> + >>

Re: [PATCH] printk, allow different timestamps for printk.time

2016-01-26 Thread Prarit Bhargava
On 01/26/2016 03:34 PM, Thomas Gleixner wrote: > Prarit, > > On Mon, 25 Jan 2016, Prarit Bhargava wrote: >> diff --git a/Documentation/kernel-parameters.txt >> b/Documentation/kernel-parameters.txt >> index 87d40a7..2cf6692 100644 >> --- a/Documentati

[PATCH 0/3] powercap, intel_rapl, implement time window checks [v3]

2016-01-24 Thread Prarit Bhargava
ot; Cc: Prarit Bhargava Cc: Radivoje Jovanovic Cc: Seiichi Ikarashi Cc: Mathias Krause Cc: Ajay Thomas Signed-off-by: Prarit Bhargava Prarit Bhargava (3): powercap, intel_rapl, implement get_max_time_window powercap, intel_rapl, implement check for minimum time window powercap,

[PATCH 1/3] powercap, intel_rapl, implement get_max_time_window

2016-01-24 Thread Prarit Bhargava
straint_0_time_window_us:1:976 Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jovanovic Cc: Seiichi Ikarashi Cc: Mathias Krause Cc: Ajay Thomas Signed-off-by: Prarit Bhargava --- drivers/powercap/intel_rapl.c | 31 +++ drivers/powercap/p

[PATCH 3/3] powercap, intel_rapl, Add ignore_max_time_window_check module parameter for broken BIOSes [v3]

2016-01-24 Thread Prarit Bhargava
patch adds a ignore_max_time_window_check module parameter to avoid the maximum time window check in set_time_window(). [v2]: change name to max_time_window_check, fix (val == 0) check [v3]: fix typo in debug message Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje Jov

[PATCH 2/3] powercap, intel_rapl, implement check for minimum time window

2016-01-24 Thread Prarit Bhargava
rep ^ /sys/devices/virtual/powercap/intel-rapl/intel-rapl\:0/constraint_0_time_window_us -bash: echo: write error: Invalid argument /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_time_window_us:1:976 Cc: "Rafael J. Wysocki" Cc: Prarit Bhargava Cc: Radivoje J

[PATCH] printk, allow different timestamps for printk.time

2016-01-25 Thread Prarit Bhargava
clocks Cc: John Stultz Cc: Xunlei Pang Cc: Thomas Gleixner Cc: Baolin Wang Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Petr Mladek Cc: Tejun Heo Cc: Peter Hurley Cc: Vasily Averin Cc: Joe Perches Signed-off-by: Prarit Bhargava --- Documentation/kernel-parameters.txt |5 +++--

[PATCH 1/2] kernel, timekeeping, add trylock option to ktime_get_with_offset()

2016-01-06 Thread Prarit Bhargava
: Baolin Wang Cc: Arnd Bergmann Signed-off-by: Prarit Bhargava --- include/linux/timekeeping.h | 50 +++ kernel/time/timekeeping.c | 15 - 2 files changed, 60 insertions(+), 5 deletions(-) diff --git a/include/linux/timekeeping.h b/include

[PATCH 0/2] printk, Add a printk.clock kernel parameter

2016-01-06 Thread Prarit Bhargava
with printk timestamps. The hardware clock, or the existing functionality, is preserved by default. Cc: John Stultz Cc: Xunlei Pang Cc: Thomas Gleixner Cc: Baolin Wang Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Petr Mladek Cc: Tejun Heo Cc: Peter Hurley Cc: Vasily Averin Cc: Joe Perches Si

[PATCH 2/2] printk, Add printk.clock kernel parameter

2016-01-06 Thread Prarit Bhargava
mas Gleixner Cc: Baolin Wang Cc: Andrew Morton Cc: Greg Kroah-Hartman Cc: Petr Mladek Cc: Tejun Heo Cc: Peter Hurley Cc: Vasily Averin Cc: Joe Perches Signed-off-by: Prarit Bhargava --- include/linux/time64.h |2 + kernel/printk/printk.c | 105 +

Re: [PATCH 1/2] kernel, timekeeping, add trylock option to ktime_get_with_offset()

2016-01-06 Thread Prarit Bhargava
On 01/06/2016 11:04 AM, Jiri Bohac wrote: > On Wed, Jan 06, 2016 at 08:00:33AM -0500, Prarit Bhargava wrote: >> -ktime_t ktime_get_with_offset(enum tk_offsets offs) >> +ktime_t ktime_get_with_offset(enum tk_offsets offs, int trylock) >> { >> struct timekeepe

Re: [PATCH 1/2] kernel, timekeeping, add trylock option to ktime_get_with_offset()

2016-01-06 Thread Prarit Bhargava
On 01/06/2016 12:33 PM, John Stultz wrote: > On Wed, Jan 6, 2016 at 9:28 AM, John Stultz wrote: >> On Wed, Jan 6, 2016 at 5:00 AM, Prarit Bhargava wrote: >>> -ktime_t ktime_get_with_offset(enum tk_offsets offs) >>> +ktime_t ktime_get_with_offset(enum t

Re: [PATCH 1/2] kernel, timekeeping, add trylock option to ktime_get_with_offset()

2016-01-06 Thread Prarit Bhargava
On 01/06/2016 12:34 PM, Thomas Gleixner wrote: > On Wed, 6 Jan 2016, John Stultz wrote: >> On Wed, Jan 6, 2016 at 5:00 AM, Prarit Bhargava wrote: >>> -ktime_t ktime_get_with_offset(enum tk_offsets offs) >>> +ktime_t ktime_get_with_offset(enum t

Re: [PATCH 1/2] kernel, timekeeping, add trylock option to ktime_get_with_offset()

2016-01-06 Thread Prarit Bhargava
On 01/06/2016 02:04 PM, John Stultz wrote: > On Wed, Jan 6, 2016 at 9:34 AM, Thomas Gleixner wrote: >> On Wed, 6 Jan 2016, John Stultz wrote: >>> On Wed, Jan 6, 2016 at 5:00 AM, Prarit Bhargava wrote: >>>> -ktime_t ktime_get_with_offset(enum tk_offsets offs) >&

Re: [PATCH v2] x86/split_lock: Sanitize userspace and guest error output

2020-06-11 Thread Prarit Bhargava
On 6/8/20 1:15 PM, Sean Christopherson wrote: > On Mon, Jun 08, 2020 at 08:21:14AM -0400, Prarit Bhargava wrote: >> diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c >> index 166d7c355896..e02ec81fe1eb 100644 >> --- a/arch/x86/kernel/cpu/intel.c >>

Re: [PATCH v2] x86/split_lock: Sanitize userspace and guest error output

2020-06-11 Thread Prarit Bhargava
On 6/8/20 1:15 PM, Sean Christopherson wrote: > On Mon, Jun 08, 2020 at 08:21:14AM -0400, Prarit Bhargava wrote: >> diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c >> index 166d7c355896..e02ec81fe1eb 100644 >> --- a/arch/x86/kernel/cpu/intel.c >>

Re: [PATCH v5] x86/split_lock: Sanitize userspace and guest error output

2020-06-30 Thread Prarit Bhargava
Just re-pinging on this. P. On 6/16/20 7:32 AM, Prarit Bhargava wrote: > There are two problems with kernel messages in fatal mode that were found > during testing of guests and userspace programs. > > The first is that no kernel message is output when the split lock detector &g

[PATCH v3] x86/split_lock: Sanitize userspace and guest error output

2020-06-15 Thread Prarit Bhargava
noticed that the same message was being output three times so I'm cleaning that up too. Fix fatal mode output, and use consistent messages for fatal and warn modes for both userspace and guests. Signed-off-by: Prarit Bhargava Signed-off-by: Sean Christopherson Cc: Thomas Gleixner Cc: Ingo Molna

[PATCH] x86/split_lock: Sanitize userspace and guest error output

2020-06-05 Thread Prarit Bhargava
noticed that the same message was being output three times so I'm cleaning that up too. Fix fatal mode output, and use consistent messages for fatal and warn modes for both userspace and guests. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov

Re: [PATCH] x86/split_lock: Sanitize userspace and guest error output

2020-06-05 Thread Prarit Bhargava
On 6/5/20 11:29 AM, Xiaoyao Li wrote: > On 6/5/2020 7:44 PM, Prarit Bhargava wrote: >> There are two problems with kernel messages in fatal mode that >> were found during testing of guests and userspace programs. >> >> The first is that no kernel message is output w

Re: [PATCH v2 0/3] printk: replace ringbuffer

2020-05-13 Thread Prarit Bhargava
On 5/1/20 5:40 AM, John Ogness wrote: > Hello, > > Here is a v2 for the first series to rework the printk subsystem. The > v1 and history are here [0]. This first series only replaces the > existing ringbuffer implementation. No locking is removed. No > semantics/behavior of printk are changed.

[PATCH v2] x86/split_lock: Sanitize userspace and guest error output

2020-06-08 Thread Prarit Bhargava
noticed that the same message was being output three times so I'm cleaning that up too. Fix fatal mode output, and use consistent messages for fatal and warn modes for both userspace and guests. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov

Re: [PATCH] module: Add more error message for failed kernel module loading

2020-09-01 Thread Prarit Bhargava
On 9/1/20 2:50 PM, Lucas De Marchi wrote: > On Sat, Aug 29, 2020 at 4:15 AM Qu Wenruo wrote: >> >> When kernel module loading failed, user space only get one of the >> following error messages: >> - -ENOEXEC >> This is the most confusing one. From corrupted ELF header to bad >> WRITE|EXEC f

Re: [PATCH] module: Add more error message for failed kernel module loading

2020-09-01 Thread Prarit Bhargava
On 9/1/20 4:17 PM, Lucas De Marchi wrote: > On Tue, Sep 1, 2020 at 12:56 PM Prarit Bhargava wrote: >> >> >> >> On 9/1/20 2:50 PM, Lucas De Marchi wrote: >>> On Sat, Aug 29, 2020 at 4:15 AM Qu Wenruo wrote: >>>> >>>> When

<    4   5   6   7   8   9   10   11   >