Re: [PATCH v3 3/6] powwerpc: Use note name macros

2025-01-07 Thread LEROY Christophe
Le 07/01/2025 à 13:45, Akihiko Odaki a écrit : > Use note name macros to match with the userspace's expectation. In the subject: s/powwerpc/powerpc Christophe > > Acked-by: Baoquan He > Signed-off-by: Akihiko Odaki > --- > arch/powerpc/kernel/fadump.c | 2 +- > arch/powerp

Re: [PATCH v2 2/3] drm/fbdev: Select FB_CORE dependency for fbdev on DMA and TTM

2024-12-12 Thread LEROY Christophe
Le 12/12/2024 à 11:04, Thomas Zimmermann a écrit : > Select FB_CORE if GEM's DMA and TTM implementations support fbdev > emulation. Fixes linker errors about missing symbols from the fbdev > subsystem. > > Also see [1] for a related SHMEM fix. > > Fixes: dadd28d4142f ("drm/client: Add client-li

Re: [PATCH 06/19] soc/qman: test: Use kthread_run_on_cpu()

2024-12-12 Thread LEROY Christophe
Le 11/12/2024 à 16:40, Frederic Weisbecker a écrit : > Use the proper API instead of open coding it. > > However it looks like kthreads here could be replaced by the use of a > per-cpu workqueue instead. > > Signed-off-by: Frederic Weisbecker Acked-by: Christophe Leroy > --- > drivers/soc

Re: [PATCH v2 00/21] Converge on using secs_to_jiffies()

