Re: [PATCH] cxl: don't manipulate the mm.mm_users field directly

2021-03-11 Thread Andrew Donnellan
On 11/3/21 4:44 am, Laurent Dufour wrote: It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Signed-off-by: Laurent Dufour LGTM, thanks for picking this up Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL

Re: [PATCH] cxl: Fix couple of spellings

2021-03-22 Thread Andrew Donnellan
On 22/3/21 1:33 pm, Bhaskar Chowdhury wrote: s/filesytem/filesystem/ s/symantics/semantics/ Signed-off-by: Bhaskar Chowdhury Acked-by: Andrew Donnellan --- drivers/misc/cxl/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/cxl/context.c b

Re: [PATCH] powerpc: powernv: Remove unneeded variable: "rc"

2021-03-26 Thread Andrew Donnellan
On 26/3/21 10:53 pm, dingsen...@163.com wrote: From: dingsenjie Remove unneeded variable: "rc". Signed-off-by: dingsenjie This looks obviously correct and doesn't raise any checkpatch warnings. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs,

Re: [PATCH v3 1/1] hotplug-cpu.c: show 'last online CPU' error in dlpar_cpu_offline()

2021-03-26 Thread Andrew Donnellan
ressing the issues in Daniel's review. I haven't tested it, but this patch looks sensible enough to me. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h

2022-04-05 Thread Andrew Donnellan
nge prom.h, but nothing here looks concerning. Acked-by: Andrew Donnellan --- drivers/misc/cxl/api.c | 1 + drivers/misc/cxl/cxl.h | 2 ++ drivers/misc/cxl/cxllib.c | 1 + drivers/misc/cxl/flash.c| 1 + drivers/misc/cxl/guest.c| 2 ++ drivers/misc/cxl/irq.c | 1 + d

Re: [PATCH] cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h

2022-04-05 Thread Andrew Donnellan
On 6/4/22 16:52, Christophe Leroy wrote: Thanks. Can you take the patch through your tree ? We don't have a tree of our own, we rely on mpe to take it through powerpc. -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 5/5] powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE

2021-04-12 Thread Andrew Donnellan
y: Nathan Lynch This appears to correctly rename all users of the macro. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl: Fix an error message

2021-05-05 Thread Andrew Donnellan
but they are wrong :) Fixes: f204e0b8ce ("cxl: Driver code for powernv PCIe based cards for userspace access") Signed-off-by: Christophe JAILLET Apart from my comment above: Acked-by: Andrew Donnellan Thanks for catching this! -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 03/11] Documentation: ocxl.rst: change FPGA indirect article to an

2021-06-08 Thread Andrew Donnellan
On 9/6/21 7:23 am, t...@redhat.com wrote: From: Tom Rix Change use of 'a fpga' to 'an fpga' Signed-off-by: Tom Rix Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 3/3] misc: cxl: flash: Remove unused variable 'drc_index'

2020-07-08 Thread Andrew Donnellan
] 178 | __be32 *data, drc_index, phandle; | ^ Cc: Frederic Barrat Cc: Andrew Donnellan Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 3/3] misc: cxl: flash: Remove unused variable 'drc_index'

2020-07-09 Thread Andrew Donnellan
] 178 | __be32 *data, drc_index, phandle; | ^ Cc: Frederic Barrat Cc: Andrew Donnellan Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] ocxl: Replace HTTP links with HTTPS ones

