Re: [PATCH v11 14/14] selftests/sgx: Add scripts for EPC cgroup testing

2024-04-14 Thread Haitao Huang
On Sun, 14 Apr 2024 10:01:03 -0500, Jarkko Sakkinen wrote: On Wed Apr 10, 2024 at 9:25 PM EEST, Haitao Huang wrote: To run selftests for EPC cgroup: sudo ./run_epc_cg_selftests.sh To watch misc cgroup 'current' changes during testing, run this in a separate terminal:

general protection fault in integrity_inode_get

2024-04-14 Thread Ubisectech Sirius
Hello. We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. Recently, our team has discovered a issue in Linux kernel 6.8. Attached to the email were a PoC file of the issue. Stack dump: loop0: detected capacity change from 0 to 64 hfs: unable to locate alternate MDB hfs:

Re: [PATCH] module: ban '.', '..' as module names, ban '/' in module names

2024-04-14 Thread Matthew Wilcox
On Sun, Apr 14, 2024 at 10:05:05PM +0300, Alexey Dobriyan wrote: > Any other subsystem should use nice helper function aptly named > > string_is_vfs_ready() > > and apply additional restrictions if necessary. > > /proc/modules hints that newlines should be banned too, > and \x1f, and

Re: [PATCH] module: ban '.', '..' as module names, ban '/' in module names

