Le 01/09/2022 à 07:58, Benjamin Gray a écrit :
> From: Russell Currey
>
> powerpc allocates a text poke area of one page that is used by
> patch_instruction() to modify read-only text when STRICT_KERNEL_RWX
> is enabled.
>
> patch_instruction() is only designed for instructions,
> so writing d
On Thursday 01 September 2022 13:53:56 Michael Ellerman wrote:
> Pali Rohár writes:
> > On Thursday 25 August 2022 17:49:28 Michael Ellerman wrote:
> >> Pali Rohár writes:
> >> > On 32-bit powerpc systems with more PCIe controllers and more PCI
> >> > domains,
> >> > where on more PCI domains ar
Le 01/09/2022 à 07:58, Benjamin Gray a écrit :
> [Vous ne recevez pas souvent de courriers de bg...@linux.ibm.com. Découvrez
> pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> Implement static call support for 64 bit V2 ABI. This requires
> making sure the TOC i
On Thu, Sep 01, 2022 at 05:22:32AM +, Christophe Leroy wrote:
>
>
> Le 01/09/2022 à 00:45, Segher Boessenkool a écrit :
> > Hi!
> >
> > On Tue, Aug 30, 2022 at 09:10:02AM +, Christophe Leroy wrote:
> >> Le 30/08/2022 à 11:01, Nicholas Piggin a écrit :
> >>> On Tue Aug 30, 2022 at 3:24 PM
Le 01/09/2022 à 09:37, Gabriel Paubert a écrit :
> On Thu, Sep 01, 2022 at 05:22:32AM +, Christophe Leroy wrote:
>>
>>
>> Le 01/09/2022 à 00:45, Segher Boessenkool a écrit :
>>> Hi!
>>>
>>> On Tue, Aug 30, 2022 at 09:10:02AM +, Christophe Leroy wrote:
Le 30/08/2022 à 11:01, Nicholas
CCing static call maintainers/reviewers.
And note that my email address has changed to
christophe.le...@csgroup.eu monthes ago.
Le 01/09/2022 à 07:58, Benjamin Gray a écrit :
> [Vous ne recevez pas souvent de courriers de bg...@linux.ibm.com. Découvrez
> pourquoi ceci est important à https://ak
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> This patch adds [stub] implementations for required
> functions, inorder to enable objtool build on powerpc.
>
> Signed-off-by: Sathvika Vasireddy
> [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool]
> Signed-off-by: Christophe L
On 29-Aug-22 8:10 PM, Peter Zijlstra wrote:
> On Mon, Aug 29, 2022 at 02:04:33PM +0200, Peter Zijlstra wrote:
>> On Mon, Aug 29, 2022 at 05:03:47PM +0530, Ravi Bangoria wrote:
>>> @@ -12598,6 +12590,7 @@ EXPORT_SYMBOL_GPL(perf_event_create_kernel_counter);
>>>
>>> void perf_pmu_migrate_context(s
Allow PTE changes to avoid flushing the TLB when access permissions are
being relaxed, the dirty bit is being set, and the accessed bit is being
changed.
Relaxing access permissions and setting dirty and accessed bits do not
require a flush because the MMU will re-load the PTE and notice the
updat
Le 01/09/2022 à 13:03, Nicholas Piggin a écrit :
> Allow PTE changes to avoid flushing the TLB when access permissions are
> being relaxed, the dirty bit is being set, and the accessed bit is being
> changed.
>
> Relaxing access permissions and setting dirty and accessed bits do not
> require a
On Thu, Sep 01, 2022 at 04:05:53PM +0530, Ravi Bangoria wrote:
> On 29-Aug-22 8:10 PM, Peter Zijlstra wrote:
> > On Mon, Aug 29, 2022 at 02:04:33PM +0200, Peter Zijlstra wrote:
> >> On Mon, Aug 29, 2022 at 05:03:47PM +0530, Ravi Bangoria wrote:
> >>> @@ -12598,6 +12590,7 @@
> >>> EXPORT_SYMBOL_GPL
This series applies on top of the series v2 "objtool: Enable and
implement --mcount option on powerpc" [1]
A few modifications are done to core parts to enable powerpc
implementation:
- R_X86_64_PC32 is abstracted to R_REL32 so that it can then be
redefined as R_PPC_REL32.
- A call to static_call_
In preparation of support of inline static calls on powerpc, provide
trampoline address when updating sites, so that when the destination
function is too far for a direct function call, the call site is
patched with a call to the trampoline.
Signed-off-by: Christophe Leroy
---
arch/x86/kernel/st
Call static_call_init() just after jump_label_init().
x86 already called it from setup_arch(). This is not a
problem as static_call_init() is guarded from double call.
Signed-off-by: Christophe Leroy
---
init/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/init/main.c b/init/main.c
i
Make arch_decode_instruction() more future proof and less error prone:
- Use local vars for type and imm so that GCC will detect when we
forget to update them
- Handle imm outside the branch type check
- Adapt len for prefixed instructions
Handle the four branch types b, bl, ba, bla
Part of it sh
In order to allow other architectures than x86 to use 32 bits
PC relative relocations (S+A-P), define a R_REL32 macro that each
architecture will define, in the same way as already done for
R_NONE, R_ABS32 and R_ABS64.
For x86 that corresponds to R_X86_64_PC32.
For powerpc it is R_PPC_REL32/R_PPC6
Implement inline static calls:
- Put a 'bl' to the destination function ('b' if tail call)
- Put a 'nop' when the destination function is NULL ('blr' if tail call)
- Put a 'li r3,0' when the destination is the RET0 function and not
a tail call.
If the destination is too far (over the 32Mb limit),
Reorganise arch_static_call_transform() in order to ease the support
of inline static calls in following patch:
- remove 'target' to nhide whether it is a 'return 0' or not.
- Don't bail out if 'tramp' is NULL, just do nothing until next patch.
Note that 'target' was 'tramp + PPC_SCT_RET0', is_sho
On Thu, Sep 01, 2022 at 01:39:02PM +1000, Michael Ellerman wrote:
> Joe Lawrence writes:
> > On Thu, Sep 01, 2022 at 08:30:44AM +1000, Michael Ellerman wrote:
> >> Joe Lawrence writes:
> ...
> >
> > Hi Michael,
> >
> > While we're on the topic of klp-relocations and Power, I saw a similar
> > acc
On Thu, Sep 01, 2022 at 09:32:46AM +, Christophe Leroy wrote:
> Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> > +int arch_decode_instruction(struct objtool_file *file, const struct
> > section *sec,
> > + unsigned long offset, unsigned int maxlen,
> > +
Le 01/09/2022 à 17:11, Segher Boessenkool a écrit :
> On Thu, Sep 01, 2022 at 09:32:46AM +, Christophe Leroy wrote:
>> Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
>>> +int arch_decode_instruction(struct objtool_file *file, const struct
>>> section *sec,
>>> + un
Le 09/07/2022 à 08:52, Ard Biesheuvel a écrit :
> Hello Christophe,
>
> On Fri, 8 Jul 2022 at 19:32, Christophe Leroy
> wrote:
>>
>> This series applies on top of the series v3 "objtool: Enable and
>> implement --mcount option on powerpc" [1] rebased on powerpc-next branch
>>
>> A few modificat
On Wed, Aug 31, 2022 at 7:05 PM Joe Lawrence wrote:
>
> On Wed, Aug 31, 2022 at 03:48:26PM -0700, Song Liu wrote:
> > On Wed, Aug 31, 2022 at 3:30 PM Michael Ellerman
> > wrote:
> > >
> > > Joe Lawrence writes:
> > > > On Tue, Aug 30, 2022 at 11:53:13AM -0700, Song Liu wrote:
> > > >> From: Mir
From: Miroslav Benes
Josh reported a bug:
When the object to be patched is a module, and that module is
rmmod'ed and reloaded, it fails to load with:
module: x86/modules: Skipping invalid relocation target, existing value is
nonzero for type 2, loc ba0302e9, val a03e293c
On Thu, Sep 01, 2022 at 07:47:10AM +, Christophe Leroy wrote:
> Le 01/09/2022 à 09:37, Gabriel Paubert a écrit :
> > Agree, but there is one thing which escapes me: why is r3 listed in the
> > outputs section (actually as a read write operand with the "+"
> > constraint modifier) but is not use
On Thu, Sep 01, 2022 at 09:37:42AM +0200, Gabriel Paubert wrote:
> On Thu, Sep 01, 2022 at 05:22:32AM +, Christophe Leroy wrote:
> > Le 01/09/2022 à 00:45, Segher Boessenkool a écrit :
> > > I would have used real assembler code here (in a .s file). But there
> > > probably are reasons to do t
Hello,
This series contains some fixes and optimizations of aer api usage.
We add some process to clear uncorrectable error status, then add
distinction between fatal and nonfatal situations in pcie_do_recovery()
and reduce some redundant code. The series involves pci driver and
vendor driver.
Th
Status bits for ERR_NONFATAL errors only are cleared in
pci_aer_clear_nonfatal_status(), but we want clear uncorrectable
error status in ntb_hw_idt.c and lpfc_attr.c. So we add
pci_aer_clear_uncorrect_error_status() and change to use it.
Use pci_aer_clear_nonfatal_status() in dpc_process_error(),
When state is pci_channel_io_frozen in pcie_do_recovery(),
the severity is fatal and fatal status should be cleared.
So we add pci_aer_clear_fatal_status().
Since pcie_aer_is_native() in pci_aer_clear_fatal_status()
and pci_aer_clear_nonfatal_status() contains the function of
'if (host->native_aer
Statements clearing AER error status in aer_enable_rootport() has the
same function as pci_aer_raw_clear_status(). So we replace them, which
has no functional changes.
Signed-off-by: Zhuo Chen
---
drivers/pci/pcie/aer.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dr
On Thu, Sep 01, 2022 at 04:38:52PM +, Christophe Leroy wrote:
> objtool is a userland app, there is no access to kernel headers here.
Please have a look at tools/include/ :-)
On Mon, Aug 29, 2022 at 11:22:12AM +0530, Sathvika Vasireddy wrote:
> With objtool enabled, below warnings are seen when trying to build:
>
> drivers/crypto/vmx/aesp8-ppc.o: warning: objtool:
> aes_p8_set_encrypt_key+0x44: unannotated intra-function call
>
> drivers/crypto/vmx/aesp8-ppc.o: warni
On Mon, Aug 29, 2022 at 11:22:14AM +0530, Sathvika Vasireddy wrote:
> Do not run objtool on VDSO files, by using
> OBJECT_FILES_NON_STANDARD
>
> Suggested-by: Christophe Leroy
> Signed-off-by: Sathvika Vasireddy
> ---
> arch/powerpc/kernel/vdso/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
On Mon, Aug 29, 2022 at 11:22:15AM +0530, Sathvika Vasireddy wrote:
> From: Christophe Leroy
>
> find_insn() will return NULL in case of failure. Check insn in order
> to avoid a kernel Oops for NULL pointer dereference.
>
> Signed-off-by: Christophe Leroy
> ---
> tools/objtool/check.c | 2 +-
On Mon, Aug 29, 2022 at 11:22:16AM +0530, Sathvika Vasireddy wrote:
> From: Christophe Leroy
>
> Some architectures like powerpc support both endianness, it's
> therefore not possible to fix the endianness via arch/endianness.h
> because there is no easy way to get the target endianness at
> buil
On Mon, Aug 29, 2022 at 11:22:17AM +0530, Sathvika Vasireddy wrote:
> From: Christophe Leroy
>
> In order to allow using objtool on cross-built kernels,
> determine size of long from elf data instead of using
> sizeof(long) at build time.
>
> For the time being this covers only mcount.
>
> Sign
On Mon, Aug 29, 2022 at 11:22:18AM +0530, Sathvika Vasireddy wrote:
> Architectures can select HAVE_NOP_MCOUNT if they choose
> to nop out mcount call sites. If that config option is
> selected, then --mnop is passed as an option to objtool,
> along with --mcount.
>
> Also, make sure that --mnop c
On Mon, Aug 29, 2022 at 11:22:20AM +0530, Sathvika Vasireddy wrote:
> Make relocation types architecture specific.
>
> Signed-off-by: Sathvika Vasireddy
Acked-by: Peter Zijlstra (Intel)
On Thu, Sep 01, 2022 at 01:48:21PM +0200, Christophe Leroy wrote:
> In order to allow other architectures than x86 to use 32 bits
> PC relative relocations (S+A-P), define a R_REL32 macro that each
> architecture will define, in the same way as already done for
> R_NONE, R_ABS32 and R_ABS64.
>
> F
On Thu, Sep 01, 2022 at 05:41:33AM +, Christophe Leroy wrote:
> I think it would be worth a GCC bug report.
We need a stand-alone testcase for this. When you have created one, at
least 98% of the time you discover the bug is in user code after all.
Which is a very good thing, it means the pr
On Thu, Sep 01, 2022 at 10:35:11AM -0700, Suren Baghdasaryan wrote:
> Set ARCH_SUPPORTS_PER_VMA_LOCK so that the per-VMA lock support can be
> compiled on this architecture.
>
> Signed-off-by: Suren Baghdasaryan
> ---
> arch/x86/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/a
On Thu, Sep 01, 2022 at 10:34:52AM -0700, Suren Baghdasaryan wrote:
> Move mmap_lock assert function definitions up so that they can be used
> by other mmap_lock routines.
>
> Signed-off-by: Suren Baghdasaryan
> ---
> include/linux/mmap_lock.h | 24
> 1 file changed, 12
On Thu, Sep 01, 2022 at 10:34:51AM -0700, Suren Baghdasaryan wrote:
> Add __find_vma function to be used for VMA lookup under rcu protection.
So it was news to me that the rb tree code can be used for lockless lookups -
not having looked at lib/rbtree.c in over 10 years :) - I still think it shoul
* Kent Overstreet [220901 16:24]:
> On Thu, Sep 01, 2022 at 10:34:52AM -0700, Suren Baghdasaryan wrote:
> > Move mmap_lock assert function definitions up so that they can be used
> > by other mmap_lock routines.
> >
> > Signed-off-by: Suren Baghdasaryan
> > ---
> > include/linux/mmap_lock.h | 2
On Thu, Sep 01, 2022 at 10:34:48AM -0700, Suren Baghdasaryan wrote:
> Resending to fix the issue with the In-Reply-To tag in the original
> submission at [4].
>
> This is a proof of concept for per-vma locks idea that was discussed
> during SPF [1] discussion at LSF/MM this year [2], which conclud
The of-tree subsystem does not currently preserve the IBM vTPM 1.2 and
vTPM 2.0 measurement logs across a kexec on PowerVM and PowerKVM. This
series fixes this for the kexec_file_load() syscall using the flattened
device tree (fdt) to carry the TPM measurement log's buffer across kexec.
Stefan
From: Palmer Dabbelt
RISC-V recently added kexec_file() support, which uses enables kexec
IMA. We're the first 32-bit platform to support this, so we found a
build bug.
Acked-by: Rob Herring
Signed-off-by: Palmer Dabbelt
Reviewed-by: Mimi Zohar
---
drivers/of/kexec.c | 4 ++--
1 file change
Simplify tpm_read_log_of() by moving reusable parts of the code into
an inline function that makes it commonly available so it can be
used also for kexec support. Call the new of_tpm_get_sml_parameters()
function from the TPM Open Firmware driver.
Signed-off-by: Stefan Berger
Cc: Jarkko Sakkinen
Refactor IMA buffer related functions to make them reusable for carrying
TPM logs across kexec.
Signed-off-by: Stefan Berger
Cc: Rob Herring
Cc: Frank Rowand
Cc: Mimi Zohar
Reviewed-by: Mimi Zohar
Reviewed-by: Rob Herring
Tested-by: Nageswara R Sastry
Tested-by: Coiby Xu
---
v6:
- Add __
The memory area of the TPM measurement log is currently not properly
duplicated for carrying it across kexec when an Open Firmware
Devicetree is used. Therefore, the contents of the log get corrupted.
Fix this for the kexec_file_load() syscall by allocating a buffer and
copying the contents of the
On Tue, Aug 16, 2022 at 08:57:13AM +0530, Ganesh Goudar wrote:
> Hi,
>
> EEH reocvery is currently serialized and these patches shorten
> the time taken for EEH recovery by making the recovery to run
> in parallel. The original author of these patches is Sam Bobroff,
> I have rebased and tested th
On Thu, Jul 14, 2022 at 06:18:19PM +1000, Alexey Kardashevskiy wrote:
> Here is another take on iommu_ops on POWER to make VFIO work
> again on POWERPC64.
>
> The tree with all prerequisites is here:
> https://github.com/aik/linux/tree/kvm-fixes-wip
>
> The previous discussion is here:
> https://
When clearing a PTE the TLB should be flushed whilst still holding the
PTL to avoid a potential race with madvise/munmap/etc. For example
consider the following sequence:
CPU0 CPU1
migrate_vma_collect_pmd()
pte_unmap_unlock()
Currently we only call flush_cache_page() for the anon_exclusive case,
however in both cases we clear the pte so should flush the cache.
Signed-off-by: Alistair Popple
Fixes: 8c3328f1f36a ("mm/migrate: migrate_vma() unmap page from vma while
collecting pages")
Cc: sta...@vger.kernel.org
---
Ne
migrate_vma_setup() has a fast path in migrate_vma_collect_pmd() that
installs migration entries directly if it can lock the migrating page.
When removing a dirty pte the dirty bit is supposed to be carried over
to the underlying page to prevent it being lost.
Currently migrate_vma_*() can only be
We were not correctly copying PTE dirty bits to pages during
migrate_vma_setup() calls. This could potentially lead to data loss, so
add a test for this.
Signed-off-by: Alistair Popple
---
tools/testing/selftests/vm/hmm-tests.c | 124 ++-
1 file changed, 124 insertions(+)
On Thu, Sep 01, 2022 at 05:46:08PM -0400, Stefan Berger wrote:
> Simplify tpm_read_log_of() by moving reusable parts of the code into
> an inline function that makes it commonly available so it can be
> used also for kexec support. Call the new of_tpm_get_sml_parameters()
> function from the TPM Op
On 2022-09-01 16:24:09 [-0400], Kent Overstreet wrote:
> > --- a/include/linux/mmap_lock.h
> > +++ b/include/linux/mmap_lock.h
> > @@ -60,6 +60,18 @@ static inline void __mmap_lock_trace_released(struct
> > mm_struct *mm, bool write)
> >
> > #endif /* CONFIG_TRACING */
> >
> > +static inline
On 02.09.22 02:35, Alistair Popple wrote:
> Currently we only call flush_cache_page() for the anon_exclusive case,
> however in both cases we clear the pte so should flush the cache.
>
> Signed-off-by: Alistair Popple
> Fixes: 8c3328f1f36a ("mm/migrate: migrate_vma() unmap page from vma while
>
On 02.09.22 02:35, Alistair Popple wrote:
> When clearing a PTE the TLB should be flushed whilst still holding the
> PTL to avoid a potential race with madvise/munmap/etc. For example
> consider the following sequence:
>
> CPU0 CPU1
>
On 02.09.22 02:35, Alistair Popple wrote:
> migrate_vma_setup() has a fast path in migrate_vma_collect_pmd() that
> installs migration entries directly if it can lock the migrating page.
> When removing a dirty pte the dirty bit is supposed to be carried over
> to the underlying page to prevent it
61 matches
Mail list logo