2020-07-13 Thread Andrew Donnellan
limov Thanks. Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-11 Thread Andrew Donnellan
trcmp(token_name, "ibm,errinjct")) + size = 1024; + else if (!strcmp(token_name, "ibm,update-nodes") || +!strcmp(token_name, "ibm,update-properties") || +

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-11 Thread Andrew Donnellan
hrough all of them to populate that field at init time. -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

[PATCH v2 1/2] powerpc/rtas: Restrict RTAS requests from userspace

2020-08-19 Thread Andrew Donnellan
es. For compatibility with any applications we are not aware of that require other calls, the filter can be turned off at build time. Reported-by: Daniel Axtens Cc: sta...@vger.kernel.org Signed-off-by: Andrew Donnellan --- v1->v2: - address comments from mpe - shorten the names of some struc

[PATCH v2 2/2] selftests/powerpc: Add a rtas_filter selftest

2020-08-19 Thread Andrew Donnellan
Add a selftest to test the basic functionality of CONFIG_RTAS_FILTER. Signed-off-by: Andrew Donnellan --- v1->v2: - new patch --- .../selftests/powerpc/syscalls/Makefile | 2 +- .../selftests/powerpc/syscalls/rtas_filter.c | 285 ++ 2 files changed, 286 inserti

Re: [PATCH] powerpc: Remove unused prototype for of_show_percpuinfo

2021-09-02 Thread Andrew Donnellan
ff-by: Daniel Axtens I grepped through, confirmed there's no other references to of_show_percpuinfo(). Reviewed-by: Andrew Donnellan (First linuxppc patch written and sent live on a twitch stream?) -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 07/29] ABI: sysfs-class-cxl: place "not in a guest" at description

2021-09-14 Thread Andrew Donnellan
On 15/9/21 12:32 am, Mauro Carvalho Chehab wrote: The What: field should have just the location of the ABI. Anything else should be inside the description. This fixes its parsing by get_abi.pl script. Signed-off-by: Mauro Carvalho Chehab Looks fine to me. Acked-by: Andrew Donnellan

Re: [PATCH v2 6/9] PCI: Add pci_find_dvsec_capability to find designated VSEC

2021-09-27 Thread Andrew Donnellan
rg Cc: Andrew Donnellan Cc: Lu Baolu Reviewed-by: Frederic Barrat Signed-off-by: Ben Widawsky Looks good to me, it's essentially identical to the existing implementation in ocxl. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@lin

Re: [PATCH v2 8/9] ocxl: Use pci core's DVSEC functionality

2021-09-27 Thread Andrew Donnellan
implementation. As that change is less trivial it is reserved for later. Cc: linuxppc-dev@lists.ozlabs.org Cc: Andrew Donnellan Acked-by: Frederic Barrat (v1) Signed-off-by: Ben Widawsky Looks fine, but we should clean up find_dvsec_from_pos() afterwards. Reviewed-by: Andrew Donnellan

Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Andrew Donnellan
;err_handler && I'm not a huge fan of assignments in if statements and if you send a v6 I'd prefer you break it up. Apart from that everything in the powerpc and cxl sections looks good to me. -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Andrew Donnellan
at any of the cxl PCI error handling paths brings back nightmares from a few years ago... Fred: I wonder if we need to add a lock here? -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] docs: typo fixes in Documentation/ABI/

2021-10-06 Thread Andrew Donnellan
zlabs.org Description:read only -Decimal value of the the lowest version of the userspace API -this this kernel supports. +Decimal value of the lowest version of the userspace API + this kernel supports. Users:

Re: [PATCH] Documentation: Fix typo in testing/sysfs-class-cxl

2021-10-06 Thread Andrew Donnellan
On 7/10/21 2:50 am, Sohaib Mohamed wrote: Remove repeated words: "the the lowest" and "this this kernel" Signed-off-by: Sohaib Mohamed Thanks for catching this. Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com

Re: [PATCH kernel] vfio_pci_nvlink2: Do not attempt NPU2 setup on old P8's NPU

2020-11-12 Thread Andrew Donnellan
t;vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver") Signed-off-by: Alexey Kardashevskiy Should this be Cc: stable? Andrew -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] ocxl: Mmio invalidation support

2020-11-16 Thread Andrew Donnellan
/job/snowpatch/job/snowpatch-linux-checkpatch/16267//artifact/linux/checkpatch.log -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: Linux kernel: powerpc: RTAS calls can be used to compromise kernel integrity

2020-11-23 Thread Andrew Donnellan
On 9/10/20 12:20 pm, Andrew Donnellan wrote: The Linux kernel for powerpc has an issue with the Run-Time Abstraction Services (RTAS) interface, allowing root (or CAP_SYS_ADMIN users) in a VM to overwrite some parts of memory, including kernel memory. This issue impacts guests running on top

Re: [PATCH v2 1/2] powerpc/rtas: Restrict RTAS requests from userspace

2020-12-08 Thread Andrew Donnellan
y errinjct) Which is producing this when trying to invoke the errinjct tool. I'll send a fixes patch out shortly. *sigh* Thanks for picking this up! -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: Linux kernel: powerpc: RTAS calls can be used to compromise kernel integrity

2020-12-10 Thread Andrew Donnellan
On 24/11/20 1:41 am, Andrew Donnellan wrote: On 9/10/20 12:20 pm, Andrew Donnellan wrote: The Linux kernel for powerpc has an issue with the Run-Time Abstraction Services (RTAS) interface, allowing root (or CAP_SYS_ADMIN users) in a VM to overwrite some parts of memory, including kernel

Re: [PATCH] powerpc/rtas: fix typo of ibm,open-errinjct in rtas filter

