On Tue, Apr 16, 2019 at 03:45:00PM +0200, Laurent Dufour wrote:
> From: Peter Zijlstra
>
> Wrap the VMA modifications (vma_adjust/unmap_page_range) with sequence
> counts such that we can easily test if a VMA is changed.
>
> The calls to vm_write_begin/end() in unmap_page_range() are
> used to
Michal Suchánek writes:
> On Thu, 18 Apr 2019 13:56:56 -0500
> Nathan Lynch wrote:
>
> Hello,
>
>> Changing cpu <-> node relationships at runtime, as the pseries
>> platform code attempts to do for LPM, PRRN, and VPHN is essentially
>> unsupported by core subsystems. [1]
>
> Wasn't there a
On Tue, Apr 16, 2019 at 03:44:59PM +0200, Laurent Dufour wrote:
> Some VMA struct fields need to be initialized once the VMA structure is
> allocated.
> Currently this only concerns anon_vma_chain field but some other will be
> added to support the speculative page fault.
>
> Instead of spreading
On Tue, Apr 16, 2019 at 03:44:58PM +0200, Laurent Dufour wrote:
> pte_unmap_same() is making the assumption that the page table are still
> around because the mmap_sem is held.
> This is no more the case when running a speculative page fault and
> additional check must be made to ensure that the
On Tue, Apr 16, 2019 at 03:44:57PM +0200, Laurent Dufour wrote:
> When handling page fault without holding the mmap_sem the fetch of the
> pte lock pointer and the locking will have to be done while ensuring
> that the VMA is not touched in our back.
>
> So move the fetch and locking operations
On Tue, Apr 16, 2019 at 03:44:56PM +0200, Laurent Dufour wrote:
> From: Peter Zijlstra
>
> When speculating faults (without holding mmap_sem) we need to validate
> that the vma against which we loaded pages is still valid when we're
> ready to install the new PTE.
>
> Therefore, replace the
Quoting Jonas Gorski (2019-04-18 04:12:11)
> Now that clk_{readl,writel} is just an alias for {readl,writel}, we can
> switch all users of clk_* to use the accessors directly and remove the
> helpers.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
Quoting Jonas Gorski (2019-04-18 04:12:10)
> Now that the powerpc clocks are properly marked as big endian, we can
> remove the special handling for PowerPC.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
Quoting Jonas Gorski (2019-04-18 04:12:09)
> These clocks' registers are accessed as big endian, so mark them as
> such.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
Quoting Jonas Gorski (2019-04-18 04:12:08)
> Add a clock specific flag to switch register accesses to big endian, to
> allow runtime configuration of big endian mux clocks.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
Quoting Jonas Gorski (2019-04-18 04:12:07)
> Add a clock specific flag to switch register accesses to big endian, to
> allow runtime configuration of big endian multiplier clocks.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
Quoting Jonas Gorski (2019-04-18 04:12:06)
> Add a clock specific flag to switch register accesses to big endian, to
> allow runtime configuration of big endian gated clocks.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
On Tue, Apr 16, 2019 at 03:41:56PM +0100, Mark Rutland wrote:
> On Tue, Apr 16, 2019 at 04:31:27PM +0200, Laurent Dufour wrote:
> > Le 16/04/2019 à 16:27, Mark Rutland a écrit :
> > > On Tue, Apr 16, 2019 at 03:44:55PM +0200, Laurent Dufour wrote:
> > > > From: Mahendran Ganesh
> > > >
> > > >
Quoting Jonas Gorski (2019-04-18 04:12:05)
> Add a clock specific flag to switch register accesses to big endian, to
> allow runtime configuration of big endian fractional divider clocks.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
Quoting Jonas Gorski (2019-04-18 04:12:04)
> Add a clock specific flag to switch register accesses to big endian, to
> allow runtime configuration of big endian divider clocks.
>
> Signed-off-by: Jonas Gorski
> ---
Applied to clk-next
On Tue, Apr 16, 2019 at 03:44:54PM +0200, Laurent Dufour wrote:
> Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT for BOOK3S_64. This enables
> the Speculative Page Fault handler.
>
> Support is only provide for BOOK3S_64 currently because:
> - require CONFIG_PPC_STD_MMU because checks done in
>
On Tue, Apr 16, 2019 at 03:44:53PM +0200, Laurent Dufour wrote:
> Set ARCH_SUPPORTS_SPECULATIVE_PAGE_FAULT which turns on the
> Speculative Page Fault handler when building for 64bit.
>
> Cc: Thomas Gleixner
> Signed-off-by: Laurent Dufour
I think this patch should be move as last patch in the
On Tue, Apr 16, 2019 at 03:44:52PM +0200, Laurent Dufour wrote:
> This configuration variable will be used to build the code needed to
> handle speculative page fault.
>
> By default it is turned off, and activated depending on architecture
> support, ARCH_HAS_PTE_SPECIAL, SMP and MMU.
>
> The
On Thu, 18 Apr 2019 13:56:56 -0500
Nathan Lynch wrote:
Hello,
> Changing cpu <-> node relationships at runtime, as the pseries
> platform code attempts to do for LPM, PRRN, and VPHN is essentially
> unsupported by core subsystems. [1]
Wasn't there a patch that solves the discrepancy by
On Thu, Apr 18, 2019 at 11:34:15AM +, S.j. Wang wrote:
> Add pm runtime support and move clock handling there.
> fsl_esai_suspend is replaced by pm_runtime_force_suspend.
> fsl_esai_resume is replaced by pm_runtime_force_resume.
The change looks fine, yet I'd prefer to have a good
On Thu, Apr 18, 2019 at 09:37:06AM +, S.j. Wang wrote:
> > > > And this is according to IMX6DQRM:
> > > > Limited support for the case when output sampling rates is
> > > > between 8kHz and 30kHz. The limitation is the supported ratio
> > > > (Fsin/Fsout) range as between 1/24 to 8
Changing the NUMA associations for CPUs and memory at runtime is
basically unsupported by the core mm, scheduler etc. We see all manner
of crashes, warnings and instability when the pseries code tries to do
this. Disable this behavior by default, and document the switch a bit.
Signed-off-by:
Changing cpu <-> node relationships at runtime, as the pseries
platform code attempts to do for LPM, PRRN, and VPHN is essentially
unsupported by core subsystems. [1]
While more significant changes (i.e. discarding all that code) likely
are in store, these patches are a minimally invasive way to
When booted with "topology_updates=no", or when "off" is written to
/proc/powerpc/topology_updates, NUMA reassignments are inhibited for
PRRN and VPHN events. However, migration and suspend unconditionally
re-enable reassignments via start_topology_update(). This is
incoherent.
Check the
On Thu, 18 Apr 2019 08:49:32 -0700
Linus Torvalds wrote:
> On Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky
> wrote:
> >
> > The problematic lines in the generic gup code are these three:
> >
> > 1845: pmdp = pmd_offset(, addr);
> > 1888: pudp = pud_offset(, addr);
> > 1916: p4dp =
On Thu, Apr 18, 2019 at 1:02 AM Martin Schwidefsky
wrote:
>
> The problematic lines in the generic gup code are these three:
>
> 1845: pmdp = pmd_offset(, addr);
> 1888: pudp = pud_offset(, addr);
> 1916: p4dp = p4d_offset(, addr);
>
> Passing the pointer of a *copy* of a page table entry
On Fri, Apr 12, 2019 at 10:33:12PM -0700, Eric Biggers wrote:
> From: Eric Biggers
>
> Replace all calls to in_interrupt() in the PowerPC crypto code with
> !crypto_simd_usable(). This causes the crypto self-tests to test the
> no-SIMD code paths when CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y.
>
>
On April 18, 2019 4:09:07 AM PDT, Adhemerval Zanella
wrote:
>
>
>On 17/04/2019 19:04, H. Peter Anvin wrote:
>> On 4/15/19 10:22 AM, Adhemerval Zanella wrote:
New interfaces are only necessary for the handful of architectures
>that don't have the speed fields *and* to space to put them
On Wednesday, April 17, 2019 4:52:34 PM CEST Mohan Kumar wrote:
> Use pr_debug instead of printk
>
> WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then
> dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...
>
> Signed-off-by: Mohan Kumar
> ---
>
v5 --> v6:
1. give up adding boot option iommu.dma_mode
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
As Robin Murphy's suggestion:
"It's also not necessarily
First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the
opportunity to set {lazy|strict} mode as default at build time. Then put
the three config options in an choice, make people can only choose one of
the three at a time.
The default IOMMU dma modes on each ARCHs have no
On 4/18/19 2:44 AM, Mauro Carvalho Chehab wrote:
Em Wed, 17 Apr 2019 10:47:28 -0700
Guenter Roeck escreveu:
On Wed, Apr 17, 2019 at 10:43:37AM -0700, Guenter Roeck wrote:
On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote:
Em Wed, 17 Apr 2019 14:13:52 -0300
Mauro Carvalho
* Masahiro Yamada wrote:
> Commit 60a3cdd06394 ("x86: add optimized inlining") introduced
> CONFIG_OPTIMIZE_INLINING, but it has been available only for x86.
>
> The idea is obviously arch-agnostic although we need some code fixups.
> This commit moves the config entry from
Jon,
Em Mon, 15 Apr 2019 23:55:25 -0300
Mauro Carvalho Chehab escreveu:
> I have a separate patch series with do the actual rename and
> adjustment of references. I opted to submit this first, as it
> sounds easier to merge this way, as each subsystem maintainer
> can apply the conversion
Add pm runtime support and move clock handling there.
fsl_esai_suspend is replaced by pm_runtime_force_suspend.
fsl_esai_resume is replaced by pm_runtime_force_resume.
Signed-off-by: Shengjiu Wang
---
Changes in v2
-refine the commit comments.
-move regcache_mark_dirty to runtime suspend.
Hi
> On Thu, Apr 18, 2019 at 10:15:24AM +, S.j. Wang wrote:
> > > On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote:
> > > > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote:
>
> > > > Just for curiosity, we had similar situation on imx6sx, so we
> > > > added
Now that clk_{readl,writel} is just an alias for {readl,writel}, we can
switch all users of clk_* to use the accessors directly and remove the
helpers.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* no actual changes
V1 -> V2:
* newly added patch
drivers/clk/clk-divider.c | 4
Now that the powerpc clocks are properly marked as big endian, we can
remove the special handling for PowerPC.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* no actual changes
V1 -> V2:
* no actual changes
include/linux/clk-provider.h | 16
1 file changed, 16 deletions(-)
diff
These clocks' registers are accessed as big endian, so mark them as
such.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* slightly rework to avoid a line >80 chars
V1 -> V2:
* switch from global to local flags
arch/powerpc/platforms/512x/clock-commonclk.c | 9 ++---
1 file changed, 6
Add a clock specific flag to switch register accesses to big endian, to
allow runtime configuration of big endian mux clocks.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* drop unneeded else in clk_mux_readl
V1 -> V2:
* switch from global to local flag
drivers/clk/clk-mux.c| 22
Add a clock specific flag to switch register accesses to big endian, to
allow runtime configuration of big endian multiplier clocks.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* drop unneeded else in clk_mult_readl
V1 -> V2:
* switch from global to local flag
drivers/clk/clk-multiplier.c | 22
Add a clock specific flag to switch register accesses to big endian, to
allow runtime configuration of big endian gated clocks.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* drop unneeded else in clk_gate_readl
V1 -> V2:
* switch from global to local flag
drivers/clk/clk-gate.c | 22
Add a clock specific flag to switch register accesses to big endian, to
allow runtime configuration of big endian divider clocks.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* fix passed arguments to clk_div_readl found by kbuild
* drop unneeded else in clk_div_readl
V1 -> V2:
* switch from
Add a clock specific flag to switch register accesses to big endian, to
allow runtime configuration of big endian fractional divider clocks.
Signed-off-by: Jonas Gorski
---
V2 -> V3:
* drop unneeded else in clk_fd_readl
V1 -> V2:
* switch from global to local flag
Currently the endianness for register accesses of basic clocks if fixed
based on the architecture (BE for PowerPC, LE for everyone else). This
is inconvenient for architectures that support both.
To avoid adding more rules to the #ifdef, this patchset adds new flags
to the basic clocks to tag the
On 17/04/2019 19:04, H. Peter Anvin wrote:
> On 4/15/19 10:22 AM, Adhemerval Zanella wrote:
>>>
>>> New interfaces are only necessary for the handful of architectures that
>>> don't have the speed fields *and* to space to put them in.
>>
>> Based on your WIP, it seems that both sparc and mips
Hi
>
>
> On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote:
> > In imx8 when systerm enter suspend state, the power of subsystem will
> > be off, the clock enable state will be lost and register configuration
>
> Just for curiosity, we had similar situation on imx6sx, so we added
>
On Thu, Apr 18, 2019 at 10:15:24AM +, S.j. Wang wrote:
> > On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote:
> > > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote:
> > > Just for curiosity, we had similar situation on imx6sx, so we added
> > > suspend/resume with
Hi
>
> On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote:
> > On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote:
>
> > > In imx8 when systerm enter suspend state, the power of subsystem
> > > will be off, the clock enable state will be lost and register
> > > configuration
>
On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote:
> The EEH address cache is currently initialized and populated by a
> single function: eeh_addr_cache_build(). While the initial population
> of the cache can only be done once resources are allocated,
> initialization (just setting up a
On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote:
> Move the EEH enabled message into it's own function so that future
> work can call it from multiple places.
>
> Signed-off-by: Sam Bobroff
> ---
> arch/powerpc/include/asm/eeh.h | 3 +++
> arch/powerpc/kernel/eeh.c | 16
On Wed, 2019-03-20 at 13:58 +1100, Sam Bobroff wrote:
> The PHB flag, PNV_PHB_FLAG_EEH, is set (on PowerNV) individually on
> each PHB once the EEH subsystem is ready. It is the only use of the
> flags member of the phb struct.
>
> However there is no need to store this separately on each PHB, so
Em Wed, 17 Apr 2019 10:47:28 -0700
Guenter Roeck escreveu:
> On Wed, Apr 17, 2019 at 10:43:37AM -0700, Guenter Roeck wrote:
> > On Wed, Apr 17, 2019 at 02:22:15PM -0300, Mauro Carvalho Chehab wrote:
> > > Em Wed, 17 Apr 2019 14:13:52 -0300
> > > Mauro Carvalho Chehab escreveu:
> > >
> > >
Hi
>
> On Thu, Apr 18, 2019 at 08:50:48AM +, S.j. Wang wrote:
> > > And this is according to IMX6DQRM:
> > > Limited support for the case when output sampling rates is
> > > between 8kHz and 30kHz. The limitation is the supported ratio
> > > (Fsin/Fsout) range as between 1/24 to
On Thu, Apr 18, 2019 at 02:00:12AM -0700, Nicolin Chen wrote:
> On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote:
> > In imx8 when systerm enter suspend state, the power of subsystem will
> > be off, the clock enable state will be lost and register configuration
> Just for curiosity, we
On Thu, Apr 18, 2019 at 08:50:48AM +, S.j. Wang wrote:
> > And this is according to IMX6DQRM:
> > Limited support for the case when output sampling rates is
> > between 8kHz and 30kHz. The limitation is the supported ratio
> > (Fsin/Fsout) range as between 1/24 to 8
> >
> > This
On Thu, 18 Apr 2019 at 01:32, Stephen Boyd wrote:
>
> Quoting Jonas Gorski (2019-04-15 03:10:39)
> > @@ -370,7 +388,7 @@ static long clk_divider_round_rate(struct clk_hw *hw,
> > unsigned long rate,
> > if (divider->flags & CLK_DIVIDER_READ_ONLY) {
> > u32 val;
> >
> > -
On Thu, Apr 18, 2019 at 03:29:09AM +, S.j. Wang wrote:
> In imx8 when systerm enter suspend state, the power of subsystem will
> be off, the clock enable state will be lost and register configuration
Just for curiosity, we had similar situation on imx6sx, so we
added suspend/resume with
Hi
>
>
> On Thu, Apr 18, 2019 at 02:37:03AM +, S.j. Wang wrote:
> > > Here:
> > > > + /* Does not support cases: Tsout > 8.125 * Tsin */
> > > > + if (inrate * 8 > 65 * outrate)
>
> Though it might not matter any more (see my last comments), it should be
> "inrate > 8.125 *
On Thu, Apr 18, 2019 at 02:37:03AM +, S.j. Wang wrote:
> > Here:
> > > + /* Does not support cases: Tsout > 8.125 * Tsin */
> > > + if (inrate * 8 > 65 * outrate)
Though it might not matter any more (see my last comments),
it should be "inrate > 8.125 * outrate" in the comments.
> >
On Wed, 17 Apr 2019 09:57:01 -0700
Linus Torvalds wrote:
> On Wed, Apr 17, 2019 at 1:02 AM Martin Schwidefsky
> wrote:
> >
> > Grumpf, that does *not* work. For gup the table entries may be read only
> > once. Now I remember why I open-coded p4d_offset, pud_offset and pmd_offset
> > in
Christophe Leroy writes:
> diff --git a/arch/powerpc/include/asm/book3s/32/kup.h
> b/arch/powerpc/include/asm/book3s/32/kup.h
> index 5f97c742ca71..b3560b2de435 100644
> --- a/arch/powerpc/include/asm/book3s/32/kup.h
> +++ b/arch/powerpc/include/asm/book3s/32/kup.h
> @@ -37,6 +37,113 @@
...
> +
Christophe Leroy writes:
> diff --git a/arch/powerpc/include/asm/nohash/32/kup-8xx.h
> b/arch/powerpc/include/asm/nohash/32/kup-8xx.h
> new file mode 100644
> index ..a44cc6c1b901
> --- /dev/null
> +++ b/arch/powerpc/include/asm/nohash/32/kup-8xx.h
> @@ -0,0 +1,68 @@
> +/*
When KUAP is enabled we have logic to detect page faults that occur
outside of a valid user access region and are blocked by the AMR.
What we don't have at the moment is logic to detect a fault *within* a
valid user access region, that has been incorrectly blocked by AMR.
This is not meant to
Kernel Userspace Access Prevention utilises a feature of the Radix MMU
which disallows read and write access to userspace addresses. By
utilising this, the kernel is prevented from accessing user data from
outside of trusted paths that perform proper safety checks, such as
copy_{to/from}_user()
From: Russell Currey
__patch_instruction() is called in early boot, and uses
__put_user_size(), which includes the allow/prevent calls to enforce
KUAP, which could either be called too early, or in the Radix case,
forced to use "early_" versions of functions just to safely handle
this one case.
From: Russell Currey
Execution protection already exists on radix, this just refactors
the radix init to provide the KUEP setup function instead.
Thus, the only functional change is that it can now be disabled.
Signed-off-by: Russell Currey
Signed-off-by: Michael Ellerman
---
v6:
From: Russell Currey
Some platforms (i.e. Radix MMU) need per-CPU initialisation for KUP.
Any platforms that only want to do KUP initialisation once
globally can just check to see if they're running on the boot CPU, or
check if whatever setup they need has already been performed.
Note that
From: Christophe Leroy
This patch adds a skeleton for Kernel Userspace Protection
functionnalities like Kernel Userspace Access Protection and Kernel
Userspace Execution Prevention
The subsequent implementation of KUAP for radix makes use of a MMU
feature in order to patch out assembly when
From: Christophe Leroy
This patch adds a skeleton for Kernel Userspace Execution Prevention.
Then subarches implementing it have to define CONFIG_PPC_HAVE_KUEP
and provide setup_kuep() function.
Signed-off-by: Christophe Leroy
[mpe: Don't split strings, use pr_crit_ratelimited()]
In order to implement KUAP (Kernel Userspace Access Protection) on
Power9 we will be using the AMR, and therefore indirectly the
UAMOR/AMOR.
So save/restore these regs in the idle code.
Signed-off-by: Michael Ellerman
---
v6: Unchanged.
v5: Unchanged.
v4: New.
---
From: Russell Currey
Without restoring the IAMR after idle, execution prevention on POWER9
with Radix MMU is overwritten and the kernel can freely execute
userspace without faulting.
This is necessary when returning from any stop state that modifies
user state, as well as hypervisor state.
To
From: Christophe Leroy
This patch implements a framework for Kernel Userspace Access
Protection.
Then subarches will have the possibility to provide their own
implementation by providing setup_kuap() and
allow/prevent_user_access().
Some platforms will need to know the area accessed and
Hi Andrew,
>> +If CONFIG_LOCK_DOWN_KERNEL is enabled, the kernel can be
>> +moved to a more locked down state at runtime by writing to
>> +this attribute. Valid values are:
>> +
>> +integrity:
>> +The kernel will disable
74 matches
Mail list logo