2024-11-16 Thread LEROY Christophe
Le 15/11/2024 à 22:26, Easwar Hariharan a écrit : > [Vous ne recevez pas souvent de courriers de eahar...@linux.microsoft.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > This is a series that follows up on my previous series to introduce > se

Re: Are 256K page sizes really a thing (on ppc64le in particular)?

2024-09-28 Thread LEROY Christophe
Le 28/09/2024 à 18:08, Florian Weimer a écrit : > I'm working on adding a header to glibc, so that > programmers can easily determine the range of possible page sizes for a > particular target, for things like pointer tagging and mapped file > alignment requirements. > > I'm not familiar from t

Re: linux-next: build failure after merge of the net-next tree

2024-09-13 Thread LEROY Christophe
Le 13/09/2024 à 17:49, Jakub Kicinski a écrit : > On Fri, 13 Sep 2024 08:34:26 -0700 Jakub Kicinski wrote: >>> The second "asm" above (CONFIG_PPC_KERNEL_PREFIXED is not set). I am >>> guessing by searching for "39" in net/core/page_pool.s >>> >>> This is maybe called from page_pool_unref_netmem(

Re: [PATCH] random: vDSO: Redefine PAGE_SIZE and PAGE_MASK

2024-08-27 Thread LEROY Christophe
Hi Vicenzo, Le 27/08/2024 à 18:05, Vincenzo Frascino a écrit : > Hi Christophe, > > On 27/08/2024 11:49, Christophe Leroy wrote: > > ... > > > > I agree with Arnd here. uapi/linux/mman.h can cause us problems in the long > run. > > I am attaching a patch to provide my view on how to minimiz

Re: [PATCH v2 06/17] vdso: Change getrandom's generation to unsigned long

2024-08-26 Thread LEROY Christophe
Le 26/08/2024 à 11:43, Thomas Gleixner a écrit : > On Mon, Aug 26 2024 at 10:01, Christophe Leroy wrote: >> Le 26/08/2024 à 09:50, Jason A. Donenfeld a écrit : >>> But tglx pointed out in that thread that this actually isn't necessary: >>> >>> | All of this is pointless because if a 32-bit applic

Re: [PATCH v2 16/17] selftests: vdso: Make VDSO function call more generic

2024-08-26 Thread LEROY Christophe
Le 26/08/2024 à 09:37, Jason A. Donenfeld a écrit : > On Thu, Aug 22, 2024 at 09:13:24AM +0200, Christophe Leroy wrote: >> On powerpc, a call to a VDSO function is not a standard C function >> call. Unlike x86 that returns a negated error code in case of an >> error, powerpc sets CR[SO] and retur

Re: [PATCH v2 14/17] selftests: vdso: Make test_vdso_getrandom look for the right vDSO function

2024-08-26 Thread LEROY Christophe
Le 26/08/2024 à 09:28, Jason A. Donenfeld a écrit : > On Thu, Aug 22, 2024 at 09:13:22AM +0200, Christophe Leroy wrote: >> Don't hard-code x86 specific names, use vdso_config definitions >> to find the correct function matching the architecture. >> >> Add random VDSO function names in names[][].

Re: perf build failure with v6.11-rc4 (commit 4bbe60029319 ("perf daemon: Fix the build on 32-bit architectures"))

2024-08-25 Thread LEROY Christophe
Le 21/08/2024 à 12:03, Arnaldo Carvalho de Melo a écrit : > > > > > On Wed, Aug 21, 2024, 6:06 AM LEROY Christophe > <mailto:christophe.ler...@cs-soprasteria.com>> wrote: > > Got the following build failure on v6.11-rc4, see > https://github.com/ch

Re: [PATCH v2] powerpc: warn on emulation of dcbz instruction in kernel mode

2024-08-24 Thread LEROY Christophe
Le 23/08/2024 à 21:19, Segher Boessenkool a écrit : > ***ATTENTION, Sopra Steria Group cannot confirm the identity of this email > sender (SPF record failure). This might be a fake email from an attacker, if > you have any doubts report and delete the email.*** > > ***ATTENTION, Sopra Steria G

Re: [PATCH RFC 2/6] mm: PGTABLE_HAS_P[MU]D_LEAVES config options

2024-08-22 Thread LEROY Christophe
Le 22/08/2024 à 21:16, Peter Xu a écrit : > On Thu, Aug 22, 2024 at 05:22:03PM +0000, LEROY Christophe wrote: >> >> >> Le 18/07/2024 à 00:02, Peter Xu a écrit : >>> Introduce two more sub-options for PGTABLE_HAS_HUGE_LEAVES: >>> >>> - P

Re: [PATCH RFC 2/6] mm: PGTABLE_HAS_P[MU]D_LEAVES config options

2024-08-22 Thread LEROY Christophe
Le 18/07/2024 à 00:02, Peter Xu a écrit : > Introduce two more sub-options for PGTABLE_HAS_HUGE_LEAVES: > >- PGTABLE_HAS_PMD_LEAVES: set when there can be PMD mappings >- PGTABLE_HAS_PUD_LEAVES: set when there can be PUD mappings > > It will help to identify whether the current build ma

Re: Kernel build failure with MEM_ALLOC_PROFILING=y set (Talos II, v6.10-rc5)

2024-08-22 Thread LEROY Christophe
Le 21/07/2024 à 01:09, Erhard Furtner a écrit : > [Vous ne recevez pas souvent de courriers de erhar...@mailbox.org. D?couvrez > pourquoi ceci est important ? https://aka.ms/LearnAboutSenderIdentification ] > > On Sat, 29 Jun 2024 15:31:28 +0200 > Erhard Furtner wrote: > >> I get a build fail

Re: [PATCH RFC 0/6] mm: THP-agnostic refactor on huge mappings

2024-08-22 Thread LEROY Christophe
Le 23/07/2024 à 23:04, Peter Xu a écrit : >> >>> >>> Nornally I don't see this as much of a "code churn" category, because it >>> doesn't changes the code itself but only move things. I personally also >>> prefer without code churns, but only in the case where there'll be tiny >>> little functio

Re: [PATCH v1] powerpc/pseries/eeh: Fix pseries_eeh_err_inject

2024-08-22 Thread LEROY Christophe
Le 22/08/2024 à 10:27, Narayana Murty N a écrit : > [Vous ne recevez pas souvent de courriers de nnmli...@linux.ibm.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > VFIO_EEH_PE_INJECT_ERR ioctl is currently failing on pseries > due to missing

Re: [PATCH -next 1/4] powerpc: Remove obsoleted declaration for _get_SP

2024-08-22 Thread LEROY Christophe
Le 22/08/2024 à 15:06, Gaosheng Cui a écrit : > [Vous ne recevez pas souvent de courriers de cuigaoshe...@huawei.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > The _get_SP() have been removed since > commit 917f0af9e5a9 ("powerpc: Remove ar

Re: [PATCH v2] powerpc: warn on emulation of dcbz instruction in kernel mode

2024-08-21 Thread LEROY Christophe
Le 22/08/2024 à 07:32, Christoph Hellwig a écrit : > On Thu, Aug 22, 2024 at 05:25:10AM +0000, LEROY Christophe wrote: >>> and this results in a call to dma_direct_allocation(), which has one >>> innocent looking memset(): >> >> >> memset() can't be u

Re: [PATCH v2] powerpc: warn on emulation of dcbz instruction in kernel mode

2024-08-21 Thread LEROY Christophe
+ CC Christoph Hellwig Hi, Le 22/08/2024 à 00:39, Christian Lamparter a écrit : > [Vous ne recevez pas souvent de courriers de > christian.lampar...@isd.uni-stuttgart.de. Découvrez pourquoi ceci est > important à https://aka.ms/LearnAboutSenderIdentification ] > > Sorry to write a reply to this o

Re: [PATCH 06/14] mm: handle_pte_fault() use pte_offset_map_maywrite_nolock()

2024-08-21 Thread LEROY Christophe
Le 21/08/2024 à 10:18, Qi Zheng a écrit : > In handle_pte_fault(), we may modify the vmf->pte after acquiring the > vmf->ptl, so convert it to using pte_offset_map_maywrite_nolock(). But > since we already do the pte_same() check, so there is no need to get > pmdval to do pmd_same() check, just p

perf build failure with v6.11-rc4 (commit 4bbe60029319 ("perf daemon: Fix the build on 32-bit architectures"))

2024-08-21 Thread LEROY Christophe
Got the following build failure on v6.11-rc4, see https://github.com/chleroy/linux/actions/runs/10485680041/job/29042302519 builtin-daemon.c: In function 'cmd_session_list': Error: builtin-daemon.c:692:16: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has

Re: Question about AER in latest kernels (text format)

2024-08-20 Thread LEROY Christophe
Hi, Le 20/08/2024 à 09:54, Amori, Alberto a écrit : > > I guess that with the new kernels the AER is implicitly enabled when > installing the device (e.g. when pci_device_add is called), but can you > confirm this? > Or maybe the call of pci_enable_pcie_error_reporting() was superfluous also >

Re: [RFC PATCH 00/18] use struct ptdesc to replace pgtable_t

2024-08-14 Thread LEROY Christophe
Hi, Le 30/07/2024 à 08:46, al...@kernel.org a écrit : > From: Alex Shi > > We have struct ptdesc for page table descriptor a year ago, but it > has no much usages in kernel, while pgtable_t is used widely. > > The pgtable_t is typedefed as 'pte_t *' in sparc, s390, powerpc and m68k > except SUN

Re: [PATCH v7 16/23] powerpc/e500: Switch to 64 bits PGD on 85xx (32 bits)

2024-07-31 Thread LEROY Christophe
Hi Guenter, Thanks for this report. I'm afk this week, i"ll have a look at it in more détails next week. But to be sûre, does that Oops match the bisected commit ? Because pmd_leaf() for e500 doesn't exist yet so pmd_write() shouldnt be called. I did validate all my changes with mpc8544 on qemu

Re: [PATCH v2 07/10] soc: fsl: cpm1: qmc: Introduce functions to get a channel from a phandle list

2024-07-12 Thread LEROY Christophe
Le 04/07/2024 à 05:01, Michael Ellerman a écrit : > Mark Brown writes: >> On Mon, Jul 01, 2024 at 01:30:34PM +0200, Herve Codina wrote: >>> qmc_chan_get_byphandle() and the resource managed version retrieve a >>> channel from a simple phandle. >>> >>> Extend the API and introduce qmc_chan_get_by

Re: [PATCH v4 17/21] mm/mmap: Drop arch_unmap() call from all archs

2024-07-11 Thread LEROY Christophe
Le 11/07/2024 à 01:26, Liam R. Howlett a écrit : > * LEROY Christophe [240710 17:02]: >> >> >> Le 10/07/2024 à 21:22, Liam R. Howlett a écrit : >>> From: "Liam R. Howlett" >>> >>> The arch_unmap call was previously moved above the rbt

Re: [PATCH v3 16/16] mm/mmap: Move may_expand_vm() check in mmap_region()

2024-07-10 Thread LEROY Christophe
Le 10/07/2024 à 18:09, Liam R. Howlett a écrit : > * LEROY Christophe [240710 08:59]: >> > ... >>>>>> >>>>>> Assuming the removal of the vdso does not cause the application to seg >>>>>> fault, then the user visible change is t

Re: [PATCH v4 17/21] mm/mmap: Drop arch_unmap() call from all archs

2024-07-10 Thread LEROY Christophe
Le 10/07/2024 à 21:22, Liam R. Howlett a écrit : > From: "Liam R. Howlett" > > The arch_unmap call was previously moved above the rbtree modifications > in commit 5a28fc94c914 ("x86/mpx, mm/core: Fix recursive munmap() > corruption"). The move was motivated by an issue with calling > arch_unma

Re: [PATCH v3 16/16] mm/mmap: Move may_expand_vm() check in mmap_region()

2024-07-10 Thread LEROY Christophe
Le 10/07/2024 à 14:45, Lorenzo Stoakes a écrit : > On Wed, Jul 10, 2024 at 10:28:01PM GMT, Michael Ellerman wrote: >> Lorenzo Stoakes writes: >>> On Mon, Jul 08, 2024 at 04:43:15PM GMT, Liam R. Howlett wrote: >> ... The functionality here has changed --- from --- may_expand_v

Re: [PATCH v6 21/23] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-06-24 Thread LEROY Christophe
Le 25/06/2024 à 06:49, Nicholas Piggin a écrit : > On Tue Jun 25, 2024 at 12:45 AM AEST, Christophe Leroy wrote: >> On book3s/64, the only user of hugepd is hash in 4k mode. >> >> All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD. >> >> Rework hash-4k to use contiguous PMD and PUD in

Re: [PATCH v5 16/18] powerpc/64s: Use contiguous PMD/PUD instead of HUGEPD

2024-06-24 Thread LEROY Christophe
Le 13/06/2024 à 09:39, Oscar Salvador a écrit : > On Mon, Jun 10, 2024 at 07:55:01AM +0200, Christophe Leroy wrote: >> On book3s/64, the only user of hugepd is hash in 4k mode. >> >> All other setups (hash-64, radix-4, radix-64) use leaf PMD/PUD. >> >> Rework hash-4k to use contiguous PMD and PUD

Re: [PATCH 07/15] parisc: use generic sys_fanotify_mark implementation

2024-06-20 Thread LEROY Christophe
Le 20/06/2024 à 23:21, Helge Deller a écrit : > [Vous ne recevez pas souvent de courriers de del...@gmx.de. Découvrez > pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > On 6/20/24 18:23, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The sys_fanotify_mark()

Re: [PATCH v12 00/11] Support page table check PowerPC

2024-06-18 Thread LEROY Christophe
Le 02/04/2024 à 07:11, Rohan McLure a écrit : > Support page table check on all PowerPC platforms. This works by > serialising assignments, reassignments and clears of page table > entries at each level in order to ensure that anonymous mappings > have at most one writable consumer, and likewise

Re: [PATCH v5 02/18] mm: Define __pte_leaf_size() to also take a PMD entry

2024-06-13 Thread LEROY Christophe
Le 13/06/2024 à 09:19, Oscar Salvador a écrit : > On Tue, Jun 11, 2024 at 07:00:14PM +0000, LEROY Christophe wrote: >> We have space available in PMD if we need more flags, but in PTE I can't >> see anything possible without additional churn that would require >> addi

Re: [PATCH v5 02/18] mm: Define __pte_leaf_size() to also take a PMD entry

2024-06-11 Thread LEROY Christophe
Le 11/06/2024 à 18:10, Oscar Salvador a écrit : > [Vous ne recevez pas souvent de courriers de osalva...@suse.de. D?couvrez > pourquoi ceci est important ? https://aka.ms/LearnAboutSenderIdentification ] > > On Tue, Jun 11, 2024 at 11:20:01AM -0400, Peter Xu wrote: >> On Tue, Jun 11, 2024 at 05

Re: [PATCH v5 02/18] mm: Define __pte_leaf_size() to also take a PMD entry

2024-06-11 Thread LEROY Christophe
Le 11/06/2024 à 17:08, Oscar Salvador a écrit : > [Vous ne recevez pas souvent de courriers de osalva...@suse.de. D?couvrez > pourquoi ceci est important ? https://aka.ms/LearnAboutSenderIdentification ] > > On Tue, Jun 11, 2024 at 10:17:30AM -0400, Peter Xu wrote: >> Oscar, >> >> On Tue, Jun 1

Re: [PATCH v5 02/18] mm: Define __pte_leaf_size() to also take a PMD entry

2024-06-11 Thread LEROY Christophe
Le 11/06/2024 à 11:34, Oscar Salvador a écrit : > [Vous ne recevez pas souvent de courriers de osalva...@suse.de. D?couvrez > pourquoi ceci est important ? https://aka.ms/LearnAboutSenderIdentification ] > > On Mon, Jun 10, 2024 at 07:54:47AM +0200, Christophe Leroy wrote: >> On powerpc 8xx, wh

Re: [PATCH v5 1/3] powerpc/bitops: Use immediate operand when possible

2021-11-26 Thread LEROY Christophe
Hi Michael, Any chance to get this series merged this cycle ? Thanks Christophe Le 21/09/2021 à 17:09, Christophe Leroy a écrit : > Today we get the following code generation for bitops like > set or clear bit: > > c0009fe0: 39 40 08 00 li r10,2048 > c0009fe4: 7

Re: [PATCH] recordmcount: Support empty section from recent binutils

2021-11-26 Thread LEROY Christophe
Le 24/11/2021 à 15:43, Christophe Leroy a écrit : > Looks like recent binutils (2.36 and over ?) may empty some section, > leading to failure like: > > Cannot find symbol for section 11: .text.unlikely. > kernel/kexec_file.o: failed > make[1]: *** [scripts/Makefile.build:287: k

Re: [PATCH] powerpc/signal32: Use struct_group() to zero spe regs

2021-11-19 Thread LEROY Christophe
Le 18/11/2021 à 21:36, Kees Cook a écrit : > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memset(), avoid intentionally writing across > neighboring fields. > > Add a struct_group() for the spe registers so that memset() can correctly > reas

Re: [RESEND PATCH v5 0/4] Add perf interface to expose nvdimm

2021-11-16 Thread LEROY Christophe
Hi Le 16/11/2021 à 05:49, Kajol Jain a écrit : > Patchset adds performance stats reporting support for nvdimm. > Added interface includes support for pmu register/unregister > functions. A structure is added called nvdimm_pmu to be used for > adding arch/platform specific data such as cpumask, nvd

Re: [PATCH v1 1/1] soc: fsl: Replace kernel.h with the necessary inclusions

2021-10-29 Thread LEROY Christophe
Le 29/10/2021 à 17:55, Andy Shevchenko a écrit : > On Wed, Oct 27, 2021 at 06:33:54PM +0300, Andy Shevchenko wrote: >> When kernel.h is used in the headers it adds a lot into dependency hell, >> especially when there are circular dependencies are involved. >> >> Replace kernel.h inclusion with th

Re: [PATCH] powerpc/64s: Default to 64K pages for 64 bit book3s

2021-10-14 Thread LEROY Christophe
Le 14/10/2021 à 01:31, Joel Stanley a écrit : > For 64-bit book3s the default should be 64K as that's what modern CPUs > are designed for. > > The following defconfigs already set CONFIG_PPC_64K_PAGES: > > cell_defconfig > pasemi_defconfig > powernv_defconfig > ppc64_defconfig > pseri

Re: [PATCH] powerpc: don't select KFENCE on platform PPC_FSL_BOOK3E

2021-10-11 Thread LEROY Christophe
Le 12/10/2021 à 03:43, Liu Shixin a écrit : > kindly ping. Hi Based on the discussion we had, this patch is not enough. It should at least also de-activate DEBUG_PAGEALLOC, However I'm looking at fixing it the other way round. Give me one week or two. Christophe > > > On 2021/9/24 14:39,

Re: [PATCH v2 02/10] powerpc/bpf: Validate branch ranges

2021-10-05 Thread LEROY Christophe
Le 05/10/2021 à 22:25, Naveen N. Rao a écrit : > Add checks to ensure that we never emit branch instructions with > truncated branch offsets. > > Acked-by: Song Liu > Acked-by: Johan Almbladh > Tested-by: Johan Almbladh > Suggested-by: Michael Ellerman > Signed-off-by: Naveen N. Rao Review

Re: [PATCH v4 6/8] bpf ppc64: Access only if addr is kernel address

2021-09-29 Thread LEROY Christophe
Le 29/09/2021 à 13:18, Hari Bathini a écrit : > From: Ravi Bangoria > > On PPC64 with KUAP enabled, any kernel code which wants to > access userspace needs to be surrounded by disable-enable KUAP. > But that is not happening for BPF_PROBE_MEM load instruction. > So, when BPF program tries to ac

Re: [PATCH v2 4/8] powerpc/ppc-opcode: introduce PPC_RAW_BRANCH() macro

2021-09-17 Thread LEROY Christophe
Le 17/09/2021 à 17:30, Hari Bathini a écrit : > Define and use PPC_RAW_BRANCH() macro instead of open coding it. This > macro is used while adding BPF_PROBE_MEM support. > > Signed-off-by: Hari Bathini Reviewed-by: Christophe Leroy > --- > > Changes in v2: > * New patch to introduce PPC_RAW

RE: [PATCH v3] ftrace: Cleanup ftrace_dyn_arch_init()

2021-09-07 Thread LEROY Christophe
> -Message d'origine- > De : Linuxppc-dev bounces+christophe.leroy=csgroup...@lists.ozlabs.org> De la part de Weizhao > Ouyang > > Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common > ftrace_dyn_arch_init() to cleanup them. > > Signed-off-by: Weizhao Ouyang > Acked

Re: [PATCH v3 31/41] powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE

2021-08-02 Thread LEROY Christophe
Le 01/08/2021 à 03:21, Finn Thain a écrit : On Sat, 31 Jul 2021, Christophe Leroy wrote: Stan Johnson contacted me about a regression in mainline that he observed on his G3 Powerbooks. Using 'git bisect' we determined that this patch was the cause of the regression, i.e. commit 4c0104a83fc3

Re: [BISECTED] kexec regression on PowerBook G4

2019-05-22 Thread LEROY Christophe
Aaro Koskinen a écrit : Hi, On Wed, May 22, 2019 at 07:44:56AM +, Christophe Leroy wrote: On 05/22/2019 06:14 AM, Christophe Leroy wrote: >Le 22/05/2019 à 00:18, Aaro Koskinen a écrit : >>I was trying to upgrade from v5.0 -> v5.1 on PowerBook G4, but when >>trying >>to kexec a kernel the

Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-03-23 Thread LEROY Christophe
Masahiro Yamada a écrit : 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 arch/x86/Kconfig.debug to li

Re: [PATCH] compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING

2019-03-23 Thread LEROY Christophe
Arnd Bergmann a écrit : On Wed, Mar 20, 2019 at 10:41 AM Arnd Bergmann wrote: I've added your patch to my randconfig test setup and will let you know if I see anything noticeable. I'm currently testing clang-arm32, clang-arm64 and gcc-x86. This is the only additional bug that has come up s

Re: powerpc32 boot crash in 5.1-rc1

2019-03-22 Thread LEROY Christophe
Meelis Roos a écrit : While 5.0.0 worked fine on my PowerMac G4, 5.0 + git (unknown rev as of Mar 13), 5.0.0-11520-gf261c4e and todays git all fail to boot. The problem seems to be in page fault handler in load_elf_binary() of init process. The patch at https://patchwork.ozlabs.org/patch

Re: powerpc32 boot crash in 5.1-rc1

2019-03-21 Thread LEROY Christophe
Meelis Roos a écrit : While 5.0.0 worked fine on my PowerMac G4, 5.0 + git (unknown rev as of Mar 13), 5.0.0-11520-gf261c4e and todays git all fail to boot. The problem seems to be in page fault handler in load_elf_binary() of init process. The patch at https://patchwork.ozlabs.org/patch

Re: [PATCH v13 00/10] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK

2019-01-19 Thread LEROY Christophe
Michael Ellerman a écrit : Christophe Leroy writes: The purpose of this serie is to activate CONFIG_THREAD_INFO_IN_TASK which moves the thread_info into task_struct. Moving thread_info into task_struct has the following advantages: - It protects thread_info from corruption in the case of st

Re: [PATCH] Remove 'type' argument from access_ok() function

2019-01-04 Thread LEROY Christophe
Mathieu Malaterre a écrit : In commit 05a4ab823983 ("powerpc/uaccess: fix warning/error with access_ok()") an attempt was made to remove a warning by referencing the variable `type`, however in commit 96d4f267e40f ("Remove 'type' argument from access_ok() function") the variable `type` has been

Re: [PATCH v3 1/2] selftests/powerpc: Add MSR bits

2019-01-03 Thread LEROY Christophe
Breno Leitao a écrit : This patch simply adds definitions for the MSR bits and some macros to test for MSR TM bits. This was copied from arch/powerpc/include/asm/reg.h generic MSR part. Can't we find a way to avoid duplicating such defines ? Christophe Signed-off-by: Breno Leitao --- t

Re: [PATCH v5] soc/fsl/qe: fix err handling of ucc_of_parse_tdm

2019-01-02 Thread LEROY Christophe
Peng Hao a écrit : From: Wen Yang Currently there are some issues with the ucc_of_parse_tdm function: 1, a possible null pointer dereference in ucc_of_parse_tdm, detected by the semantic patch deref_null.cocci, with the following warning: drivers/soc/fsl/qe/qe_tdm.c:177:21-24: ERROR: pdev is

Re: [PATCH 1/2] powerpc/4xx/ocm: Fix phys_addr_t printf warnings

2019-01-01 Thread LEROY Christophe
Michael Ellerman a écrit : Currently the code produces several warnings, eg: arch/powerpc/platforms/4xx/ocm.c:240:38: error: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'phys_addr_t {aka unsigned int}' seq_printf(m, "PhysAddr : 0x%llx

Re: [PATCH v8 13/25] m68k: Dispatch nvram_ops calls to Atari or Mac functions

2018-12-30 Thread LEROY Christophe
Finn Thain a écrit : On Sat, 29 Dec 2018, Arnd Bergmann wrote: On Wed, Dec 26, 2018 at 1:43 AM Finn Thain wrote: > + > +static ssize_t m68k_nvram_get_size(void) > +{ > + if (MACH_IS_ATARI) > + return atari_nvram_get_size(); > + else if (MACH_IS_MAC) > +

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-30 Thread LEROY Christophe
Arnd Bergmann a écrit : On Sat, Dec 29, 2018 at 3:51 AM Michael Schmitz wrote: Hi Finn, Am 29.12.2018 um 15:34 schrieb Finn Thain: > On Sat, 29 Dec 2018, Michael Schmitz wrote: > >> >> IS_BUILTIN(CONFIG_NVRAM) is probably what Christophe really meant to suggest. >> >> Or (really going ou

Re: [PATCH v8 20/25] powerpc, fbdev: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2018-12-29 Thread LEROY Christophe
Finn Thain a écrit : Make use of arch_nvram_ops in device drivers so that the nvram_* function exports can be removed. Since they are no longer global symbols, rename the PPC32 nvram_* functions appropriately. Signed-off-by: Finn Thain --- arch/powerpc/kernel/setup_32.c | 8

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-29 Thread LEROY Christophe
Michael Schmitz a écrit : Hi Finn, Am 29.12.2018 um 14:06 schrieb Finn Thain: On Fri, 28 Dec 2018, LEROY Christophe wrote: diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 89f5154c40b6..99e5729d910d 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi

Re: [PATCH v8 02/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

2018-12-28 Thread LEROY Christophe
Finn Thain a écrit : Move the m68k-specific code out of the driver to make the driver generic. I've used 'SPDX-License-Identifier: GPL-2.0+' for the new file because the old file is covered by MODULE_LICENSE("GPL"). Signed-off-by: Finn Thain Tested-by: Christian T. Steigies Acked-by: Geert

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-28 Thread LEROY Christophe
Finn Thain a écrit : On powerpc, setting CONFIG_NVRAM=n builds a kernel with no NVRAM support. Setting CONFIG_NVRAM=m enables the /dev/nvram misc device module without enabling NVRAM support in drivers. Setting CONFIG_NVRAM=y enables the misc device (built-in) and also enables NVRAM support in

Re: [PATCH 5/5] powerpc/64s: Document that PPC supports nosmap

2018-10-31 Thread LEROY Christophe
Russell Currey a écrit : On Fri, 2018-10-26 at 18:35 +0200, LEROY Christophe wrote: Why not call our new functionnality SMAP instead of calling it GUAP ? mpe wasn't a fan of using the same terminology as other architectures. I don't like too much the word 'guarded&#x

Re: [PATCH 0/5] Guarded Userspace Access Prevention on Radix

2018-10-31 Thread LEROY Christophe
Russell Currey a écrit : On Fri, 2018-10-26 at 18:29 +0200, LEROY Christophe wrote: Russell Currey a écrit : > Guarded Userspace Access Prevention is a security mechanism that > prevents > the kernel from being able to read and write userspace addresses > outside of > th

Re: [PATCH 1/5] powerpc/64s: Guarded Userspace Access Prevention

2018-10-31 Thread LEROY Christophe
Russell Currey a écrit : On Sun, 2018-10-28 at 18:57 +0100, LEROY Christophe wrote: Russell Currey a écrit : > Guarded Userspace Access Prevention (GUAP) utilises a feature of > the Radix MMU which disallows read and write access to userspace > addresses. By utilising this, the

Re: NXP P50XX/e5500: SMP doesn't work anymore with the latest Git kernel

2018-10-29 Thread LEROY Christophe
Christian Zigotzky a écrit : Hello, I figured out that the problem is in the OF source code of the commit: Merge tag devicetree-for-4.20. [1] That's a merge commit. Can you bisect the branch and identify the faulting commit ? Christophe I reverted the following OF files and SMP work

Re: [PATCH 1/5] powerpc/64s: Guarded Userspace Access Prevention

2018-10-28 Thread LEROY Christophe
Russell Currey a écrit : Guarded Userspace Access Prevention (GUAP) 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 ch

Re: [PATCH 5/5] powerpc/64s: Document that PPC supports nosmap

2018-10-26 Thread LEROY Christophe
Why not call our new functionnality SMAP instead of calling it GUAP ? Christophe Russell Currey a écrit : Signed-off-by: Russell Currey --- Documentation/admin-guide/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/admin-guide/kernel-pa

Re: [PATCH 3/5] powerpc/lib: checksum GUAP support

2018-10-26 Thread LEROY Christophe
Same comment as for futex Christophe Russell Currey a écrit : Wrap the checksumming code in GUAP locks and unlocks. Signed-off-by: Russell Currey --- arch/powerpc/lib/checksum_wrappers.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/lib/checksum_wrappers.c b/arch/p

Re: [PATCH 2/5] powerpc/futex: GUAP support for futex ops

2018-10-26 Thread LEROY Christophe
Russell Currey a écrit : Wrap the futex operations in GUAP locks and unlocks. Does it means futex doesn't work anymore once only patch 1 is applied ? If so, then you should split patch 1 in two parts and reorder patches so that guap can only be activated once all necessary changes are d

Re: [PATCH 0/5] Guarded Userspace Access Prevention on Radix

2018-10-26 Thread LEROY Christophe
Russell Currey a écrit : Guarded Userspace Access Prevention is a security mechanism that prevents the kernel from being able to read and write userspace addresses outside of the allowed paths, most commonly copy_{to/from}_user(). At present, the only CPU that supports this is POWER9, and only

Re: [PATCH 3/9] powerpc/mm: Remove extern from function definition

2018-10-24 Thread LEROY Christophe
Breno Leitao a écrit : hi Christophe, On 10/23/2018 12:38 PM, LEROY Christophe wrote: Breno Leitao a écrit : This patch removes the keyword from the definition part, while keeps it in the declaration part. I think checkpatch also says that extern should be avoided in declarations

Re: [PATCH 3/9] powerpc/mm: Remove extern from function definition

2018-10-23 Thread LEROY Christophe
Breno Leitao a écrit : Function huge_ptep_set_access_flags() has the 'extern' keyword in the function definition and also in the function declaration. This causes a warning in 'sparse' since the 'extern' storage class should be used only on symbol declarations. arch/powerpc/mm/pgtable.c:232:1

Re: [PATCH v3 06/24] powerpc/mm: properly set PAGE_KERNEL flags in ioremap()

2018-10-14 Thread LEROY Christophe
LEROY Christophe a écrit : Michael Ellerman a écrit : Christophe Leroy writes: Set PAGE_KERNEL directly in the caller and do not rely on a hack adding PAGE_KERNEL flags when _PAGE_PRESENT is not set. As already done for PPC64, use pgprot_cache() helpers instead of _PAGE_XXX flags in

Re: [PATCH v3 06/24] powerpc/mm: properly set PAGE_KERNEL flags in ioremap()

2018-10-14 Thread LEROY Christophe
Michael Ellerman a écrit : Michael Ellerman writes: Christophe Leroy writes: Set PAGE_KERNEL directly in the caller and do not rely on a hack adding PAGE_KERNEL flags when _PAGE_PRESENT is not set. As already done for PPC64, use pgprot_cache() helpers instead of _PAGE_XXX flags in PPC32

Re: [PATCH v3 06/24] powerpc/mm: properly set PAGE_KERNEL flags in ioremap()

2018-10-14 Thread LEROY Christophe
Michael Ellerman a écrit : Christophe Leroy writes: Set PAGE_KERNEL directly in the caller and do not rely on a hack adding PAGE_KERNEL flags when _PAGE_PRESENT is not set. As already done for PPC64, use pgprot_cache() helpers instead of _PAGE_XXX flags in PPC32 ioremap() derived functions.

Re: [PATCH net] powerpc: use big endian to hash len and proto in csum_ipv6_magic

2018-09-08 Thread LEROY Christophe
Xin Long a écrit : The function csum_ipv6_magic doesn't convert len and proto to big endian before doing ipv6 csum hash, which is not consistent with RFC and other arches. Jianlin found it when ICMPv6 packets from other hosts were dropped in the powerpc64 system. This patch is to fix it by us

Re: [PATCH v2] powerpc/tm: Print 64-bits MSR

2018-08-07 Thread LEROY Christophe
Breno Leitao a écrit : Hi, On 08/07/2018 02:15 PM, Christophe LEROY wrote: Le 07/08/2018 à 15:35, Breno Leitao a écrit : On a kernel TM Bad thing program exception, the Machine State Register (MSR) is not being properly displayed. The exception code dumps a 32-bits value but MSR is a 64 bits

Re: [PATCH v2 04/10] powerpc/traps: Use REG_FMT in show_signal_msg()

2018-07-30 Thread LEROY Christophe
Murilo Opsfelder Araujo a écrit : Hi, Christophe. On Fri, Jul 27, 2018 at 06:40:23PM +0200, LEROY Christophe wrote: Murilo Opsfelder Araujo a écrit : > Simplify the message format by using REG_FMT as the register format. This > avoids having two different formats and avoids checki

Re: [PATCH v2 04/10] powerpc/traps: Use REG_FMT in show_signal_msg()

2018-07-27 Thread LEROY Christophe
Murilo Opsfelder Araujo a écrit : Simplify the message format by using REG_FMT as the register format. This avoids having two different formats and avoids checking for MSR_64BIT. Are you sure it is what we want ? Won't it change the behaviour for a 32 bits app running on a 64bits kernel ?

Re: [PATCH v4 00/11] hugetlb: Factorize hugetlb architecture primitives

2018-07-26 Thread LEROY Christophe
Alex Ghiti a écrit : Hi everyone, This is the result of the build for all arches tackled in this series rebased on 4.18-rc6: arm:     versatile_defconfig: without huge page OK     keystone_defconfig: with huge page OK arm64:     defconfig: with huge page OK ia64:     generi

Re: [PATCH 7/7] powerpc/traps: Show instructions on exceptions

2018-07-25 Thread LEROY Christophe
Murilo Opsfelder Araujo a écrit : Move show_instructions() declaration to arch/powerpc/include/asm/stacktrace.h and include asm/stracktrace.h in arch/powerpc/kernel/process.c, which contains the implementation. Modify show_instructions() not to call __kernel_text_address(), allowing userspa

Re: [PATCH 6/7] powerpc/traps: Print signal name for unhandled signals

2018-07-25 Thread LEROY Christophe
Murilo Opsfelder Araujo a écrit : This adds a human-readable name in the unhandled signal message. Before this patch, a page fault looked like: Jul 11 16:04:11 localhost kernel: pandafault[6303]: unhandled signal 11 at 17d0 nip 161c lr 7fff93c55100 code 2 i

Re: [PATCH 2/7] powerpc/traps: Return early in show_signal_msg()

2018-07-25 Thread LEROY Christophe
Murilo Opsfelder Araujo a écrit : Modify logic of show_signal_msg() to return early, if possible. Replace printk_ratelimited() by printk() and a default rate limit burst to limit displaying unhandled signals messages. Can you explain more the benefits of this change ? Christophe Signed-o

Re: [PATCH v4 4/6] powerpc/fsl: Enable cpu vulnerabilities reporting for NXP PPC BOOK3E

2018-07-18 Thread LEROY Christophe
Diana Madalina Craciun a écrit : On 7/17/2018 7:47 PM, LEROY Christophe wrote: Diana Craciun a écrit : The NXP PPC Book3E platforms are not vulnerable to meltdown and Spectre v4, so make them PPC_BOOK3S_64 specific. Signed-off-by: Diana Craciun --- History: v2-->v3 - used the exist

Re: [PATCH v4 4/6] powerpc/fsl: Enable cpu vulnerabilities reporting for NXP PPC BOOK3E

2018-07-17 Thread LEROY Christophe
Diana Craciun a écrit : The NXP PPC Book3E platforms are not vulnerable to meltdown and Spectre v4, so make them PPC_BOOK3S_64 specific. Signed-off-by: Diana Craciun --- History: v2-->v3 - used the existing functions for spectre v1/v2 arch/powerpc/Kconfig | 7 ++- arch/powerp

Re: [PATCH v4 0/6] powerpc/fsl: Speculation barrier for NXP PowerPC Book3E

2018-07-17 Thread LEROY Christophe
Diana Craciun a écrit : Implement barrier_nospec for NXP PowerPC Book3E processors. Diana Craciun (6): Disable the speculation barrier from the command line Document nospectre_v1 kernel parameter. Make stf barrier PPC_BOOK3S_64 specific. Enable cpu vulnerabilities reporting for NXP PPC

Re: OOM killer invoked while still one forth of mem is available

2018-04-26 Thread LEROY Christophe
Michal Hocko a écrit : On Thu 26-04-18 15:28:46, Christophe LEROY wrote: Le 26/04/2018 à 15:11, Michal Hocko a écrit : > On Thu 26-04-18 08:10:30, Christophe LEROY wrote: > > > > > > Le 25/04/2018 à 21:57, David Rientjes a écrit : > > > On Tue, 24 Apr 2018, christophe leroy wrote: > > > > >

Re: [PATCH v4 03/19] powerpc: Mark variable `l` as unused, remove `path`

2018-04-06 Thread LEROY Christophe
Mathieu Malaterre a écrit : Add gcc attribute unused for `l` variable, replace `path` variable directly with prom_scratch. Fix warnings treated as errors with W=1: arch/powerpc/kernel/prom_init.c:607:6: error: variable ‘l’ set but not used [-Werror=unused-but-set-variable] arch/powerpc/k

Re: [PATCH v2 03/19] powerpc: Mark variables as unused

2018-04-05 Thread LEROY Christophe
Michael Ellerman a écrit : LEROY Christophe writes: Mathieu Malaterre a écrit : Add gcc attribute unused for two variables. Fix warnings treated as errors with W=1: arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable

Re: [PATCH] powerpc/mm/hash: Move the slb_addr_limit check within PPC_MM_SLICES

2018-03-30 Thread LEROY Christophe
Michael Ellerman a écrit : "Aneesh Kumar K.V" writes: Should not have any impact, because we always select PP_MM_SLICES these days. Nevertheless it is good to indicate that slb_addr_limit is available only with slice code. That file can only be built if PPC_MM_SLICES=y. So let's just re

Re: [PATCH v2 04/19] powerpc/kvm: Prefer fault_in_pages_readable function

2018-03-29 Thread LEROY Christophe
Mathieu Malaterre a écrit : Directly use fault_in_pages_readable instead of manual __get_user code. Fix warning treated as error with W=1: arch/powerpc/kernel/kvm.c:675:6: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-off-

Re: [PATCH v2 05/19] powerpc/chrp/setup: Add attribute unused and make some functions static

2018-03-29 Thread LEROY Christophe
The subject of the patch should be updated as well Christophe Mathieu Malaterre a écrit : Remove variable declaration idu_size and associated code since not used. These functions can all be static, make it so. Fix warnings treated as errors with W=1: arch/powerpc/platforms/chrp/setup.c:9

Re: [PATCH v2 03/19] powerpc: Mark variables as unused

2018-03-29 Thread LEROY Christophe
Mathieu Malaterre a écrit : Add gcc attribute unused for two variables. Fix warnings treated as errors with W=1: arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Malate

Re: [PATCH v2 02/19] powerpc/powermac: Mark variable x as unused

2018-03-29 Thread LEROY Christophe
Mathieu Malaterre a écrit : Since the value of x is never intended to be read, remove it. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/udbg_scc.c:76:9: error: variable ‘x’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-

Re: [PATCH v2 01/19] powerpc/powermac: Mark variable x as unused

2018-03-29 Thread LEROY Christophe
Mathieu Malaterre a écrit : Since the value of x is never intended to be read, declare it with gcc attribute as unused. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: variable ‘x’ set but not used [-Werror=unused-but-set-variable] Signe

  1   2   >