2020-12-10 Thread Andrew Donnellan
tching this! Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

[PATCH] powerpc/powernv: Rate limit opal-elog read failure message

2020-12-10 Thread Andrew Donnellan
Sometimes we can't read an error log from OPAL, and we print an error message accordingly. But the OPAL userspace tools seem to like retrying a lot, in which case we flood the kernel log with a lot of messages. Change pr_err() to pr_err_ratelimited() to help with this. Signed-off-by: A

Re: [PATCH v2 -next] misc: ocxl: use DEFINE_MUTEX() for mutex lock

2021-01-05 Thread Andrew Donnellan
On 25/12/20 12:24 am, Zheng Yongjun wrote: mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com

Re: [PATCH 4/6] powerpc/rtas: move syscall filter setup into separate function

2021-01-14 Thread Andrew Donnellan
ces :) -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 1/6] powerpc/rtas: improve ppc_rtas_rmo_buf_show documentation

2021-01-14 Thread Andrew Donnellan
On 15/1/21 8:59 am, Nathan Lynch wrote: Add kerneldoc for ppc_rtas_rmo_buf_show(), the callback for /proc/powerpc/rtas/rmo_buffer, explaining its expected use. Signed-off-by: Nathan Lynch Looks good. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a

Re: [PATCH 2/6] powerpc/rtas-proc: remove unused RMO_READ_BUF_MAX

2021-01-14 Thread Andrew Donnellan
On 15/1/21 9:00 am, Nathan Lynch wrote: This constant is unused. Signed-off-by: Nathan Lynch A quick grep agrees. Reviewed-by: Andrew Donnellan --- arch/powerpc/kernel/rtas-proc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc

Re: [PATCH 3/6] powerpc/rtas: remove ibm_suspend_me_token

2021-01-14 Thread Andrew Donnellan
On 15/1/21 9:00 am, Nathan Lynch wrote: There's not a compelling reason to cache the value of the token for the ibm,suspend-me function. Just look it up when needed in the RTAS syscall's special case for it. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan --- ar

Re: [PATCH 5/6] powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE

2021-01-14 Thread Andrew Donnellan
lue in terms of the number of work areas allocated. Signed-off-by: Nathan Lynch squash! powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE I think you meant to get rid of this line... -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH 01/13] powerpc/powernv: remove get_cxl_module

2021-01-21 Thread Andrew Donnellan
uot;). Thanks for picking this up. Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl: Simplify bool conversion

2021-01-31 Thread Andrew Donnellan
On 29/1/21 7:25 pm, Yang Li wrote: Fix the following coccicheck warning: ./drivers/misc/cxl/sysfs.c:181:48-53: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Andrew Donnellan Thanks! --- drivers/misc/cxl/sysfs.c | 2 +- 1 file

Re: [PATCH] powerpc/64/syscall: Disable sanitisers for C syscall entry/exit code

2020-05-29 Thread Andrew Donnellan
holas Piggin Fixes: 68b34588e202 ("powerpc/64/sycall: Implement syscall entry/exit logic in C") Signed-off-by: Daniel Axtens This seems reasonable - I've verified that this does indeed suppress the kcov trace calls. Acked-by: Andrew Donnellan (does this need to be tagged f

[PATCH] cxl: Remove dead Kconfig options

2020-06-01 Thread Andrew Donnellan
The CXL_AFU_DRIVER_OPS and CXL_LIB Kconfig options were added to coordinate merging of new features. They no longer serve any purpose, so remove them. Signed-off-by: Andrew Donnellan --- drivers/misc/cxl/Kconfig | 8 1 file changed, 8 deletions(-) diff --git a/drivers/misc/cxl/Kconfig

[PATCH v2] cxl: Remove dead Kconfig option

2020-06-02 Thread Andrew Donnellan
The CXL_AFU_DRIVER_OPS Kconfig option was added to coordinate merging of new features. It no longer serves any purpose, so remove it. Signed-off-by: Andrew Donnellan --- v1->v2: - keep CXL_LIB for now to avoid breaking a driver that is currently out of tree --- drivers/misc/cxl/Kconfig

Re: [PATCH] cxl: Fix kobject memleak

2020-06-03 Thread Andrew Donnellan
r1: so it falls through? -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH] cxl: Fix kobject memleak

2020-06-03 Thread Andrew Donnellan
On 3/6/20 9:57 pm, wanghai (M) wrote: kfree(cr) can be called when kobject_put()-->kobject_release()-->kobject_cleanup()-->kobj_type->release() is called.  The kobj_type here is afu_config_record_type Of course, I missed that. In that case Acked-by: Andrew Donnellan Thanks

