Le 16/10/2021 à 08:41, Christophe Leroy a écrit :
Le 15/10/2021 à 23:32, Kees Cook a écrit :
On Thu, Oct 14, 2021 at 07:50:00AM +0200, Christophe Leroy wrote:
Behind its location, lkdtm_EXEC_RODATA() executes
lkdtm_rodata_do_nothing() which is a real function,
not a copy of do_nothing().
On Mon, 11 Oct 2021 09:02:03 +0200, Cédric Le Goater wrote:
> When an interrupt is passed through, the KVM XIVE device calls the
> set_vcpu_affinity() handler which raises the P bit to mask the
> interrupt and to catch any in-flight interrupts while routing the
> interrupt to the guest.
>
> On the
On Sat, 16 Oct 2021 00:39:28 +1100, Michael Ellerman wrote:
> In commit 10d91611f426 ("powerpc/64s: Reimplement book3s idle code in
> C") kvm_start_guest() became idle_kvm_start_guest(). The old code
> allocated a stack frame on the emergency stack, but didn't use the
> frame to store anything, and
On Thu, 7 Oct 2021 12:25:01 +0530, Athira Rajeev wrote:
> Patch set adds PMU registers namely Sampled Instruction Address Register
> (SIAR) and Sampled Data Address Register (SDAR) as part of extended regs
> in PowerPC. These registers provides the instruction/data address and
> adding these to ext
On Thu, 7 Oct 2021 13:21:21 +0530, Athira Rajeev wrote:
> From: Athira Rajeev
>
> In power9 and before platforms, the default event used for cyles and
> instructions is PM_CYC (0x0001e) and PM_INST_CMPL (0x2) respectively.
> These events uses two programmable PMCs and by default will count
>
On Tue, 12 Oct 2021 12:40:37 +0200, Christophe Leroy wrote:
> max_mapnr is used by virt_addr_valid() to check if a linear
> address is valid.
>
> It must only include lowmem PFNs, like other architectures.
>
> Problem detected on a system with 1G mem (Only 768M are mapped), with
> CONFIG_DEBUG_VI
On Mon, 11 Oct 2021 09:03:56 +0200, Cédric Le Goater wrote:
> CONFIG_PPC64_BOOT_WRAPPER is selected by CPU_LITTLE_ENDIAN which is
> used to compile support for other platforms such as Microwatt. There
> is no need for OPAL calls on these.
>
>
Applied to powerpc/next.
[1/1] powerpc/boot: Use CON
On Sat, 9 Oct 2021 12:16:30 +0800, Kai Song wrote:
> We fix the following warnings when building kernel with W=1:
> arch/powerpc/kernel/eeh.c:598: warning: Function parameter or member
> 'function' not described in 'eeh_pci_enable'
> arch/powerpc/kernel/eeh.c:774: warning: Function parameter or me
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Hi Linus,
Please pull some more powerpc fixes for 5.15:
The following changes since commit eb8257a12192f43ffd41bd90932c39dade958042:
pseries/eeh: Fix the kdump kernel crash during eeh_pseries_init (2021-10-07
23:37:22 +1100)
are available in t
There are three architectures with function descriptors, try to
have common names for the address they contain in order to
refactor some functions into generic functions later.
powerpc has 'entry'
ia64 has 'ip'
parisc has 'addr'
Vote for 'addr' and update 'func_descr_t' accordingly.
Move it in a
WRITE_KERN is supposed to overwrite some kernel text, namely
do_overwritten() function.
But at the time being it overwrites do_overwritten() function
descriptor, not function text.
Fix it by dereferencing the function descriptor to obtain
function text pointer.
And make do_overwritten() noinline
LKDTM tests display that the run do_nothing() at a given
address, but in reality do_nothing() is inlined into the
caller.
Force it out of line so that it really runs text at the
displayed address.
Acked-by: Kees Cook
Signed-off-by: Christophe Leroy
---
drivers/misc/lkdtm/perms.c | 4 ++--
1 fi
'struct ppc64_opd_entry' doesn't belong to uapi/asm/elf.h
It was initially in module_64.c and commit 2d291e902791 ("Fix compile
failure with non modular builds") moved it into asm/elf.h
But it was by mistake added outside of __KERNEL__ section,
therefore commit c3617f72036c ("UAPI: (Scripted) Dis
'struct ppc64_opd_entry' is somehow redundant with 'struct func_desc',
the later is more correct/complete as it includes the third
field which is unused.
So use 'struct func_desc' instead of 'struct ppc64_opd_entry'
Reviewed-by: Kees Cook
Reviewed-by: Daniel Axtens
Reviewed-by: Nicholas Piggin
There are three architectures with function descriptors, try to
have common names for the address they contain in order to
refactor some functions into generic functions later.
powerpc has 'entry'
ia64 has 'ip'
parisc has 'addr'
Vote for 'addr' and update 'struct fdesc' accordingly.
Reviewed-by:
dereference_function_descriptor() and
dereference_kernel_function_descriptor() are identical on the
three architectures implementing them.
Make them common and put them out-of-line in kernel/extable.c
which is one of the users and has similar type of functions.
Reviewed-by: Kees Cook
Reviewed-by
Add WRITE_OPD to check that you can't modify function
descriptors.
Gives the following result when function descriptors are
not protected:
lkdtm: Performing direct entry WRITE_OPD
lkdtm: attempting bad 16 bytes write at c269b358
lkdtm: FAIL: survived bad write
In preparation of making func_desc_t generic, change the ELFv2
version to a struct containing 'addr' element.
This allows using single helpers common to ELFv1 and ELFv2.
Signed-off-by: Christophe Leroy
---
arch/powerpc/kernel/module_64.c | 32 ++--
1 file changed, 14
PPC64/IA64/PARISC have function descriptors. LKDTM doesn't work
on those three architectures because LKDTM messes up function
descriptors with functions.
This series does some cleanup in the three architectures and
refactors function descriptors so that it can then easily use it
in a generic way i
Replace HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR by a config option
named CONFIG_HAVE_FUNCTION_DESCRIPTORS and use it instead of
'dereference_function_descriptor' macro to know whether an
arch has function descriptors.
To limit churn in one of the following patches, use
an #ifdef/#else construct with
We have three architectures using function descriptors, each with its
own type and name.
Add a common typedef that can be used in generic code.
Also add a stub typedef for architecture without function descriptors,
to avoid a forest of #ifdefs.
It replaces the similar 'func_desc_t' previously de
execute_location() and execute_user_location() intent
to copy do_nothing() text and execute it at a new location.
However, at the time being it doesn't copy do_nothing() function
but do_nothing() function descriptor which still points to the
original text. So at the end it still executes do_nothing
Hi Luis,
On 10/15/21 4:52 PM, Luis Chamberlain wrote:
> This patch set consists of al the straggler drivers for which we have
> have no patch reviews done for yet. I'd like to ask for folks to please
> consider chiming in, specially if you're the maintainer for the driver.
> Additionally if you ca
All EXEC tests are based on running a copy of do_nothing()
except lkdtm_EXEC_RODATA which uses a different function
called lkdtm_rodata_do_nothing().
On architectures using function descriptors, EXEC tests are
performed using execute_location() which is a function
that most of the time copies do_n
randconfig-c002-20211017
i386 randconfig-c001-20211017
x86_64 randconfig-c001-20211017
ia64 allmodconfig
ia64 allyesconfig
nios2 defconfig
arc
randconfig-c002-20211017
i386 randconfig-c001-20211017
x86_64 randconfig-c001-20211017
ia64 allmodconfig
ia64 allyesconfig
nios2 defconfig
arc
fconfig
shsh7763rdp_defconfig
arm u8500_defconfig
powerpc tqm8xx_defconfig
arm mainstone_defconfig
sh r7785rp_defconfig
arm randconfig-c002-202
-20211017
i386 randconfig-c001-20211017
x86_64 randconfig-c001-20211017
ia64 allmodconfig
ia64 allyesconfig
m68k allmodconfig
m68k allyesconfig
nios2
Fix following coccicheck warning:
./arch/powerpc/kexec/file_load_64.c:698:1-22: WARNING: Function
for_each_node_by_type should have of_node_put() before goto
Early exits from for_each_node_by_type should decrement the
node reference counter.
Signed-off-by: Wan Jiabing
---
arch/powerpc/kexec/fil
The testing show that perf_ftrace_function_call() are using smp_processor_id()
with preemption enabled, all the checking on CPU could be wrong after
preemption.
As Peter point out, the section between ftrace_test_recursion_trylock/unlock()
pair require the preemption to be disabled as
'Documenta
As the documentation explained, ftrace_test_recursion_trylock()
and ftrace_test_recursion_unlock() were supposed to disable and
enable preemption properly, however currently this work is done
outside of the function, which could be missing by mistake.
And since the internal using of trace_test_and
With CONFIG_DEBUG_PREEMPT we observed reports like:
BUG: using smp_processor_id() in preemptible
caller is perf_ftrace_function_call+0x6f/0x2e0
CPU: 1 PID: 680 Comm: a.out Not tainted
Call Trace:
dump_stack_lvl+0x8d/0xcf
check_preemption_disabled+0x104/0x110
? optimize_nops.is
Peter Zijlstra writes:
> On Wed, Oct 06, 2021 at 07:36:50PM +0530, Kajol Jain wrote:
>
>> Kajol Jain (4):
>> perf: Add comment about current state of PERF_MEM_LVL_* namespace and
>> remove an extra line
>> perf: Add mem_hops field in perf_mem_data_src structure
>> tools/perf: Add mem_hop
The pull request you sent on Sun, 17 Oct 2021 23:36:20 +1100:
> https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
> tags/powerpc-5.15-4
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/be9eb2f00fa7245116d49f76614054cce8e07af8
Thank you!
--
Deet-doot-d
Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm:
> There are three architectures with function descriptors, try to
> have common names for the address they contain in order to
> refactor some functions into generic functions later.
>
> powerpc has 'entry'
> ia64 has 'ip'
> pa
On 14-10-21, 11:40, Anatolij Gustschin wrote:
> memset() and memcpy() on an MMIO region like here results in a
> lockup at startup on mpc5200 platform (since this first happens
> during probing of the ATA and Ethernet drivers). Use memset_io()
> and memcpy_toio() instead.
Applied, thanks
--
~Vin
Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm:
> In preparation of making func_desc_t generic, change the ELFv2
> version to a struct containing 'addr' element.
>
> This allows using single helpers common to ELFv1 and ELFv2.
>
> Signed-off-by: Christophe Leroy
> ---
> a
Excerpts from Christophe Leroy's message of October 17, 2021 10:38 pm:
> We have three architectures using function descriptors, each with its
> own type and name.
>
> Add a common typedef that can be used in generic code.
>
> Also add a stub typedef for architecture without function descriptors,
38 matches
Mail list logo