Re: [PATCH v2] arch/riscv: Enable kprobes when CONFIG_MODULES=n

2024-03-26 Thread Calvin Owens
On Wednesday 03/27 at 00:24 +0900, Masami Hiramatsu wrote: > On Tue, 26 Mar 2024 14:46:10 + > Mark Rutland wrote: > > > Hi Masami, > > > > On Mon, Mar 25, 2024 at 11:56:32AM +0900, Masami Hiramatsu wrote: > > > Hi Jarkko, > > > > > > On Sun, 24 Mar 2024 01:29:08 +0200 > > > Jarkko Sakkinen

Re: [PATCH v2] arch/riscv: Enable kprobes when CONFIG_MODULES=n

2024-03-25 Thread Calvin Owens
On Monday 03/25 at 11:56 +0900, Masami Hiramatsu wrote: > Hi Jarkko, > > On Sun, 24 Mar 2024 01:29:08 +0200 > Jarkko Sakkinen wrote: > > > Tracing with kprobes while running a monolithic kernel is currently > > impossible due the kernel module allocator dependency. > > > > Address the issue by

Re: [RFC][PATCH 2/4] bpf: Allow BPF_JIT with CONFIG_MODULES=n

2024-03-08 Thread Calvin Owens
On Thursday 03/07 at 22:09 +, Christophe Leroy wrote: > > > Le 06/03/2024 à 21:05, Calvin Owens a écrit : > > [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com. > > Découvrez pourquoi ceci est important à > > https://aka.ms/LearnAboutSenderIdent

Re: [RFC][PATCH 3/4] kprobes: Allow kprobes with CONFIG_MODULES=n

2024-03-08 Thread Calvin Owens
On Thursday 03/07 at 22:16 +, Christophe Leroy wrote: > > > Le 06/03/2024 à 21:05, Calvin Owens a écrit : > > [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com. > > Découvrez pourquoi ceci est important à > > https://aka.ms/Lea

Re: [RFC][PATCH 3/4] kprobes: Allow kprobes with CONFIG_MODULES=n

2024-03-08 Thread Calvin Owens
On Friday 03/08 at 11:46 +0900, Masami Hiramatsu wrote: > On Wed, 6 Mar 2024 12:05:10 -0800 > Calvin Owens wrote: > > > If something like this is merged down the road, it can go in at leisure > > once the module_alloc change is in: it's a one-way dependency. > > >

Re: [RFC][PATCH 1/4] module: mm: Make module_alloc() generally available

2024-03-08 Thread Calvin Owens
On Thursday 03/07 at 14:43 +, Christophe Leroy wrote: > Hi Calvin, > > Le 06/03/2024 à 21:05, Calvin Owens a écrit : > > [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com. > > Découvrez pourquoi ceci est important à > > https://aka.ms/Lea

Re: [RFC][PATCH 1/4] module: mm: Make module_alloc() generally available

2024-03-08 Thread Calvin Owens
On Friday 03/08 at 11:16 +0900, Masami Hiramatsu wrote: > Hi Calvin, > > On Wed, 6 Mar 2024 12:05:08 -0800 > Calvin Owens wrote: > > > Both BPF_JIT and KPROBES depend on CONFIG_MODULES, but only require > > module_alloc() itself, which can be easily separated into

Re: [RFC][PATCH 3/4] kprobes: Allow kprobes with CONFIG_MODULES=n

2024-03-08 Thread Calvin Owens
On Thursday 03/07 at 09:22 +0200, Mike Rapoport wrote: > On Wed, Mar 06, 2024 at 12:05:10PM -0800, Calvin Owens wrote: > > If something like this is merged down the road, it can go in at leisure > > once the module_alloc change is in: it's a one-way dependency. > > > >

Re: [RFC][PATCH 0/4] Make bpf_jit and kprobes work with CONFIG_MODULES=n

2024-03-08 Thread Calvin Owens
! :) > > > > > > On Wed, Mar 6, 2024 at 3:23 PM Calvin Owens > > > wrote: > > > > > > > > On Wednesday 03/06 at 13:34 -0800, Luis Chamberlain wrote: > > > > > On Wed, Mar 06, 2024 at 12:05:07PM -0800, Calvin Owens wrote: > > &

Re: [RFC][PATCH 0/4] Make bpf_jit and kprobes work with CONFIG_MODULES=n

2024-03-06 Thread Calvin Owens
On Wednesday 03/06 at 13:34 -0800, Luis Chamberlain wrote: > On Wed, Mar 06, 2024 at 12:05:07PM -0800, Calvin Owens wrote: > > Hello all, > > > > This patchset makes it possible to use bpftrace with kprobes on kernels > > built without loadable module support. >

[RFC][PATCH 4/4] selftests/bpf: Support testing the !MODULES case

2024-03-06 Thread Calvin Owens
to suggest a less ugly way I can do this... Signed-off-by: Calvin Owens --- include/trace/events/bpf_testmod.h| 1 + kernel/bpf/Kconfig| 9 ++ kernel/bpf/Makefile | 2 ++ kernel/bpf/bpf_testmod/Makefile | 1

[RFC][PATCH 3/4] kprobes: Allow kprobes with CONFIG_MODULES=n

2024-03-06 Thread Calvin Owens
If something like this is merged down the road, it can go in at leisure once the module_alloc change is in: it's a one-way dependency. Signed-off-by: Calvin Owens --- arch/Kconfig| 2 +- kernel/kprobes.c| 22 ++ kernel/trace/trace_kprobe.c | 11

[RFC][PATCH 1/4] module: mm: Make module_alloc() generally available

2024-03-06 Thread Calvin Owens
://lore.kernel.org/all/20220716230953.442937...@linutronix.de/ I've simply extended that approach to the whole kernel. Signed-off-by: Calvin Owens --- arch/Kconfig | 2 +- arch/arm/kernel/module.c | 35 - arch/arm/mm/Makefile | 2 + arch/arm/mm

[RFC][PATCH 2/4] bpf: Allow BPF_JIT with CONFIG_MODULES=n

2024-03-06 Thread Calvin Owens
once the module_alloc change is in: it's a one-way dependency. Signed-off-by: Calvin Owens --- kernel/bpf/Kconfig | 2 +- kernel/bpf/bpf_struct_ops.c | 28 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/kernel/bpf/Kconfig b/kernel/bpf

[RFC][PATCH 0/4] Make bpf_jit and kprobes work with CONFIG_MODULES=n

2024-03-06 Thread Calvin Owens
Of course, feedback on the arch bits is welcome here. In addition to feedback on the patches themselves, I'm interested in hearing from anybody else who might find this functionality useful. Thanks, Calvin Calvin Owens (4): module: mm: Make module_alloc() generally available bpf: All

Re: [PATCH 3/4] printk: Add consoles to a virtual "console" bus

2019-03-12 Thread Calvin Owens
On Monday 03/11 at 14:33 +0100, Petr Mladek wrote: > On Fri 2019-03-01 16:48:19, Calvin Owens wrote: > > This patch embeds a device struct in the console struct, and registers > > them on a "console" bus so we can expose attributes in sysfs. > > > > Currently

Re: [PATCH 1/4] printk: Introduce per-console loglevel setting

2019-03-12 Thread Calvin Owens
On Friday 03/08 at 12:10 +0900, Sergey Senozhatsky wrote: > On (03/01/19 16:48), Calvin Owens wrote: > [..] > > msg = log_from_idx(console_idx); > > - if (suppress_message_printing(msg->level)) { > > - /* > > -

Re: [PATCH 3/4] printk: Add consoles to a virtual "console" bus

2019-03-12 Thread Calvin Owens
On Friday 03/08 at 16:53 +0100, Petr Mladek wrote: > On Fri 2019-03-01 16:48:19, Calvin Owens wrote: > > This patch embeds a device struct in the console struct, and registers > > them on a "console" bus so we can expose attributes in sysfs. > > > > Early co

Re: [PATCH 3/4] printk: Add consoles to a virtual "console" bus

2019-03-12 Thread Calvin Owens
On Friday 03/08 at 17:34 +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 08, 2019 at 04:58:14PM +0100, Petr Mladek wrote: > > On Fri 2019-03-08 03:56:19, John Ogness wrote: > > > On 2019-03-02, Calvin Owens wrote: > > > > This patch embeds a device struct in the

Re: [PATCH] tpm: Make timeout logic simpler and more robust

2019-03-12 Thread Calvin Owens
On Tuesday 03/12 at 13:04 -0400, Mimi Zohar wrote: > On Mon, 2019-03-11 at 16:54 -0700, Calvin Owens wrote: > > We're having lots of problems with TPM commands timing out, and we're > > seeing these problems across lots of different hardware (both v1/v2). > > > >

Re: [PATCH] tpm: Make timeout logic simpler and more robust

2019-03-12 Thread Calvin Owens
Mon, 2019-03-11 at 16:54 -0700, Calvin Owens wrote: > > > > > e're having lots of problems with TPM commands timing out, and > > > > > we're seeing these problems across lots of different hardware > > > > > (both v1/v2). > > > > > > &

Re: [PATCH] tpm: Make timeout logic simpler and more robust

2019-03-12 Thread Calvin Owens
On Monday 03/11 at 17:27 -0700, James Bottomley wrote: > On Mon, 2019-03-11 at 16:54 -0700, Calvin Owens wrote: > > e're having lots of problems with TPM commands timing out, and we're > > seeing these problems across lots of different hardware (both v1/v2). > > > >

[PATCH] tpm: Make timeout logic simpler and more robust

2019-03-11 Thread Calvin Owens
tried replacing all the timeout logic with a single universal long timeout, and found that makes our TPMs 100% reliable. Given that this timeout logic is very complex, problematic, and appears to serve no real purpose, I propose simply deleting all of it. Signed-off-by: Calvin Owens --- drivers

Re: [PATCH 4/4] printk: Add a device attribute for the per-console loglevel

2019-03-04 Thread Calvin Owens
On Monday 03/04 at 17:06 +0900, Sergey Senozhatsky wrote: > On (03/01/19 16:48), Calvin Owens wrote: > > +static struct attribute *console_sysfs_attrs[] = { > > + _attr_loglevel.attr, > > + NULL, > > +}; > > +ATTRIBUTE_GROUPS(console_sysfs); > > + >

[PATCH 2/4] printk: Add ability to set loglevel via "console=" cmdline

2019-03-01 Thread Calvin Owens
This extends the "console=" interface to allow setting the per-console loglevel by adding "/N" to the string, where N is the desired loglevel expressed as a base 10 integer. Invalid values are silently ignored. Signed-off-by: Calvin Owens --- .../admin-guide/kernel-paramet

[PATCH 1/4] printk: Introduce per-console loglevel setting

2019-03-01 Thread Calvin Owens
ive system loglevel setting to avoid disturbing applications. Signed-off-by: Calvin Owens --- include/linux/console.h | 1 + kernel/printk/printk.c | 36 +++- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/include/linux/console.h b/include/linux

[PATCH 4/4] printk: Add a device attribute for the per-console loglevel

2019-03-01 Thread Calvin Owens
Signed-off-by: Calvin Owens --- kernel/printk/printk.c | 40 1 file changed, 40 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 67e1e993ab80..e7e602fa2d0b 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c

[RFC][PATCH 0/4] Per-console loglevel support, console device bus

2019-03-01 Thread Calvin Owens
attributes in sysfs. I left the very long list of driver maintainers off this first submission, once there's agreement on the core idea here I'll add them. Thanks, Calvin Calvin Owens (4): printk: Introduce per-console loglevel setting printk: Add ability to set loglevel via "console=&qu

[PATCH] bnxt_en: Fix sources of spurious netpoll warnings

2017-12-08 Thread Calvin Owens
we increment rx_pkts on -ENOMEM and -EIO, resulting in rx_pkts > 0. Fix this by only bumping rx_pkts if we were actually given a non-zero budget. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] bnxt_en: Fix sources of spurious netpoll warnings

2017-12-08 Thread Calvin Owens
we increment rx_pkts on -ENOMEM and -EIO, resulting in rx_pkts > 0. Fix this by only bumping rx_pkts if we were actually given a non-zero budget. Signed-off-by: Calvin Owens --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net

Re: [PATCH 2/3] printk: Add /sys/consoles/ interface

2017-11-08 Thread Calvin Owens
On 11/03/2017 07:32 AM, Kroah-Hartman wrote: On Fri, Nov 03, 2017 at 03:21:14PM +0100, Petr Mladek wrote: On Thu 2017-09-28 17:43:56, Calvin Owens wrote: This adds a new sysfs interface that contains a directory for each console registered on the system. Each directory contains a single

Re: [PATCH 2/3] printk: Add /sys/consoles/ interface

2017-11-08 Thread Calvin Owens
On 11/03/2017 07:32 AM, Kroah-Hartman wrote: On Fri, Nov 03, 2017 at 03:21:14PM +0100, Petr Mladek wrote: On Thu 2017-09-28 17:43:56, Calvin Owens wrote: This adds a new sysfs interface that contains a directory for each console registered on the system. Each directory contains a single

Re: [PATCH 1/3] printk: Introduce per-console loglevel setting

2017-10-20 Thread Calvin Owens
On 10/20/2017 01:05 AM, Petr Mladek wrote: On Thu 2017-10-19 16:40:45, Calvin Owens wrote: On 09/28/2017 05:43 PM, Calvin Owens wrote: Not all consoles are created equal: depending on the actual hardware, the latency of a printk() call can vary dramatically. The worst examples are serial

Re: [PATCH 1/3] printk: Introduce per-console loglevel setting

2017-10-20 Thread Calvin Owens
On 10/20/2017 01:05 AM, Petr Mladek wrote: On Thu 2017-10-19 16:40:45, Calvin Owens wrote: On 09/28/2017 05:43 PM, Calvin Owens wrote: Not all consoles are created equal: depending on the actual hardware, the latency of a printk() call can vary dramatically. The worst examples are serial

Re: [PATCH 1/3] printk: Introduce per-console loglevel setting

2017-10-19 Thread Calvin Owens
On 09/28/2017 05:43 PM, Calvin Owens wrote: Not all consoles are created equal: depending on the actual hardware, the latency of a printk() call can vary dramatically. The worst examples are serial consoles, where it can spin for tens of milliseconds banging the UART to emit a message, which can

Re: [PATCH 1/3] printk: Introduce per-console loglevel setting

2017-10-19 Thread Calvin Owens
On 09/28/2017 05:43 PM, Calvin Owens wrote: Not all consoles are created equal: depending on the actual hardware, the latency of a printk() call can vary dramatically. The worst examples are serial consoles, where it can spin for tens of milliseconds banging the UART to emit a message, which can

[PATCH 1/3] printk: Introduce per-console loglevel setting

2017-09-28 Thread Calvin Owens
ive system loglevel setting to avoid disturbing applications. Cc: Petr Mladek <pmla...@suse.com> Cc: Steven Rostedt <rost...@goodmis.org> Cc: Sergey Senozhatsky <sergey.senozhat...@gmail.com> Signed-off-by: Calvin Owens <calvinow...@fb.com> --- (V1: https://lkml.org

[PATCH 1/3] printk: Introduce per-console loglevel setting

2017-09-28 Thread Calvin Owens
ive system loglevel setting to avoid disturbing applications. Cc: Petr Mladek Cc: Steven Rostedt Cc: Sergey Senozhatsky Signed-off-by: Calvin Owens --- (V1: https://lkml.org/lkml/2017/4/4/783) Changes in V2: * Honor the ignore_loglevel setting in all cases * Change semantics

[PATCH 3/3] printk: Add ability to set loglevel via "console=" cmdline

2017-09-28 Thread Calvin Owens
st...@goodmis.org> Cc: Sergey Senozhatsky <sergey.senozhat...@gmail.com> Signed-off-by: Calvin Owens <calvinow...@fb.com> --- Documentation/admin-guide/kernel-parameters.txt | 6 ++--- kernel/printk/console_cmdline.h | 1 + kernel/printk/printk.c

[PATCH 3/3] printk: Add ability to set loglevel via "console=" cmdline

2017-09-28 Thread Calvin Owens
This extends the "console=" interface to allow setting the per-console loglevel by adding "/N" to the string, where N is the desired loglevel expressed as a base 10 integer. Invalid values are silently ignored. Cc: Petr Mladek Cc: Steven Rostedt Cc: Sergey Senozhatsky S

[PATCH 2/3] printk: Add /sys/consoles/ interface

2017-09-28 Thread Calvin Owens
gey.senozhat...@gmail.com> Signed-off-by: Calvin Owens <calvinow...@fb.com> --- (V1: https://lkml.org/lkml/2017/4/4/784) Changes in V2: * Honor minimum_console_loglevel when setting loglevels * Added entry in Documentation/ABI/testing Documentation/ABI/testing/sysfs-

[PATCH 2/3] printk: Add /sys/consoles/ interface

2017-09-28 Thread Calvin Owens
show,store}() will safely fail with -ENODEV. This is a little weird, but avoids embedding the kobject and therefore needing to totally refactor the way we handle console struct lifetime. Cc: Petr Mladek Cc: Steven Rostedt Cc: Sergey Senozhatsky Signed-off-by: Calvin Owens --- (V1: https://lkml.org/lkm

Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-06 Thread Calvin Owens
On Thursday 04/06 at 16:02 +0200, Petr Mladek wrote: > On Wed 2017-04-05 17:38:19, Calvin Owens wrote: > > On Wednesday 04/05 at 17:22 +0200, Petr Mladek wrote: > > > I think about a reasonable behavior. There seems to be three variables > > > that

Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-06 Thread Calvin Owens
On Thursday 04/06 at 16:02 +0200, Petr Mladek wrote: > On Wed 2017-04-05 17:38:19, Calvin Owens wrote: > > On Wednesday 04/05 at 17:22 +0200, Petr Mladek wrote: > > > I think about a reasonable behavior. There seems to be three variables > > > that

Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-05 Thread Calvin Owens
On Wednesday 04/05 at 17:22 +0200, Petr Mladek wrote: > On Wed 2017-04-05 11:16:28, Sergey Senozhatsky wrote: > > On (04/05/17 11:08), Sergey Senozhatsky wrote: > > [..] > > > > stop_critical_timings();/* don't trace print > > > > latency */ > > > > -

Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-05 Thread Calvin Owens
On Wednesday 04/05 at 17:22 +0200, Petr Mladek wrote: > On Wed 2017-04-05 11:16:28, Sergey Senozhatsky wrote: > > On (04/05/17 11:08), Sergey Senozhatsky wrote: > > [..] > > > > stop_critical_timings();/* don't trace print > > > > latency */ > > > > -

Re: [RFC][PATCH 2/2] printk: Add /sys/consoles/${con}/ and maxlevel attribute

2017-04-05 Thread Calvin Owens
On Tuesday 04/04 at 23:30 -0400, Steven Rostedt wrote: > On Tue, 4 Apr 2017 16:03:20 -0700 > Calvin Owens <calvinow...@fb.com> wrote: > > > This does the simplest possible thing: add a directory at the root of > > sysfs that allows setting the "maxlevel" pa

Re: [RFC][PATCH 2/2] printk: Add /sys/consoles/${con}/ and maxlevel attribute

2017-04-05 Thread Calvin Owens
On Tuesday 04/04 at 23:30 -0400, Steven Rostedt wrote: > On Tue, 4 Apr 2017 16:03:20 -0700 > Calvin Owens wrote: > > > This does the simplest possible thing: add a directory at the root of > > sysfs that allows setting the "maxlevel" parameter for each conso

Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-05 Thread Calvin Owens
On Tuesday 04/04 at 23:27 -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 11:16:28 +0900 > Sergey Senozhatsky wrote: > > > > one more thing. > > > > this per-console filtering ignores... the "ignore_loglevel" param. > > > > early_param("ignore_loglevel",

Re: [RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-05 Thread Calvin Owens
On Tuesday 04/04 at 23:27 -0400, Steven Rostedt wrote: > On Wed, 5 Apr 2017 11:16:28 +0900 > Sergey Senozhatsky wrote: > > > > one more thing. > > > > this per-console filtering ignores... the "ignore_loglevel" param. > > > > early_param("ignore_loglevel", ignore_loglevel_setup); > >

[RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-04 Thread Calvin Owens
based on the speed of the slowest one, we can limit each based on its own speed. A subsequent patch will introduce a simple sysfs interface for changing this setting. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- include/linux/console.h | 1 + kernel/printk/printk.c | 13 ++

[RFC][PATCH 1/2] printk: Introduce per-console filtering of messages by loglevel

2017-04-04 Thread Calvin Owens
based on the speed of the slowest one, we can limit each based on its own speed. A subsequent patch will introduce a simple sysfs interface for changing this setting. Signed-off-by: Calvin Owens --- include/linux/console.h | 1 + kernel/printk/printk.c | 13 ++--- 2 files changed, 11

[RFC][PATCH 2/2] printk: Add /sys/consoles/${con}/ and maxlevel attribute

2017-04-04 Thread Calvin Owens
ttle weird, but avoids embedding the kobject and therefore needing to totally refactor the way we handle console struct lifetime. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- include/linux/console.h | 1 + kernel/printk/printk.c | 82 + 2 f

[RFC][PATCH 2/2] printk: Add /sys/consoles/${con}/ and maxlevel attribute

2017-04-04 Thread Calvin Owens
ttle weird, but avoids embedding the kobject and therefore needing to totally refactor the way we handle console struct lifetime. Signed-off-by: Calvin Owens --- include/linux/console.h | 1 + kernel/printk/printk.c | 82 + 2 files changed, 83 insertion

[PATCH v3] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-30 Thread Calvin Owens
edhat.com> Cc: <sta...@vger.kernel.org> # 4.8+ Signed-off-by: Calvin Owens <calvinow...@fb.com> --- fs/xfs/xfs_bmap_util.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 8b75dce..828532c 1006

[PATCH v3] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-30 Thread Calvin Owens
his by reintroducing the checks xfs_zero_remaining_bytes() did against i_size at the bottom of xfs_free_file_space(). Reported-by: Aaron Gao Fixes: 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") Cc: Christoph Hellwig Cc: Brian Foster Cc: # 4.8+ Signed-off-by: Calvin Owens --

Re: [PATCH v2] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-21 Thread Calvin Owens
On 03/21/2017 04:39 AM, Brian Foster wrote: On Sun, Mar 19, 2017 at 09:54:51PM -0700, Calvin Owens wrote: When punching past EOF on XFS, fallocate(mode=PUNCH_HOLE|KEEP_SIZE) will round the file size up to the nearest multiple of PAGE_SIZE: calvinow@vm-disks/generic-xfs-1 ~$ dd if=/dev

Re: [PATCH v2] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-21 Thread Calvin Owens
On 03/21/2017 04:39 AM, Brian Foster wrote: On Sun, Mar 19, 2017 at 09:54:51PM -0700, Calvin Owens wrote: When punching past EOF on XFS, fallocate(mode=PUNCH_HOLE|KEEP_SIZE) will round the file size up to the nearest multiple of PAGE_SIZE: calvinow@vm-disks/generic-xfs-1 ~$ dd if=/dev

[PATCH v2] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-19 Thread Calvin Owens
his by reintroducing the checks xfs_zero_remaining_bytes() did against i_size at the bottom of xfs_free_file_space(). Reported-by: Aaron Gao <g...@fb.com> Fixes: 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") Cc: Christoph Hellwig <h...@lst.de> Cc: <sta...@vger.kernel.org&

[PATCH v2] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-19 Thread Calvin Owens
his by reintroducing the checks xfs_zero_remaining_bytes() did against i_size at the bottom of xfs_free_file_space(). Reported-by: Aaron Gao Fixes: 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") Cc: Christoph Hellwig Cc: # 4.8+ Signed-off-by: Calvin Owens --- fs/xfs/xfs_bmap_u

[PATCH] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-17 Thread Calvin Owens
e(). Reported-by: Aaron Gao <g...@fb.com> Fixes: 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") Cc: Christoph Hellwig <h...@lst.de> Cc: <sta...@vger.kernel.org> # 4.8+ Signed-off-by: Calvin Owens <calvinow...@fb.com> --- fs/xfs/xfs_file.c | 11 +++ 1

[PATCH] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-17 Thread Calvin Owens
e(). Reported-by: Aaron Gao Fixes: 3c2bdc912a1cc050 ("xfs: kill xfs_zero_remaining_bytes") Cc: Christoph Hellwig Cc: # 4.8+ Signed-off-by: Calvin Owens --- fs/xfs/xfs_file.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index

Re: [PATCH] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-17 Thread Calvin Owens
> Fix this by reintroducing the checks xfs_zero_remaining_bytes() did > against i_size into xfs_zero_range(). Sorry this is wrong: I missed that xfs_zero_range() has another caller that depends on the behavior I'm changing. I'll send a v2 with the same hunk at the bottom of xfs_free_file_space()

Re: [PATCH] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files

2017-03-17 Thread Calvin Owens
> Fix this by reintroducing the checks xfs_zero_remaining_bytes() did > against i_size into xfs_zero_range(). Sorry this is wrong: I missed that xfs_zero_range() has another caller that depends on the behavior I'm changing. I'll send a v2 with the same hunk at the bottom of xfs_free_file_space()

Re: [PATCH] fs: Assert on module file_operations without an owner

2016-10-07 Thread Calvin Owens
On Friday 10/07 at 17:18 -0400, Calvin Owens wrote: > On Friday 10/07 at 21:48 +0100, Al Viro wrote: > > On Fri, Oct 07, 2016 at 01:35:52PM -0700, Calvin Owens wrote: > > > Omitting the owner field in file_operations declared in modules is an > > > easy mistake to make

Re: [PATCH] fs: Assert on module file_operations without an owner

2016-10-07 Thread Calvin Owens
On Friday 10/07 at 17:18 -0400, Calvin Owens wrote: > On Friday 10/07 at 21:48 +0100, Al Viro wrote: > > On Fri, Oct 07, 2016 at 01:35:52PM -0700, Calvin Owens wrote: > > > Omitting the owner field in file_operations declared in modules is an > > > easy mistake to make

Re: [PATCH] fs: Assert on module file_operations without an owner

2016-10-07 Thread Calvin Owens
On Friday 10/07 at 21:48 +0100, Al Viro wrote: > On Fri, Oct 07, 2016 at 01:35:52PM -0700, Calvin Owens wrote: > > Omitting the owner field in file_operations declared in modules is an > > easy mistake to make, and can result in crashes when the module is > > unloaded whil

Re: [PATCH] fs: Assert on module file_operations without an owner

2016-10-07 Thread Calvin Owens
On Friday 10/07 at 21:48 +0100, Al Viro wrote: > On Fri, Oct 07, 2016 at 01:35:52PM -0700, Calvin Owens wrote: > > Omitting the owner field in file_operations declared in modules is an > > easy mistake to make, and can result in crashes when the module is > > unloaded whil

[PATCH net-next] nfnetlink_log: Use GFP_NOWARN for skb allocation

2016-10-07 Thread Calvin Owens
Since the code explicilty falls back to a smaller allocation when the large one fails, we shouldn't complain when that happens. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- net/netfilter/nfnetlink_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net

[PATCH net-next] nfnetlink_log: Use GFP_NOWARN for skb allocation

2016-10-07 Thread Calvin Owens
Since the code explicilty falls back to a smaller allocation when the large one fails, we shouldn't complain when that happens. Signed-off-by: Calvin Owens --- net/netfilter/nfnetlink_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nfnetlink_log.c b/net

[PATCH] fs: Assert on module file_operations without an owner

2016-10-07 Thread Calvin Owens
a reference on the containing module. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- include/linux/fs.h | 13 - kernel/module.c| 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 901e25d..fafda9e 100644 --- a/i

[PATCH] fs: Assert on module file_operations without an owner

2016-10-07 Thread Calvin Owens
a reference on the containing module. Signed-off-by: Calvin Owens --- include/linux/fs.h | 13 - kernel/module.c| 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 901e25d..fafda9e 100644 --- a/include/linux/fs.h +++ b

[PATCH v2 net-next] mlx5: Add ndo_poll_controller() implementation

2016-09-28 Thread Calvin Owens
This implements ndo_poll_controller in net_device_ops callbacks for mlx5, which is necessary to use netconsole with this driver. Acked-By: Saeed Mahameed <sae...@mellanox.com> Signed-off-by: Calvin Owens <calvinow...@fb.com> --- Changes in v2: * Only iterate channels to avo

[PATCH v2 net-next] mlx5: Add ndo_poll_controller() implementation

2016-09-28 Thread Calvin Owens
This implements ndo_poll_controller in net_device_ops callbacks for mlx5, which is necessary to use netconsole with this driver. Acked-By: Saeed Mahameed Signed-off-by: Calvin Owens --- Changes in v2: * Only iterate channels to avoid redundant napi_schedule() calls drivers/net/ethernet

[PATCH v2] mlx5: Add ndo_poll_controller() implementation

2016-09-27 Thread Calvin Owens
This implements ndo_poll_controller in net_device_ops callback for mlx5, which is necessary to use netconsole with this driver. Cc: Saeed Mahameed <sae...@dev.mellanox.co.il> Signed-off-by: Calvin Owens <calvinow...@fb.com> --- Changes in v2: * Only iterate channels to avo

[PATCH v2] mlx5: Add ndo_poll_controller() implementation

2016-09-27 Thread Calvin Owens
This implements ndo_poll_controller in net_device_ops callback for mlx5, which is necessary to use netconsole with this driver. Cc: Saeed Mahameed Signed-off-by: Calvin Owens --- Changes in v2: * Only iterate channels to avoid redundant napi_schedule() calls drivers/net/ethernet

[PATCH] mlx5: Add ndo_poll_controller() implementation

2016-09-23 Thread Calvin Owens
This implements ndo_poll_controller in net_device_ops for mlx5, which is necessary to use netconsole with this driver. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 1 file changed, 20 insertions(+) diff

[PATCH] mlx5: Add ndo_poll_controller() implementation

2016-09-23 Thread Calvin Owens
This implements ndo_poll_controller in net_device_ops for mlx5, which is necessary to use netconsole with this driver. Signed-off-by: Calvin Owens --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/ethernet

[PATCH 2/3] mpt3sas: Eliminate dead sleep_flag code

2016-07-28 Thread Calvin Owens
With the exception of a single call to wait_for_doorbell_int(), all this conditional sleeping code is dead. So delete it. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drivers/scsi/mpt3sas/mpt3sas_base.c | 241 +-- drivers/scsi/mpt3sas/mpt3sas_

[PATCH 2/3] mpt3sas: Eliminate dead sleep_flag code

2016-07-28 Thread Calvin Owens
With the exception of a single call to wait_for_doorbell_int(), all this conditional sleeping code is dead. So delete it. Signed-off-by: Calvin Owens --- drivers/scsi/mpt3sas/mpt3sas_base.c | 241 +-- drivers/scsi/mpt3sas/mpt3sas_base.h | 6 +- drivers

[PATCH 1/3] mpt3sas: Eliminate conditional locking in mpt3sas_scsih_issue_tm()

2016-07-28 Thread Calvin Owens
This flag that conditionally acquires the mutex is confusing and prone to bugginess: refactor it into two separate function calls, and make the unlocked one complain if it's called outside the mutex. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drivers/scsi/mpt3sas/mpt3sas_base.h

[PATCH 3/3] mpt3sas: Fix warnings exposed by W=1

2016-07-28 Thread Calvin Owens
with the potential error is non-trivial, so for now just WARN(). Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drivers/scsi/mpt3sas/mpt3sas_base.c | 18 +++- drivers/scsi/mpt3sas/mpt3sas_config.c| 4 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 29 ++--- drivers/scsi/m

[PATCH 1/3] mpt3sas: Eliminate conditional locking in mpt3sas_scsih_issue_tm()

2016-07-28 Thread Calvin Owens
This flag that conditionally acquires the mutex is confusing and prone to bugginess: refactor it into two separate function calls, and make the unlocked one complain if it's called outside the mutex. Signed-off-by: Calvin Owens --- drivers/scsi/mpt3sas/mpt3sas_base.h | 16 +++-- drivers

[PATCH 3/3] mpt3sas: Fix warnings exposed by W=1

2016-07-28 Thread Calvin Owens
with the potential error is non-trivial, so for now just WARN(). Signed-off-by: Calvin Owens --- drivers/scsi/mpt3sas/mpt3sas_base.c | 18 +++- drivers/scsi/mpt3sas/mpt3sas_config.c| 4 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 29 ++--- drivers/scsi/mpt3sas/mpt3sas_scsih.c

[PATCH] mpt3sas: Ensure the connector_name string is NUL-terminated

2016-07-27 Thread Calvin Owens
byte beyond our character array happens to be a NUL. Fix this by explicitly writing '\0' to the end of the string to ensure we don't run off the edge of the world in printk(). Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- drivers/scsi/m

[PATCH] mpt3sas: Ensure the connector_name string is NUL-terminated

2016-07-27 Thread Calvin Owens
byte beyond our character array happens to be a NUL. Fix this by explicitly writing '\0' to the end of the string to ensure we don't run off the edge of the world in printk(). Signed-off-by: Calvin Owens --- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 10

Re: [PATCH] ses: Fix racy cleanup of /sys in remove_dev()

2016-07-27 Thread Calvin Owens
On 06/15/2016 01:24 PM, Calvin Owens wrote: On Thursday 06/02 at 15:50 -0700, Calvin Owens wrote: On 05/13/2016 01:28 PM, Calvin Owens wrote: Currently we free the resources backing the enclosure device before we call device_unregister(). This is racy: during rmmod of low-level SCSI drivers

Re: [PATCH] ses: Fix racy cleanup of /sys in remove_dev()

2016-07-27 Thread Calvin Owens
On 06/15/2016 01:24 PM, Calvin Owens wrote: On Thursday 06/02 at 15:50 -0700, Calvin Owens wrote: On 05/13/2016 01:28 PM, Calvin Owens wrote: Currently we free the resources backing the enclosure device before we call device_unregister(). This is racy: during rmmod of low-level SCSI drivers

Re: [BUG] Slab corruption during XFS writeback under memory pressure

2016-07-19 Thread Calvin Owens
On 07/18/2016 07:05 PM, Calvin Owens wrote: On 07/17/2016 11:02 PM, Dave Chinner wrote: On Sun, Jul 17, 2016 at 10:00:03AM +1000, Dave Chinner wrote: On Fri, Jul 15, 2016 at 05:18:02PM -0700, Calvin Owens wrote: Hello all, I've found a nasty source of slab corruption. Based on seeing similar

Re: [BUG] Slab corruption during XFS writeback under memory pressure

2016-07-19 Thread Calvin Owens
On 07/18/2016 07:05 PM, Calvin Owens wrote: On 07/17/2016 11:02 PM, Dave Chinner wrote: On Sun, Jul 17, 2016 at 10:00:03AM +1000, Dave Chinner wrote: On Fri, Jul 15, 2016 at 05:18:02PM -0700, Calvin Owens wrote: Hello all, I've found a nasty source of slab corruption. Based on seeing similar

Re: [BUG] Slab corruption during XFS writeback under memory pressure

2016-07-18 Thread Calvin Owens
On 07/17/2016 11:02 PM, Dave Chinner wrote: On Sun, Jul 17, 2016 at 10:00:03AM +1000, Dave Chinner wrote: On Fri, Jul 15, 2016 at 05:18:02PM -0700, Calvin Owens wrote: Hello all, I've found a nasty source of slab corruption. Based on seeing similar symptoms on boxes at Facebook, I suspect

Re: [BUG] Slab corruption during XFS writeback under memory pressure

2016-07-18 Thread Calvin Owens
On 07/17/2016 11:02 PM, Dave Chinner wrote: On Sun, Jul 17, 2016 at 10:00:03AM +1000, Dave Chinner wrote: On Fri, Jul 15, 2016 at 05:18:02PM -0700, Calvin Owens wrote: Hello all, I've found a nasty source of slab corruption. Based on seeing similar symptoms on boxes at Facebook, I suspect

[BUG] Slab corruption during XFS writeback under memory pressure

2016-07-15 Thread Calvin Owens
Hello all, I've found a nasty source of slab corruption. Based on seeing similar symptoms on boxes at Facebook, I suspect it's been around since at least 3.10. It only reproduces under memory pressure so far as I can tell: the issue seems to be that XFS reclaims pages from buffers that are

[BUG] Slab corruption during XFS writeback under memory pressure

2016-07-15 Thread Calvin Owens
Hello all, I've found a nasty source of slab corruption. Based on seeing similar symptoms on boxes at Facebook, I suspect it's been around since at least 3.10. It only reproduces under memory pressure so far as I can tell: the issue seems to be that XFS reclaims pages from buffers that are

Re: slab-out-of-bounds in rpc/nfs

2016-06-17 Thread Calvin Owens
On Friday 06/17 at 09:38 -0400, Benjamin Coddington wrote: > On 16 Jun 2016, at 13:52, Calvin Owens wrote: > > > On Tuesday 03/08 at 11:37 +0100, Dmitry Vyukov wrote: > > > On Tue, Mar 8, 2016 at 11:27 AM, Benjamin Coddington > > > <bcodd...@redhat

Re: slab-out-of-bounds in rpc/nfs

2016-06-17 Thread Calvin Owens
On Friday 06/17 at 09:38 -0400, Benjamin Coddington wrote: > On 16 Jun 2016, at 13:52, Calvin Owens wrote: > > > On Tuesday 03/08 at 11:37 +0100, Dmitry Vyukov wrote: > > > On Tue, Mar 8, 2016 at 11:27 AM, Benjamin Coddington > > > wrote: > >

Re: [PATCH] ses: Fix racy cleanup of /sys in remove_dev()

2016-06-15 Thread Calvin Owens
On Thursday 06/02 at 15:50 -0700, Calvin Owens wrote: > On 05/13/2016 01:28 PM, Calvin Owens wrote: > > Currently we free the resources backing the enclosure device before we > > call device_unregister(). This is racy: during rmmod of low-level SCSI > > drivers that hook into

Re: [PATCH] ses: Fix racy cleanup of /sys in remove_dev()

2016-06-15 Thread Calvin Owens
On Thursday 06/02 at 15:50 -0700, Calvin Owens wrote: > On 05/13/2016 01:28 PM, Calvin Owens wrote: > > Currently we free the resources backing the enclosure device before we > > call device_unregister(). This is racy: during rmmod of low-level SCSI > > drivers that hook into

Re: [PATCH] ses: Fix racy cleanup of /sys in remove_dev()

2016-06-02 Thread Calvin Owens
On 05/13/2016 01:28 PM, Calvin Owens wrote: Currently we free the resources backing the enclosure device before we call device_unregister(). This is racy: during rmmod of low-level SCSI drivers that hook into enclosure, we end up with a small window of time during which writing to /sys can OOPS

Re: [PATCH] ses: Fix racy cleanup of /sys in remove_dev()

2016-06-02 Thread Calvin Owens
On 05/13/2016 01:28 PM, Calvin Owens wrote: Currently we free the resources backing the enclosure device before we call device_unregister(). This is racy: during rmmod of low-level SCSI drivers that hook into enclosure, we end up with a small window of time during which writing to /sys can OOPS

  1   2   3   4   >