Re: [PATCH v4] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-06-04 Thread Andrew Donnellan
this is specific to the IBM CFG implementation and the IBM-specific DVSEC? -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v5] ocxl: control via sysfs whether the FPGA is reloaded on a link reset

2020-07-02 Thread Andrew Donnellan
: Philippe Bergheaud Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

[PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-07-02 Thread Andrew Donnellan
es. For compatibility with any applications we are not aware of that require other calls, the filter can be turned off at build time. Reported-by: Daniel Axtens Cc: sta...@vger.kernel.org Signed-off-by: Andrew Donnellan --- arch/powerpc/Kconfig | 13 +++ ar

Re: [PATCH v2 5/6] PCI: Adapt all code locations to not use struct pci_dev::driver directly

2021-08-05 Thread Andrew Donnellan
On 3/8/21 8:01 pm, Uwe Kleine-König wrote: This prepares removing the driver member of struct pci_dev which holds the same information than struct pci_dev::dev->driver. Signed-off-by: Uwe Kleine-König cxl hunks look alright. Acked-by: Andrew Donnellan # cxl -- Andrew Donnel

Re: [PATCH v2 26/79] docs: powerpc: convert docs to ReST and rename to *.rst

2019-04-23 Thread Andrew Donnellan
phan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab Acked-by: Andrew Donnellan # cxl Minor possible improvement below, otherwise compiled output looks very nice. diff --git a/Documentation/powerpc/cxl.txt b

Re: [PATCH v4 1/7] ocxl: Split pci.c

2019-04-29 Thread Andrew Donnellan
ic on the card (CFG, TLX) won't be reset, so -* there's no guarantee that it will be enough. -*/ - rc = ocxl_config_read_function(dev, &fn->config); - if (rc) - return rc; - - rc = set_function_device(fn, dev); - if (rc) - return rc; - - rc = assign_function_actag(fn); - if (rc) - return rc; - - rc = set_function_pasid(fn); - if (rc) - return rc; - - rc = ocxl_link_setup(dev, 0, &fn->link); - if (rc) - return rc; - - rc = ocxl_config_set_TL(dev, fn->config.dvsec_tl_pos); - if (rc) { - ocxl_link_release(dev, fn->link); - return rc; - } - return 0; -} - -static void deconfigure_function(struct ocxl_fn *fn) -{ - struct pci_dev *dev = to_pci_dev(fn->dev.parent); - - ocxl_link_release(dev, fn->link); - pci_disable_device(dev); -} - -static struct ocxl_fn *init_function(struct pci_dev *dev) -{ - struct ocxl_fn *fn; - int rc; - - fn = alloc_function(dev); - if (!fn) - return ERR_PTR(-ENOMEM); - - rc = configure_function(fn, dev); - if (rc) { - free_function(fn); - return ERR_PTR(rc); - } - - rc = device_register(&fn->dev); - if (rc) { - deconfigure_function(fn); - put_device(&fn->dev); - return ERR_PTR(rc); - } - return fn; -} - -static void remove_function(struct ocxl_fn *fn) -{ - deconfigure_function(fn); - device_unregister(&fn->dev); -} - static int ocxl_probe(struct pci_dev *dev, const struct pci_device_id *id) { int rc, afu_count = 0; -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

Re: [PATCH v4 2/7] ocxl: Don't pass pci_dev around

2019-04-29 Thread Andrew Donnellan
On 27/3/19 4:31 pm, Alastair D'Silva wrote: From: Alastair D'Silva This data is already available in a struct Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan --- drivers/misc/ocxl/core.c | 38 +- 1 file changed, 21 in

Re: [PATCH V32 01/27] Add the ability to lock down access to the running kernel image

2019-04-29 Thread Andrew Donnellan
uldn't be allowed in lockdown. So, if you can disable lockdown on the console that's probably OK, but it should be specifically disabling lockdown, not randomly editing memory with xmon. That makes sense. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

[PATCH] MAINTAINERS: Update cxl/ocxl email address

2019-05-02 Thread Andrew Donnellan
Use my @linux.ibm.com email to avoid a layer of redirection. Signed-off-by: Andrew Donnellan --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5c38f21aee78..386e2336fe7e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4293,7

[PATCH] powerpc/powernv: Restrict OPAL symbol map to only be readable by root

2019-05-03 Thread Andrew Donnellan
kernel.org Signed-off-by: Andrew Donnellan --- arch/powerpc/platforms/powernv/opal.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index 2b0eca104f86..505460a72052 100644 --- a/ar

[PATCH v2] powerpc/powernv: Restrict OPAL symbol map to only be readable by root

2019-05-03 Thread Andrew Donnellan
kernel.org Signed-off-by: Andrew Donnellan --- v1->v2: - fix tabs vs spaces (Greg) --- arch/powerpc/platforms/powernv/opal.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c index

Re: [PATCH] powerpc/powernv: Restrict OPAL symbol map to only be readable by root

2019-05-03 Thread Andrew Donnellan
On 3/5/19 5:48 pm, Greg KH wrote: no tab? checkpatch.pl is your friend :) Ughh. Sadly our CI is currently down ;) Respun. -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2] powerpc/powernv: Restrict OPAL symbol map to only be readable by root

