Re: [PATCH v2 0/4] mm: arm64: bring up BATCHED_UNMAP_TLB_FLUSH

2022-07-13 Thread Barry Song
On Thu, Jul 14, 2022 at 3:29 PM Xin Hao wrote: > > Hi barry. > > I do some test on Kunpeng arm64 machine use Unixbench. > > The test result as below. > > One core, we can see the performance improvement above +30%. I am really pleased to see the 30%+ improvement on unixbench on single core. >

Re: [PATCH v2 0/4] mm: arm64: bring up BATCHED_UNMAP_TLB_FLUSH

2022-07-13 Thread Xin Hao
Hi barry. I do some test on Kunpeng arm64 machine use Unixbench. The test  result as below. One core, we can see the performance improvement above +30%. ./Run -c 1 -i 1 shell1 w/o System Benchmarks Partial Index  BASELINE RESULT INDEX Shell Scripts (1 concurrent)

[PATCH linux-next] powerpc: use raw_smp_processor_id in arch_touch_nmi_watchdog

2022-07-13 Thread Zhouyi Zhou
use raw_smp_processor_id() in arch_touch_nmi_watchdog because when called from watchdog, the cpu is preemptible. Signed-off-by: Zhouyi Zhou --- Dear PPC developers I found this bug when trying to do rcutorture tests in ppc VM of Open Source Lab of Oregon State University. qemu-system-ppc64

Re: [PATCH v3 4/4] watchdog/pseries-wdt: initial support for H_WATCHDOG-based watchdog timers

2022-07-13 Thread Guenter Roeck
On 7/13/22 13:23, Scott Cheloha wrote: PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. The timers have millisecond granularity. The guest is terminated when a timer expires. This patch adds a watchdog driver for

[PATCH v3 4/4] watchdog/pseries-wdt: initial support for H_WATCHDOG-based watchdog timers

2022-07-13 Thread Scott Cheloha
PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. The timers have millisecond granularity. The guest is terminated when a timer expires. This patch adds a watchdog driver for these timers, "pseries-wdt".

[PATCH v3 3/4] powerpc/pseries: register pseries-wdt device with platform bus

2022-07-13 Thread Scott Cheloha
PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. These timers do not conform to PowerPC device conventions. They are not affixed to any extant bus, nor do they have full representation in the device tree. As a

[PATCH v3 2/4] powerpc/pseries: add FW_FEATURE_WATCHDOG flag

2022-07-13 Thread Scott Cheloha
PAPR v2.12 specifies a new optional function set, "hcall-watchdog", for the /rtas/ibm,hypertas-functions property. The presence of this function set indicates support for the H_WATCHDOG hypercall. Check for this function set and, if present, set the new FW_FEATURE_WATCHDOG flag. Signed-off-by:

[PATCH v3 1/4] powerpc/pseries: hvcall.h: add H_WATCHDOG opcode, H_NOOP return code

2022-07-13 Thread Scott Cheloha
PAPR v2.12 defines a new hypercall, H_WATCHDOG. The hypercall permits guest control of one or more virtual watchdog timers. Add the opcode for the H_WATCHDOG hypercall to hvcall.h. While here, add a definition for H_NOOP, a possible return code for H_WATCHDOG. Signed-off-by: Scott Cheloha ---

[PATCH v3 0/4] pseries-wdt: initial support for H_WATCHDOG-based watchdog timers

2022-07-13 Thread Scott Cheloha
PAPR v2.12 defines a new hypercall, H_WATCHDOG. This patch series adds support for this hypercall to powerpc/pseries kernels and introduces a new watchdog driver, "pseries-wdt", for the virtual timers exposed by the hypercall. This series is preceded by the following: RFC v1:

Re: [PATCH v5 4/4] pseries/mobility: set NMI watchdog factor during an LPM

2022-07-13 Thread Randy Dunlap
Hi Laurent, On 7/13/22 08:47, Laurent Dufour wrote: > diff --git a/Documentation/admin-guide/sysctl/kernel.rst > b/Documentation/admin-guide/sysctl/kernel.rst > index ddccd1077462..d73faa619c15 100644 > --- a/Documentation/admin-guide/sysctl/kernel.rst > +++

Re: [PATCH] macintosh:fix oob read in do_adb_query function

2022-07-13 Thread Kees Cook
On Wed, Jul 13, 2022 at 11:37:34PM +0800, Ning Qiang wrote: > In do_adb_query function of drivers/macintosh/adb.c, req->data is copy > form userland. the parameter "req->data[2]" is Missing check, the > array size of adb_handler[] is 16, so "adb_handler[ > req->data[2]].original_address" and

Re: [PATCH] macintosh:fix oob read in do_adb_query function

2022-07-13 Thread Greg KH
On Wed, Jul 13, 2022 at 11:37:34PM +0800, Ning Qiang wrote: > In do_adb_query function of drivers/macintosh/adb.c, req->data is copy > form userland. the parameter "req->data[2]" is Missing check, the > array size of adb_handler[] is 16, so "adb_handler[ > req->data[2]].original_address" and

[PATCH v5 0/4] Extending NMI watchdog during LPM

2022-07-13 Thread Laurent Dufour
When a partition is transferred, once it arrives at the destination node, the partition is active but much of its memory must be transferred from the start node. It depends on the activity in the partition, but the more CPU the partition has, the more memory to be transferred is likely to be.

[PATCH v5 4/4] pseries/mobility: set NMI watchdog factor during an LPM