2024-04-14 Thread Luis Chamberlain
On Sun, Apr 14, 2024 at 10:05:05PM +0300, Alexey Dobriyan wrote: > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -3616,4 +3616,12 @@ extern int vfs_fadvise(struct file *file, loff_t > offset, loff_t len, > extern int generic_fadvise(struct file *file, loff_t offset, loff_t len, >

[PATCH] module: ban '.', '..' as module names, ban '/' in module names

2024-04-14 Thread Alexey Dobriyan
As the title says, ban . .. and any name containing '/' as they show in sysfs as directory names: /sys/module/${mod.name} sysfs tries to mangle the name and make '/' into '!' which kind of work but not really. Corrupting simple module to have name '/est' and loading it

Re: [PATCH 1/4] dt-bindings: iio: light: stk33xx: add regulator for vdd supply

2024-04-14 Thread Krzysztof Kozlowski
On 14/04/2024 19:57, Aren Moynihan wrote: > Signed-off-by: Aren Moynihan > --- Why? Please provide proper commit msg which will explain why you are doing it (e.g. say about hardware). Anyway empty commit msgs cannot be accepted. Best regards, Krzysztof

[PATCH 4/4] arm64: dts: allwinner: pinephone: Add power supply to stk3311

2024-04-14 Thread Aren Moynihan
From: Ondrej Jirman This makes the driver disable the supply during sleep. Signed-off-by: Ondrej Jirman Signed-off-by: Aren Moynihan --- arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 3/4] iio: light: stk3310: log error if reading the chip id fails

2024-04-14 Thread Aren Moynihan
If the chip isn't powered, this call is likely to return an error. Without a log here the driver will silently fail to probe. Common errors are ENXIO (when the chip isn't powered) and ETIMEDOUT (when the i2c bus isn't powered). Signed-off-by: Aren Moynihan --- drivers/iio/light/stk3310.c | 4

[PATCH 2/4] iio: light: stk3310: Implement vdd supply and power it off during suspend

2024-04-14 Thread Aren Moynihan
From: Ondrej Jirman VDD power input can be used to completely power off the chip during system suspend. Do so if available. Signed-off-by: Ondrej Jirman Signed-off-by: Aren Moynihan --- drivers/iio/light/stk3310.c | 56 +++-- 1 file changed, 53 insertions(+),

[PATCH 1/4] dt-bindings: iio: light: stk33xx: add regulator for vdd supply

2024-04-14 Thread Aren Moynihan
Signed-off-by: Aren Moynihan --- Documentation/devicetree/bindings/iio/light/stk33xx.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/light/stk33xx.yaml b/Documentation/devicetree/bindings/iio/light/stk33xx.yaml index f6e22dc9814a..db35e239d4a8

[PATCH 0/4] iio: light: stk3310: support powering off during suspend

2024-04-14 Thread Aren Moynihan
In the Pine64 PinePhone, the stk3310 chip is powered by a regulator that is disabled at system boot and can be shut off during suspend. To ensure that the chip properly initializes, both after boot and suspend, we need to manage this regulator. Additionally if the chip is shut off in suspend, we

Re: [PATCH] openrisc: Use do_kernel_power_off()

2024-04-14 Thread Sebastian Reichel
Hi, On Sun, Mar 31, 2024 at 08:02:28AM +0100, Stafford Horne wrote: > After commit 14c5678720bd ("power: reset: syscon-poweroff: Use > devm_register_sys_off_handler(POWER_OFF)") setting up of pm_power_off > was removed from the driver, this causes OpenRISC platforms using > syscon-poweroff to no

Re: [GIT PULL] virtio: bugfixes

2024-04-14 Thread pr-tracker-bot
The pull request you sent on Sun, 14 Apr 2024 04:20:47 -0400: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/399f4dae683a719eeeca8f30d3871577b53ffcca Thank you! -- Deet-doot-dot, I am a

Re: [PATCH v11 14/14] selftests/sgx: Add scripts for EPC cgroup testing

2024-04-14 Thread Jarkko Sakkinen
On Wed Apr 10, 2024 at 9:25 PM EEST, Haitao Huang wrote: > To run selftests for EPC cgroup: > > sudo ./run_epc_cg_selftests.sh > > To watch misc cgroup 'current' changes during testing, run this in a > separate terminal: > > ./watch_misc_for_tests.sh current > > With different cgroups, the script

Re: [PATCH v3] bootconfig: use memblock_free_late to free xbc memory to buddy

2024-04-14 Thread Google
On Sun, 14 Apr 2024 19:49:45 +0800 qiang4.zh...@linux.intel.com wrote: > From: Qiang Zhang > > On the time to free xbc memory in xbc_exit(), memblock may has handed > over memory to buddy allocator. So it doesn't make sense to free memory > back to memblock. memblock_free() called by xbc_exit()

[PATCH v3] bootconfig: use memblock_free_late to free xbc memory to buddy

2024-04-14 Thread qiang4 . zhang
From: Qiang Zhang On the time to free xbc memory in xbc_exit(), memblock may has handed over memory to buddy allocator. So it doesn't make sense to free memory back to memblock. memblock_free() called by xbc_exit() even causes UAF bugs on architectures with CONFIG_ARCH_KEEP_MEMBLOCK disabled

Re: [PATCH v2] bootconfig: use memblock_free_late to free xbc memory to buddy

2024-04-14 Thread Qiang Zhang
On Sat, Apr 13, 2024 at 09:21:38PM +0900, Masami Hiramatsu wrote: >Hi Qiang, > >I found xbc_free_mem() missed to check !addr. When I booted kernel without >bootconfig data but with "bootconfig" cmdline, I got a kernel crash below; > > >[2.394904] [ cut here ] >[

[syzbot] [trace?] [bpf?] possible deadlock in pwq_dec_nr_in_flight

2024-04-14 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:fe46a7dd189e Merge tag 'sound-6.9-rc1' of git://git.kernel.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15d2559918 kernel config: https://syzkaller.appspot.com/x/.config?x=4d90a36f0cab495a

[PATCH v2] vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API

2024-04-14 Thread Christophe JAILLET
ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_max() is inclusive. So a -1 has been added when needed. Signed-off-by: Christophe JAILLET Reviewed-by:

Re: [PATCH] vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API

2024-04-14 Thread Michael S. Tsirkin
On Sun, Apr 14, 2024 at 10:59:06AM +0200, Christophe JAILLET wrote: > Le 14/04/2024 à 10:35, Michael S. Tsirkin a écrit : > > On Mon, Jan 15, 2024 at 09:35:50PM +0100, Christophe JAILLET wrote: > > > ida_alloc() and ida_free() should be preferred to the deprecated > > > ida_simple_get() and

Re: [PATCH] vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API

2024-04-14 Thread Christophe JAILLET
Le 14/04/2024 à 10:35, Michael S. Tsirkin a écrit : On Mon, Jan 15, 2024 at 09:35:50PM +0100, Christophe JAILLET wrote: ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive,

Re: [PATCH] vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API

2024-04-14 Thread Michael S. Tsirkin
On Mon, Jan 15, 2024 at 09:35:50PM +0100, Christophe JAILLET wrote: > ida_alloc() and ida_free() should be preferred to the deprecated > ida_simple_get() and ida_simple_remove(). > > Note that the upper limit of ida_simple_get() is exclusive, buInputt the one > of What's buInputt? But? >

Re: [PATCH] vhost-vdpa: Remove usage of the deprecated ida_simple_xx() API

2024-04-14 Thread Christophe JAILLET
Le 16/01/2024 à 15:57, Simon Horman a écrit : On Mon, Jan 15, 2024 at 09:35:50PM +0100, Christophe JAILLET wrote: ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, buInputt the

[GIT PULL] virtio: bugfixes

2024-04-14 Thread Michael S. Tsirkin
The following changes since commit fec50db7033ea478773b159e0e2efb135270e3b7: Linux 6.9-rc3 (2024-04-07 13:22:46 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to

Re: [RFC PATCH 5/7] x86/module: perpare module loading for ROX allocations of text

2024-04-14 Thread Mike Rapoport
On Fri, Apr 12, 2024 at 11:08:00AM +0200, Ingo Molnar wrote: > > * Mike Rapoport wrote: > > > for (s = start; s < end; s++) { > > void *addr = (void *)s + *s; > > + void *wr_addr = addr + module_writable_offset(mod, addr); > > So instead of repeating this pattern in a

Re: [RFC PATCH 2/7] mm: vmalloc: don't account for number of nodes for HUGE_VMAP allocations

2024-04-14 Thread Mike Rapoport
On Fri, Apr 12, 2024 at 06:07:19AM +, Christophe Leroy wrote: > > > Le 11/04/2024 à 18:05, Mike Rapoport a écrit : > > From: "Mike Rapoport (IBM)" > > > > vmalloc allocations with VM_ALLOW_HUGE_VMAP that do not explictly > > specify node ID will use huge pages only if size_per_node is

Re: [PATCH v4 06/15] mm/execmem, arch: convert simple overrides of module_alloc to execmem

2024-04-14 Thread Mike Rapoport
On Thu, Apr 11, 2024 at 10:53:46PM +0200, Sam Ravnborg wrote: > Hi Mike. > > On Thu, Apr 11, 2024 at 07:00:42PM +0300, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > Several architectures override module_alloc() only to define address > > range for code allocations different than

Re: [PATCH v4 05/15] mm: introduce execmem_alloc() and execmem_free()

2024-04-14 Thread Mike Rapoport
On Fri, Apr 12, 2024 at 11:16:10AM +0200, Ingo Molnar wrote: > > * Mike Rapoport wrote: > > > +/** > > + * enum execmem_type - types of executable memory ranges > > + * > > + * There are several subsystems that allocate executable memory. > > + * Architectures define different restrictions on

Re: [PATCH v4 05/15] mm: introduce execmem_alloc() and execmem_free()

2024-04-14 Thread Mike Rapoport
On Thu, Apr 11, 2024 at 12:42:05PM -0700, Luis Chamberlain wrote: > On Thu, Apr 11, 2024 at 07:00:41PM +0300, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > module_alloc() is used everywhere as a mean to allocate memory for code. > > > > Beside being semantically wrong, this