2019-05-03 Thread Andrew Donnellan
ou are racing userspace when you create this sysfs file, why not add it to the device's default attributes so the driver core creates it for you at the correct time? I was not previously aware of default attributes... Are we actually racing against userspace in a subsys initcall? -- Andrew D

Re: [PATCH v2] powerpc/powernv: Restrict OPAL symbol map to only be readable by root

2019-05-03 Thread Andrew Donnellan
On 3/5/19 6:35 pm, Greg KH wrote: Are we actually racing against userspace in a subsys initcall? You can be, if you subsys is a module :) For various reasons, we don't compile core system firmware interfaces into modules... that could be an interesting exercise. :D -- Andrew Donn

Re: [PATCH -next] misc: ocxl: Make ocxl_remove static

2019-05-05 Thread Andrew Donnellan
On 4/5/19 8:27 pm, YueHaibing wrote: Fix sparse warning: drivers/misc/ocxl/pci.c:44:6: warning: symbol 'ocxl_remove' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing Good catch! Acked-by: Andrew Donnellan --- drivers/misc/ocxl

Re: [PATCH -next] ocxl: Fix return value check in afu_ioctl()

2019-05-05 Thread Andrew Donnellan
;ocxl: move event_fd handling to frontend") Signed-off-by: Wei Yongjun Acked-by: Andrew Donnellan --- drivers/misc/ocxl/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c index 8aa22893ed76..2870c25da166 10

Re: [PATCH] powerpc/64s: support nospectre_v2 cmdline option

2019-05-05 Thread Andrew Donnellan
toggle_count_cache_flush(true); } -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2] powerpc/64s: support nospectre_v2 cmdline option

2019-05-06 Thread Andrew Donnellan
On 7/5/19 12:43 pm, Christopher M. Riedl wrote: Add support for disabling the kernel implemented spectre v2 mitigation (count cache flush on context switch) via the nospectre_v2 cmdline option. Suggested-by: Michael Ellerman Signed-off-by: Christopher M. Riedl Reviewed-by: Andrew Donnellan

[PATCH] powerpc/powernv: Move SCOM access code into powernv platform

2019-05-07 Thread Andrew Donnellan
show up in menuconfig, as previously it was the only labelled option in sysdev/Kconfig and wasn't actually in a menu. Signed-off-by: Andrew Donnellan --- arch/powerpc/include/asm/scom.h | 4 ++-- arch/powerpc/platforms/powernv/Kconfig| 5 - arch/powerpc/plat

Re: [PATCH] powerpc/powernv: Move SCOM access code into powernv platform

2019-05-08 Thread Andrew Donnellan
On 8/5/19 10:27 pm, Michael Ellerman wrote: Andrew Donnellan writes: The powernv platform is the only one that directly accesses SCOMs. Move the support code to platforms/powernv, and get rid of the PPC_SCOM Kconfig option, as SCOM support is always selected when compiling for powernv. This

[PATCH v2 2/5] powerpc/powernv: Remove dead SCOM access code

2019-05-08 Thread Andrew Donnellan
Nothing is using scom_map_device() or scom_find_parent(). Remove them. Also don't export scom_controller, there are no other users of it. Signed-off-by: Andrew Donnellan --- v1->v2: - new patch --- arch/powerpc/platforms/powernv/scom.c | 67 --- arch/powerpc/p

[PATCH v2 1/5] powerpc/powernv: Move SCOM access code into powernv platform

2019-05-08 Thread Andrew Donnellan
show up in menuconfig, as previously it was the only labelled option in sysdev/Kconfig and wasn't actually in a menu. Signed-off-by: Andrew Donnellan --- v1->v2: - move scom.h as well (mpe) - add all the other patches in this series --- arch/powerpc/platforms/powernv/Kconfig