2022-07-13 Thread Laurent Dufour
During an LPM, while the memory transfer is in progress on the arrival side, some latencies are generated when accessing not yet transferred pages on the arrival side. Thus, the NMI watchdog may be triggered too frequently, which increases the risk to hit an NMI interrupt in a bad place in the

[PATCH v5 1/4] powerpc/mobility: wait for memory transfer to complete

2022-07-13 Thread Laurent Dufour
In pseries_migration_partition(), loop until the memory transfer is complete. This way the calling drmgr process will not exit earlier, allowing callbacks to be run only once the migration is fully completed. If reading the VASI state is done after the hypervisor has completed the migration, the

[PATCH v5 3/4] powerpc/watchdog: introduce a NMI watchdog's factor

2022-07-13 Thread Laurent Dufour
Introduce a factor which would apply to the NMI watchdog timeout. This factor is a percentage added to the watchdog_tresh value. The value is set under the watchdog_mutex protection and lockup_detector_reconfigure() is called to recompute wd_panic_timeout_tb. Once the factor is set, it remains

[PATCH v5 2/4] watchdog: export lockup_detector_reconfigure

2022-07-13 Thread Laurent Dufour
In some circumstances it may be interesting to reconfigure the watchdog from inside the kernel. On PowerPC, this may helpful before and after a LPAR migration (LPM) is initiated, because it implies some latencies, watchdog, and especially NMI watchdog is expected to be triggered during this

Re: [PATCH v5] random: remove CONFIG_ARCH_RANDOM

2022-07-13 Thread Catalin Marinas
On Fri, Jul 08, 2022 at 02:40:32AM +0200, Jason A. Donenfeld wrote: > When RDRAND was introduced, there was much discussion on whether it > should be trusted and how the kernel should handle that. Initially, two > mechanisms cropped up, CONFIG_ARCH_RANDOM, a compile time switch, and > "nordrand",

[PATCH] macintosh:fix oob read in do_adb_query function

2022-07-13 Thread Ning Qiang
In do_adb_query function of drivers/macintosh/adb.c, req->data is copy form userland. the parameter "req->data[2]" is Missing check, the array size of adb_handler[] is 16, so "adb_handler[ req->data[2]].original_address" and "adb_handler[ req->data[2]].handler_id" will lead to oob read.

Re: [PATCH v4 4/4] pseries/mobility: set NMI watchdog factor during LPM

2022-07-13 Thread Randy Dunlap
Hi, On 7/13/22 03:56, Laurent Dufour wrote: > Le 12/07/2022 à 18:25, Randy Dunlap a écrit : >> Hi-- >> >> On 7/12/22 07:32, Laurent Dufour wrote: >>> >>> Reviewed-by: Nicholas Piggin >>> Signed-off-by: Laurent Dufour >>> --- >>> Documentation/admin-guide/sysctl/kernel.rst | 12 ++ >>>

Re: [PATCH v3 4/4] pseries/mobility: set NMI watchdog factor during LPM

2022-07-13 Thread Laurent Dufour
Le 12/07/2022 à 11:47, Laurent Dufour a écrit : > Le 12/07/2022 à 03:46, Nicholas Piggin a écrit : >> Excerpts from Laurent Dufour's message of June 27, 2022 11:53 pm: >>> During a LPM, while the memory transfer is in progress on the arrival side, >>> some latencies is generated when accessing not

[PATCH] macintosh:fix oob read in do_adb_query function

2022-07-13 Thread NAME
From: sohu0106 In do_adb_query function of drivers/macintosh/adb.c, req->data is copy form userland. The parameter "req->data[2]" is Missing check, the array size of adb_handler[] is 16, so "adb_handler[req->data[2]]. original_address" and "adb_handler[req->data[2]]. handler_id" will lead to oob

Re: [PATCH] macintosh:fix oob read in do_adb_query function

2022-07-13 Thread Greg KH
On Wed, Jul 13, 2022 at 09:40:37PM +0800, NAME wrote: > From: sohu0106 For obvious reasons, we need a real name here, and in the signed-off-by line. > In do_adb_query function of drivers/macintosh/adb.c, > req->data is copy form userland. The parameter > "req->data[2]" is Missing check, the

[PATCH] powerpc: dts: turris1x.dts: Add CPLD reboot node

2022-07-13 Thread Pali Rohár
CPLD firmware can reset board by writing value 0x01 at CPLD memory offset 0x0d. Define syscon-reboot node for this reset support. Fixes: 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers") Signed-off-by: Pali Rohár --- arch/powerpc/boot/dts/turris1x.dts | 10 +- 1

Re: [PATCH v4 4/4] pseries/mobility: set NMI watchdog factor during LPM

2022-07-13 Thread Laurent Dufour
Le 12/07/2022 à 18:25, Randy Dunlap a écrit : > Hi-- > > On 7/12/22 07:32, Laurent Dufour wrote: >> During a LPM, while the memory transfer is in progress on the arrival side, >> some latencies is generated when accessing not yet transferred pages on the > > are > >> arrival

Re: [PATCH v2] powerpc/papr_scm: Fix nvdimm event mappings

2022-07-13 Thread kajoljain
On 7/12/22 10:45, Vaibhav Jain wrote: > Hi Kajol, > > Thanks for the patch. Minor review comment below: > > Kajol Jain writes: > >> Commit 4c08d4bbc089 ("powerpc/papr_scm: Add perf interface support") >> added performance monitoring support for papr-scm nvdimm devices via >> perf interface.