[PATCH v2 4/5] powerpc/powernv: Fix checkpatch warnings in opal-xscom.c

2019-05-08 Thread Andrew Donnellan
Signed-off-by: Andrew Donnellan --- v1->v2: - new patch --- arch/powerpc/platforms/powernv/opal-xscom.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powernv/opal-xscom.c b/arch/powerpc/platforms/powernv/opal-xscom.c index e16b0e346

[PATCH v2 5/5] powerpc/configs: Disable SCOM_DEBUGFS in powernv_defconfig

2019-05-08 Thread Andrew Donnellan
ned-off-by: Andrew Donnellan --- v1->v2: - new patch --- arch/powerpc/configs/powernv_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig index ef2ef98d3f28..d5a6608cb2e0 100644 --- a/arch/po

[PATCH v2 3/5] powerpc/powernv: Get rid of old scom_controller abstraction

2019-05-08 Thread Andrew Donnellan
controller and make everything much simpler and more direct. While we're here, fix up the comment block at the top and add a SPDX header. Signed-off-by: Andrew Donnellan --- v1->v2: - new patch --- arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/

Re: [PATCH v2 5/5] powerpc/configs: Disable SCOM_DEBUGFS in powernv_defconfig

2019-05-08 Thread Andrew Donnellan
d like to see this moved there, but perhaps this patch can wait until then. I'll let mpe decide. Andrew Signed-off-by: Andrew Donnellan --- v1->v2: - new patch --- arch/powerpc/configs/powernv_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/pow

Re: [PATCH] ocxl: Fix potential memory leak on context creation

2019-05-19 Thread Andrew Donnellan
On 18/5/19 12:20 am, Frederic Barrat wrote: If we couldn't fully init a context, we were leaking memory. Fixes: b9721d275cc2 ("ocxl: Allow external drivers to use OpenCAPI contexts") Signed-off-by: Frederic Barrat Acked-by: Andrew Donnellan --- drivers/misc/ocxl/context.c

Re: [PATCH v2] ocxl: Fix potential memory leak on context creation

2019-05-20 Thread Andrew Donnellan
Acked-by: Andrew Donnellan On 20/5/19 5:16 pm, Frederic Barrat wrote: If we couldn't fully init a context, we were leaking memory. Fixes: b9721d275cc2 ("ocxl: Allow external drivers to use OpenCAPI contexts") Signed-off-by: Frederic Barrat --- Changelog: v2: reset context poi

Re: [PATCH] powerpc/powernv: Show checkstop reason for NPU2 HMIs

2019-05-29 Thread Andrew Donnellan
h, the matching skiboot change: http://patchwork.ozlabs.org/patch/1104076/ Still always safest to hold off until merged into skiboot :) Reviewed-by: Andrew Donnellan arch/powerpc/include/asm/opal-api.h | 1 + arch/powerpc/platforms/powernv/opal-hmi.c | 40 +++

Re: [RFC PATCH v2] powerpc/xmon: restrict when kernel is locked down

2019-06-02 Thread Andrew Donnellan
clear all breakpoints, set xmon read-only mode (2) lockdown=none -> lockdown=confidentiality clear all breakpoints, prevent re-entry into xmon (3) lockdown=integrity -> lockdown=confidentiality prevent re-entry into xmon Suggested-by: Andrew Donnellan Signed-off-by: Christ

Re: [PATCH v2 1/5] powerpc/powernv: Move SCOM access code into powernv platform

2019-06-03 Thread Andrew Donnellan
On 9/5/19 3:11 pm, Andrew Donnellan wrote: The powernv platform is the only one that directly accesses SCOMs. Move the support code to platforms/powernv, and get rid of the PPC_SCOM Kconfig option, as SCOM support is always selected when compiling for powernv. This also means that the Kconfig

Re: [RFC PATCH v2] powerpc/xmon: restrict when kernel is locked down

2019-06-03 Thread Andrew Donnellan
d in some manner - if there is a better way I am all ears :) Integrity mode merely means we are aiming to prevent modifications to kernel memory. IMHO leaving existing breakpoints in place is fine as long as when we hit the breakpoint xmon is in read-only mode. (dja/mpe might have

Re: [PATCH] ocxl: do not use C++ style comments in uapi header

2019-06-04 Thread Andrew Donnellan
/1083801/ If you choose to proceed with this patch: Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited

Re: [PATCH v2 06/22] docs: mark orphan documents as such

2019-06-04 Thread Andrew Donnellan
hem, in order to silent this warning. Signed-off-by: Mauro Carvalho Chehab ocxl: Acked-by: Andrew Donnellan We should find somewhere to put it... --- Documentation/accelerators/ocxl.rst | 2 ++ Documentation/arm/stm32/overview.rst| 2 ++ Documentation/a

Re: [PATCH v5] powerpc/64s: support nospectre_v2 cmdline option

2019-06-05 Thread Andrew Donnellan
-by: Andrew Donnellan snowpatch is whinging about this breaking the build for some reason... https://patchwork.ozlabs.org/patch/1104583/ --- v4->v5: Fix checkpatch complaint arch/powerpc/kernel/security.c | 19 --- 1 file changed, 16 insertions(+), 3 deleti

Re: [PATCH misc-next] drivers/misc: remove redundant rc variable

2021-12-15 Thread Andrew Donnellan
On 15/12/21 5:04 pm, cgel@gmail.com wrote: From: Minghao Chi Return value from ocxl_context_attach() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs

Re: [PATCH] ocxl: Make use of the helper macro LIST_HEAD()

2022-02-08 Thread Andrew Donnellan
On 9/2/22 14:24, Cai Huoqing wrote: Replace "struct list_head head = LIST_HEAD_INIT(head)" with "LIST_HEAD(head)" to simplify the code. Signed-off-by: Cai Huoqing LGTM Acked-by: Andrew Donnellan -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm

Re: [PATCH 1/3] cxl: Re-factor cxl_pci_afu_read_err_buffer()

2017-03-16 Thread Andrew Donnellan
. Signed-off-by: Vaibhav Jain Comments below. Reviewed-by: Andrew Donnellan --- drivers/misc/cxl/cxl.h| 3 --- drivers/misc/cxl/native.c | 56 ++- drivers/misc/cxl/pci.c| 44 - 3 files changed, 55 insertions

Re: [PATCH V2 1/6] cxl: Remove unused values in bare-metal environment.

2017-03-19 Thread Andrew Donnellan
Reviewed-by: Andrew Donnellan On 14/03/17 22:08, Christophe Lombard wrote: The two fields pid and tid of the structure cxl_irq_info are only used in the guest environment. To avoid confusion, it's not necessary to fill the fields in the bare-metal environment. The PSL Process and T

Re: [PATCH 3/7] cxl: Keep track of mm struct associated with a context

2017-03-19 Thread Andrew Donnellan
sory look and can't see it. -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

[PATCH] gcc-plugins: update architecture list in documentation

2017-03-20 Thread Andrew Donnellan
Commit 65c059bcaa73 ("powerpc: Enable support for GCC plugins") enabled GCC plugins on powerpc, but neglected to update the architecture list in the docs. Rectify this. Fixes: 65c059bcaa73 ("powerpc: Enable support for GCC plugins") Signed-off-by: Andrew Donnellan --

Re: [PATCH 2/3] cxl: Introduce afu_desc sysfs attribute

2017-03-20 Thread Andrew Donnellan
afu->attr_afud.size = 0; + dev_err(&afu->dev, + "Unable to create afu_desc attr for the afu. Err(%d)\n", + rc); + goto err1; + } + } + return 0; err1: -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

Re: [PATCH v2] cxl: Force context lock during EEH flow

2017-03-20 Thread Andrew Donnellan
ext exists") Reported-by: Andrew Donnellan Signed-off-by: Vaibhav Jain --- Change-Log: v2..v1 - Moved the call to cxl_adapter_context_force_lock() from cxl_pci_error_detected() to cxl_remove. (Fred) --- drivers/misc/cxl/cxl.h | 3 +++ drivers/misc/cxl/main.c | 10 ++ drivers/misc/

Re: [PATCH V2 0/6] cxl: Add support for Coherent Accelerator Interface Architecture 2.0

2017-03-20 Thread Andrew Donnellan
implementation-specific code. Patch 7 introduces the core of the PSL9-specific code. Is patch 1 (cxl: Read vsec perst load image) from the last version of the series missing in this one? -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

Re: [PATCH V2 3/6] cxl: Update implementation service layer

2017-03-20 Thread Andrew Donnellan
to be dependent on CONFIG_DEBUG_FS Whoops, looks like I screwed that up when I rebased. :/ -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

Re: [v6] powerpc/powernv: add hdat attribute to sysfs

2017-03-21 Thread Andrew Donnellan
bin_attr->size); +} + +static struct bin_attribute *exported_attrs; +static char **attr_name; Can these be moved inside opal_export_attrs()? -- Andrew Donnellan OzLabs, ADL Canberra andrew.donnel...@au1.ibm.com IBM Australia Limited

Re: [v7] powerpc/powernv: add hdat attribute to sysfs

2017-03-22 Thread Andrew Donnellan
is stopped by the /dev/mem filter. Signed-off-by: Matt Brown Reviewed-by: Andrew Donnellan --- Changelog: v7: - moved exported_attrs and attr_name into opal_export_attrs --- arch/powerpc/platforms/powernv/opal.c | 84 +++ 1 file changed, 84

Re: [kernel-hardening] [PATCH v5 1/4] gcc-plugins: Add the initify gcc plugin

2017-03-27 Thread Andrew Donnellan
On 27/03/17 18:38, Andrew Donnellan wrote: On 01/02/17 07:24, Kees Cook wrote: From: Emese Revfy The kernel already has a mechanism to free up code and data memory that is only used during kernel or module initialization. This plugin will teach the compiler to find more such code and data

Re: [PATCH V3 1/7] cxl: Read vsec perst load image

2017-03-28 Thread Andrew Donnellan
Reviewed-by: Andrew Donnellan On 29/03/17 02:14, Christophe Lombard wrote: This bit is used to cause a flash image load for programmable CAIA-compliant implementation. If this bit is set to ‘0’, a power cycle of the adapter is required to load a programmable CAIA-com- pliant implementation

Re: [PATCH V3 2/7] cxl: Remove unused values in bare-metal environment.

2017-03-28 Thread Andrew Donnellan
avoid undefined behavior on bare-metal. The PSL Process and Thread Identification Register (CXL_PSL_PID_TID_An) is only used when attaching a dedicated process for PSL8 only. This register goes away in CAIA2. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan --- drivers/misc/cx

Re: [PATCH V3 3/7] cxl: Keep track of mm struct associated with a context

2017-03-28 Thread Andrew Donnellan
mm_struct can't be freed. The mm_struct will be released when the context is detached. A reference on mm_users is not kept to avoid a circular dependency if the process mmaps its cxl mmio and forget to unmap before exiting. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan -- A

Re: [PATCH V3 0/7] cxl: Add support for Coherent Accelerator Interface Architecture 2.0

2017-03-29 Thread Andrew Donnellan
the PSL and forwards them as PowerBus data packets. The PSL also has an optional DMA feature which allows the AFU to send native PCIe reads and writes to the Processor. Today Mikey reminded me that Documentation/powerpc/cxl.txt still exists - we probably ought to update it. -- Andrew Donnellan

Re: [PATCH V3 4/7] cxl: Update implementation service layer

2017-03-31 Thread Andrew Donnellan
psl interrupts. - Debug registers for the adapter and the afu. - Traces. Each environment implements its own functions, and the common code uses them through function pointers, defined in cxl_service_layer_ops. Signed-off-by: Christophe Lombard Reviewed-by: Andrew Donnellan --- drivers/misc

Re: [PATCH V3 5/7] cxl: Rename some psl8 specific functions

2017-03-31 Thread Andrew Donnellan
phe Lombard Looks fine to me Reviewed-by: Andrew Donnellan --- drivers/misc/cxl/cxl.h | 26 +- drivers/misc/cxl/debugfs.c | 6 +++--- drivers/misc/cxl/guest.c | 2 +- drivers/misc/cxl/irq.c | 2 +- drivers/misc/cxl/native.c | 12 ++-- drivers/mis

Re: [PATCH] cxl: Route eeh events to all drivers in cxl_pci_error_detected()

2017-04-05 Thread Andrew Donnellan
== PCI_ERS_RESULT_DISCONNECT) + result = PCI_ERS_RESULT_DISCONNECT; + else if ((afu_result == PCI_ERS_RESULT_NONE) && +(result == PCI_ERS_RESULT_NEED_RESET)) + result = PCI_ERS_RESULT_NONE; } /* should take the

Re: [PATCH V4 1/7] cxl: Read vsec perst load image

2017-04-09 Thread Andrew Donnellan
Reviewed-by: Andrew Donnellan On 08/04/17 00:11, Christophe Lombard wrote: This bit is used to cause a flash image load for programmable CAIA-compliant implementation. If this bit is set to ‘0’, a power cycle of the adapter is required to load a programmable CAIA-com- pliant implementation

<    2   3   4   5   6   7   8   9   10   11   >