[Bisected] nouveau: v3.7-rc breaks multi-monitor setup

2012-10-28 Thread Calvin Owens
(77145f1 is the earliest build-able commit that causes the regression) Let me know if there's anything I can do to help, or any more info that would be useful to you. Cheers, Calvin Owens -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

[PATCH] alsa/usb: Add quirk for 192KHz recording on E-Mu devices

2013-04-12 Thread Calvin Owens
interpreted as L0 of the first sample caused spikes every 0.5ms, resulting in a loud 16KHz tone (about the highest 'B' on a piano) being present throughout captures. Tested at all sample rates on an E-Mu 0404USB, and tested for regressions on a generic USB headset. Signed-off-by: Calvin Owens

[PATCH] nouveau: Fix unconditional return waiting on memory

2013-03-21 Thread Calvin Owens
Typo in nv50_display_flip_wait allows page flipping to run ahead before memory has time to settle. Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- drivers/gpu/drm/nouveau/nv50_display.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/nouveau

[PATCH v2] ieee80211: Print human-readable disassoc/deauth reason codes

2014-02-10 Thread Calvin Owens
. Changes since v1: Refactored array of strings into switch statement, print numeric code in addition to string. Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- include/net/mac80211.h | 10 + net/mac80211/main.c| 55 ++ net/mac80211/mlme.c

[PATCH v3] ieee80211: Print human-readable disassoc/deauth reason codes

2014-02-11 Thread Calvin Owens
. Changes in v2: Refactored array of strings into switch statement. Changes in v3: Fix style problem, use simplifying macro for switch statement, eliminate temporary enum variable. Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- include/net/mac80211.h | 10 + net/mac80211/main.c| 57

Re: [PATCH v3] ieee80211: Print human-readable disassoc/deauth reason codes

2014-02-11 Thread Calvin Owens
On Tuesday 02/11 at 09:13 -0800, Joe Perches wrote: On Tue, 2014-02-11 at 10:37 -0600, Calvin Owens wrote: Create a function to return a descriptive string for each reason code, and print that in addition to the numeric value in the kernel log. These codes are easily found on popular search

Re: [PATCH v3] ieee80211: Print human-readable disassoc/deauth reason codes

2014-02-11 Thread Calvin Owens
On Tuesday 02/11 at 17:48 +0100, Antonio Quartulli wrote: On 11/02/14 17:37, Calvin Owens wrote: Create a function to return a descriptive string for each reason code, and print that in addition to the numeric value in the kernel log. These codes are easily found on popular search engines

[PATCH v4] ieee80211: Print human-readable disassoc/deauth reason codes

2014-02-11 Thread Calvin Owens
-by: Calvin Owens jcalvinow...@gmail.com --- net/mac80211/mlme.c | 68 - 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index fc1d824..0586d12 100644 --- a/net/mac80211/mlme.c +++ b/net

[PATCH] mac80211: Fix bogus RCU warning from ieee80211_get_tx_rates (Was: Re: rcu)

2013-06-09 Thread Calvin Owens
]: See commit f6b3d85f7f6d6 Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- net/mac80211/rate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index d3f414f..585297d 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c

[PATCH] mac80211: ath9k: Use RCU protection calling ieee80211_get_tx_rates

2013-06-11 Thread Calvin Owens
Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- drivers/net/wireless/ath/ath9k/xmit.c | 2 ++ drivers/net/wireless/mac80211_hwsim.c | 6 ++ include/net/mac80211.h| 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k

Re: [PATCH] mac80211: ath9k: Use RCU protection calling ieee80211_get_tx_rates

2013-06-12 Thread Calvin Owens
On Tuesday 06/11 at 21:55 +0200, Johannes Berg wrote: Now the subject should no longer say mac80211: :) However... given that ieee80211_get_tx_rates() actually *copies* the rates into the parameter, I guess it should do the rcu_read_lock() internally. I guess I wasn't paying attention

[PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates()

2013-06-12 Thread Calvin Owens
Copying the rate table should be done in an RCU read-side critical section. Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- net/mac80211/rate.c | 4 1 file changed, 4 insertions(+) diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index d3f414f..090d9b0 100644 --- a/net

Re: [PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates()

2013-06-13 Thread Calvin Owens
On Wednesday 06/12 at 11:47 +0200, Felix Fietkau wrote: On 2013-06-12 10:00 AM, Calvin Owens wrote: Copying the rate table should be done in an RCU read-side critical section. I think this approach is wrong. The sta entry is also under RCU protection (no locking for read access in that part

[PATCH] md: Partially revert 2f6db2a7, which broke raid5

2013-05-17 Thread Calvin Owens
+0x50/0x50 [ 14.653154] [816e4d6c] ret_from_fork+0x7c/0xb0 [ 14.653156] [810661c0] ? __kthread_unpark+0x50/0x50 [ 14.653172] Code: snip [ 14.653174] RIP [81467329] scsi_setup_fs_cmnd+0x89/0x90 Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- drivers/md/raid5.c

Re: tty/vt: Lockdep splat when Magic Sysrq SAK invoked

2014-06-17 Thread Calvin Owens
On Monday 06/02 at 10:41 -0400, Peter Hurley wrote: Hi Calvin, On 06/21/2013 06:37 PM, Calvin Owens wrote: Hello all, I get the following lockdep splat when I invoke the ALT+SYSRQ+K combination on the keyboard. It usually happens the first time, but doing it repeatedly always

[PATCH] ieee80211: Print human-readable disassoc/deauth reason codes

2014-02-05 Thread Calvin Owens
. On x86_64, this patch only enlarges the kernel binary by 489 bytes. Signed-off-by: Calvin Owens jcalvinow...@gmail.com --- include/net/mac80211.h | 11 + net/mac80211/main.c| 66 ++ net/mac80211/mlme.c| 12 - 3 files changed, 83

Re: [PATCH] ieee80211: Print human-readable disassoc/deauth reason codes

2014-02-07 Thread Calvin Owens
On Thursday 02/06 at 09:37 +0100, Johannes Berg wrote: On Wed, 2014-02-05 at 19:44 -0600, Calvin Owens wrote: Create a function to return a descriptive string for each reason code, and print that instead of the numeric value in the kernel log. These codes are easily found on popular search

BUG: drivers/char/random.c:986

2014-08-28 Thread Calvin Owens
, Calvin Owens Output of `gcc -v`: Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.3/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.7.3-r1/work/gcc-4.7.3/configure

[PATCH][RESEND] Revert AUDIT: Allow login in non-init namespaces

2014-11-18 Thread Calvin Owens
: -EPERM allows the login to continue, and -ECONNREFUSED causes it to refuse the login. This behavior has been unchanged in upstream linux-pam since at least 2008. Reverting this change allows libpam to again work as expected in non-init user namespaces. Signed-off-by: Calvin Owens calvinow...@fb.com Cc

[PATCH] tcp: Restore RFC5961-compliant behavior for SYN packets

2014-11-20 Thread Calvin Owens
SYN packets are properly dealt with as per the RFC. The challenge ACK is sent unconditionally and is rate-limited, so the original vulnerability is not reintroduced by this patch. Signed-off-by: Calvin Owens calvinow...@fb.com --- net/ipv4/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH] tcp: Restore RFC5961-compliant behavior for SYN packets

2014-11-20 Thread Calvin Owens
On Thursday 11/20 at 15:42 -0800, Eric Dumazet wrote: On Thu, 2014-11-20 at 15:09 -0800, Calvin Owens wrote: Commit c3ae62af8e755 (tcp: should drop incoming frames without ACK flag set) was created to mitigate a security vulnerability in which a local attacker is able to inject data

Re: [PATCH] ipvs: Keep skb-sk when allocating headroom on tunnel xmit

2014-11-07 Thread Calvin Owens
On 11/05/2014 01:21 AM, Julian Anastasov wrote: Hello, On Tue, 4 Nov 2014, Calvin Owens wrote: ip_vs_prepare_tunneled_skb() ignores -sk when allocating a new skb, either unconditionally setting -sk to NULL or allowing the uninitialized -sk from a newly allocated skb to leak through

Re: [PATCH] x86: mce: Avoid timer double-add during CMCI interrupt storms.

2014-12-16 Thread Calvin Owens
On Thursday 12/11 at 15:43 +0100, Borislav Petkov wrote: On Wed, Dec 10, 2014 at 06:34:38PM -0800, Calvin Owens wrote: This doens't fix the original issue though: the timer double-add can still happen if the CMCI interrupt that hits the STORM threshold pops off during mce_timer_fn

Re: [PATCH -v3 0/4] RAS: Correctable Errors Collector thing

2014-12-16 Thread Calvin Owens
On Tue, Jul 1, 2014 at 12:23 PM, Borislav Petkov b...@alien8.de wrote: Ok, the next version. Main changes from the last one are that we have a ce_ring now to which MCEs get logged in atomic context first and then, in process context, put into the CEC, just like this is done with the

[PATCH] ipvs: Keep skb-sk when allocating headroom on tunnel xmit

2014-11-04 Thread Calvin Owens
ip_vs_prepare_tunneled_skb() ignores -sk when allocating a new skb, either unconditionally setting -sk to NULL or allowing the uninitialized -sk from a newly allocated skb to leak through to the caller. This patch properly copies -sk and increments its reference count. Signed-off-by: Calvin

[PATCH] Revert AUDIT: Allow login in non-init namespaces

2014-11-04 Thread Calvin Owens
: -EPERM allows the login to continue, and -ECONNREFUSED causes it to refuse the login. This behavior has been unchanged in upstream linux-pam since at least 2008. Reverting this change allows libpam to again work as expected in non-init user namespaces. Signed-off-by: Calvin Owens calvinow...@fb.com Cc

[PATCH] x86: mce: Avoid timer double-add during CMCI interrupt storms.

2014-12-04 Thread Calvin Owens
will be updated with the new interval if it is before the existing one. Signed-off-by: Calvin Owens calvinow...@fb.com --- arch/x86/kernel/cpu/mcheck/mce.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu

Re: [PATCH] x86: mce: Avoid timer double-add during CMCI interrupt storms.

2014-12-09 Thread Calvin Owens
On Tuesday 12/09 at 23:00 +, Luck, Tony wrote: Right, so this polling thing once again proves its fragility to me - we have had problems with it in the past so maybe we should think about replacing it with something simpler and and much more robust instead of this flaky dynamically

Re: [PATCH] x86: mce: Avoid timer double-add during CMCI interrupt storms.

2014-12-10 Thread Calvin Owens
On Wednesday 12/10 at 20:23 +0100, Borislav Petkov wrote: On Tue, Dec 09, 2014 at 07:11:02PM -0800, Calvin Owens wrote: Just to make sure I understand what you're looking for: When MCE is initialized, spawn a kthread for each CPU instead of the current timers. If CMCI is supported, we

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-03 Thread Calvin Owens
On Monday 02/02 at 12:16 -0800, Andy Lutomirski wrote: On Fri, Jan 30, 2015 at 5:58 PM, Calvin Owens calvinow...@fb.com wrote: On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-03 Thread Calvin Owens
On Monday 02/02 at 09:01 -0500, Austin S Hemmelgarn wrote: On 2015-01-30 20:58, Calvin Owens wrote: On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan

Re: [RFC][PATCH] procfs: Add /proc/pid/mapped_files

2015-01-14 Thread Calvin Owens
On Wednesday 01/14 at 15:53 +0100, Rasmus Villemoes wrote: On Wed, Jan 14 2015, Siddhesh Poyarekar siddhesh.poyare...@gmail.com wrote: On 14 January 2015 at 19:43, Rasmus Villemoes li...@rasmusvillemoes.dk wrote: Just thinking out loud: Could one simply mark a VMA as being used for

Re: [RFC][PATCH] procfs: Add /proc/pid/mapped_files

2015-01-14 Thread Calvin Owens
On Wednesday 01/14 at 18:33 +0300, Cyrill Gorcunov wrote: On Wed, Jan 14, 2015 at 05:25:01PM +0200, Kirill A. Shutemov wrote: ... This gives lsof and suchlike a way to determine the pathnames of files mapped into a process without incurring the O(N^2) behavior of the maps file.

[RFC][PATCH] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-21 Thread Calvin Owens
. Signed-off-by: Calvin Owens calvinow...@fb.com --- fs/proc/base.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 3f3d7ae..7d48003 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1632,8 +1632,6

Re: [PATCH][RESEND 2] Revert AUDIT: Allow login in non-init namespaces

2015-01-14 Thread Calvin Owens
On Friday 01/09 at 16:36 -0500, Paul Moore wrote: On Friday, January 09, 2015 01:24:51 PM Calvin Owens wrote: On Friday 01/09 at 15:33 -0500, Paul Moore wrote: While I haven't had reason to test this code lately, last I knew it was working, what problems are you seeing Calvin? Also

Re: [RFC][PATCH] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-22 Thread Calvin Owens
On Thursday 01/22 at 23:27 +0200, Kirill A. Shutemov wrote: On Thu, Jan 22, 2015 at 01:00:25PM -0800, Calvin Owens wrote: On Thursday 01/22 at 13:02 +0200, Kirill A. Shutemov wrote: On Wed, Jan 21, 2015 at 06:45:54PM -0800, Calvin Owens wrote: Currently, /proc/pid/map_files

Re: [RFC][PATCH] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-22 Thread Calvin Owens
On Thursday 01/22 at 13:02 +0200, Kirill A. Shutemov wrote: On Wed, Jan 21, 2015 at 06:45:54PM -0800, Calvin Owens wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface is very useful for enumerating

[RFC][PATCH v3] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-11 Thread Calvin Owens
if access to /proc/pid/mem is allowed, it will not allow an attacker to do anything that was not already possible through that interface. Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes in v3: Changed permission checks to use PTRACE_MODE_ATTACH instead of PTRACE_MODE_READ

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-27 Thread Calvin Owens
On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 02:47:31PM +0200, Kirill A. Shutemov wrote: On Fri, Jan 23, 2015 at 07:15:44PM -0800, Calvin Owens wrote: Currently, /proc/pid

Re: [RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-30 Thread Calvin Owens
On Thursday 01/29 at 17:30 -0800, Kees Cook wrote: On Tue, Jan 27, 2015 at 8:38 PM, Calvin Owens calvinow...@fb.com wrote: On Monday 01/26 at 15:43 -0800, Andrew Morton wrote: On Tue, 27 Jan 2015 00:00:54 +0300 Cyrill Gorcunov gorcu...@gmail.com wrote: On Mon, Jan 26, 2015 at 02:47

[RFC][PATCH v2] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-01-23 Thread Calvin Owens
from behind CHECKPOINT_RESTORE, and removes the CAP_SYS_ADMIN restrictions. Following the links requires the ability to ptrace the process in question, so this doesn't allow an attacker to do anything they couldn't already do before. Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes in v2

[PATCH][RESEND 2] Revert AUDIT: Allow login in non-init namespaces

2015-01-08 Thread Calvin Owens
: -EPERM allows the login to continue, and -ECONNREFUSED causes it to refuse the login. This behavior has been unchanged in upstream linux-pam since at least 2008. Reverting this change allows libpam to again work as expected in non-init user namespaces. Signed-off-by: Calvin Owens calvinow...@fb.com Cc

Re: [PATCH][RESEND 2] Revert AUDIT: Allow login in non-init namespaces

2015-01-09 Thread Calvin Owens
On Friday 01/09 at 15:33 -0500, Paul Moore wrote: On Thursday, January 08, 2015 05:44:48 PM Calvin Owens wrote: This reverts 543bc6a1a987 AUDIT: Allow login in non-init namespaces. This commit incorrectly assumes that libpam treats -ECONNREFUSED as an indicator that audit is disabled

[PATCH] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-06 Thread Calvin Owens
exceed 5%. Moving the call to rcu_note_context_switch() after the cond_sched() call, as it was originally before the hotplug patch, completely eliminated this problem. Signed-off-by: Calvin Owens calvinow...@fb.com --- kernel/softirq.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH v2] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-06 Thread Calvin Owens
exceed 5%. Moving the call to rcu_note_context_switch() after the cond_sched() call, as it was originally before the hotplug patch, completely eliminated this problem. Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes since v1: I mixed up the kernel versions I was patching against

Re: [RFC][PATCH] procfs: Add /proc/pid/mapped_files

2015-01-13 Thread Calvin Owens
Here's a simple program to trigger the issue with /proc/pid/maps. Thanks, Calvin /* Simple program to reproduce O(N^2) behavior reading /proc/pid/maps * * Example on a random server: * * $ ./map_repro 0 * Spawning 0 threads * Reading /proc/self/maps... read 2189 bytes in 1

Re: [PATCH v2] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-08 Thread Calvin Owens
On Wednesday 01/07 at 20:53 -0800, Paul E. McKenney wrote: On Wed, Jan 07, 2015 at 08:33:29PM -0800, Calvin Owens wrote: On Wednesday 01/07 at 08:52 -0800, Paul E. McKenney wrote: On Tue, Jan 06, 2015 at 06:19:26PM -0800, Paul E. McKenney wrote: On Tue, Jan 06, 2015 at 05:49:06PM -0800

[RFC][PATCH v4] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-02-14 Thread Calvin Owens
if access to /proc/pid/mem is allowed, it will not allow an attacker to do anything that was not already possible through that interface. Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes in v4: Return -ESRCH from follow_link() when get_proc_task() returns NULL. Changes

[PATCH] procfs: Return -ESRCH on /proc/N/fd/* when PID N doesn't exist

2015-02-14 Thread Calvin Owens
if the lookup in /proc races with the task exiting. Since those were the only two callers of that helper function, it also removes it. Signed-off-by: Calvin Owens calvinow...@fb.com --- fs/proc/base.c | 47 ++- 1 file changed, 26 insertions(+), 21 deletions

Re: [PATCH v2] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-07 Thread Calvin Owens
On Wednesday 01/07 at 08:52 -0800, Paul E. McKenney wrote: On Tue, Jan 06, 2015 at 06:19:26PM -0800, Paul E. McKenney wrote: On Tue, Jan 06, 2015 at 05:49:06PM -0800, Calvin Owens wrote: While debugging an issue with excessive softirq usage, I encountered the following note in commit

[PATCH] ksoftirqd: Enable IRQs and call cond_resched() before poking RCU

2015-01-13 Thread Calvin Owens
exceed 5%. Moving the call to rcu_note_context_switch() after the cond_sched() call, as it was originally before the hotplug patch, completely eliminated this problem. Signed-off-by: Calvin Owens calvinow...@fb.com Cc: sta...@vger.kernel.org --- This version includes the cpu argument

[RFC][PATCH] procfs: Add /proc/pid/mapped_files

2015-01-13 Thread Calvin Owens
-by: Calvin Owens calvinow...@fb.com --- I'm also sending a simple repro program as a reply to this E-Mail. fs/proc/base.c | 1 + fs/proc/internal.h | 1 + fs/proc/task_mmu.c | 32 3 files changed, 34 insertions(+) diff --git a/fs/proc/base.c b/fs/proc

Re: [RFC][PATCH v4] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-04-28 Thread Calvin Owens
On Wednesday 03/11 at 01:17 +0300, Cyrill Gorcunov wrote: On Sat, Feb 14, 2015 at 12:40:09PM -0800, Calvin Owens wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface is very useful for enumerating

Re: [PATCH] mpt2sas: mpt3sas: Fix memory corruption during initialization

2015-05-06 Thread Calvin Owens
On Monday 05/04 at 20:35 +0530, Sreekanth Reddy wrote: I have applied this patch on the latest upstream mpt3sas driver, then I have compiled and loaded the driver. In the driver logs I didn't see any attached drives are added to the OS, 'fdisk -l' command also doesn't list the drives which

[PATCH v5] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-05-18 Thread Calvin Owens
Reviewed-by: Cyrill Gorcunov gorcu...@openvz.org Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes in v5: s/dentry-d_inode/d_inode(dentry)/g Changes in v4: Return -ESRCH from follow_link() when get_proc_task() returns NULL. Changes in v3: Changed permission checks

[PATCH 3/6] Fix unsafe sas_device_list usage

2015-05-14 Thread Calvin Owens
We cannot iterate over the list without holding a lock for the entire duration, or we risk corrupting random memory if items are added or deleted as we iterate. This refactors code such that it always holds the lock when iterating on or accessing the sas_device_list. Signed-off-by: Calvin Owens

[PATCH 1/6] Add refcount to sas_device struct

2015-05-14 Thread Calvin Owens
These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_base.h | 16 1 file changed, 16 insertions(+) diff

[PATCH 5/6] Refactor code to use new fw_event refcount

2015-05-14 Thread Calvin Owens
This refactors the fw_event code to use the new refcount. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas

[PATCH 6/6] Fix unsafe fw_event_list usage

2015-05-14 Thread Calvin Owens
Since the fw_event deletes itself from the list, cleanup_queue() can walk onto garbage pointers or walk off into freed memory. This refactors the code in _scsih_fw_event_cleanup_queue() to not iterate over the fw_event_list without a lock. Signed-off-by: Calvin Owens calvinow...@fb.com

[PATCH 2/6] Refactor code to use new sas_device refcount

2015-05-14 Thread Calvin Owens
This patch refactors the code in the driver to use the new reference count on the sas_device struct. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_base.h | 4 +- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 329 --- drivers/scsi

[PATCH 4/6] Add refcount to fw_event_work struct

2015-05-14 Thread Calvin Owens
The fw_event_work struct is concurrently referenced at shutdown, so add a refcount to protect it. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/scsi/mpt2sas

[PATCH 0/6] Fixes for memory corruption in mpt2sas

2015-05-14 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. I will provide a similar set of fixes for mpt3sas, since we see similar issues there as well. Porting this to mpt3sas will be trivial since the part of the driver

Re: [PATCH v5] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-05-20 Thread Calvin Owens
On Tuesday 05/19 at 11:04 -0700, Andy Lutomirski wrote: On Mon, May 18, 2015 at 8:10 PM, Calvin Owens calvinow...@fb.com wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface is very useful

[PATCH 3/6] Fix unsafe sas_device_list usage

2015-06-08 Thread Calvin Owens
We cannot iterate over the list without holding a lock for the entire duration, or we risk corrupting random memory if items are added or deleted as we iterate. This refactors code such that it always holds the lock when iterating on or accessing the sas_device_list. Signed-off-by: Calvin Owens

[PATCH 6/6] Fix unsafe fw_event_list usage

2015-06-08 Thread Calvin Owens
Since the fw_event deletes itself from the list, cleanup_queue() can walk onto garbage pointers or walk off into freed memory. This refactors the code in _scsih_fw_event_cleanup_queue() to not iterate over the fw_event_list without a lock. Signed-off-by: Calvin Owens calvinow...@fb.com

[PATCH 4/6] Add refcount to fw_event_work struct

2015-06-08 Thread Calvin Owens
The fw_event_work struct is concurrently referenced at shutdown, so add a refcount to protect it. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/scsi/mpt2sas

[PATCH 1/6] Add refcount to sas_device struct

2015-06-08 Thread Calvin Owens
These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_base.h | 16 1 file changed, 16 insertions(+) diff

[RESEND][PATCH 0/6] Fixes for memory corruption in mpt2sas

2015-06-08 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. I will provide a similar set of fixes for mpt3sas, since we see similar issues there as well. Porting this to mpt3sas will be trivial since the part of the driver

[PATCH v6] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-06-08 Thread Calvin Owens
(ie dma-buf). Cc: Andrew Morton a...@linux-foundation.org Cc: Andy Lutomirski l...@amacapital.net Cc: Cyrill Gorcunov gorcu...@openvz.org Cc: Joe Perches j...@perches.com Cc: Kees Cook keesc...@chromium.org Cc: Kirill A. Shutemov kir...@shutemov.name Signed-off-by: Calvin Owens calvinow...@fb.com

[PATCH 2/6] Refactor code to use new sas_device refcount

2015-06-08 Thread Calvin Owens
This patch refactors the code in the driver to use the new reference count on the sas_device struct. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_base.h | 4 +- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 329 --- drivers/scsi

[PATCH 5/6] Refactor code to use new fw_event refcount

2015-06-08 Thread Calvin Owens
This refactors the fw_event code to use the new refcount. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas

Re: [PATCH v6] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-06-09 Thread Calvin Owens
On Tuesday 06/09 at 14:13 -0700, Andrew Morton wrote: On Mon, 8 Jun 2015 20:39:33 -0700 Calvin Owens calvinow...@fb.com wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. This interface very useful because

[PATCH v7] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-06-18 Thread Calvin Owens
Gorcunov gorcu...@openvz.org Cc: Joe Perches j...@perches.com Cc: Kirill A. Shutemov kir...@shutemov.name Reviewed-by: Kees Cook keesc...@chromium.org Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes in v7: Better commit message (hopefully), patch is otherwise identical to v6

[PATCH v3 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

2015-07-31 Thread Calvin Owens
() concurrently deletes items from the list. Cc: Christoph Hellwig h...@lst.de Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes in v3: * Add a break condition to the REMOVE_UNRESPONDING_DEVICES fw_event, which can loop over a sleep forever (5m+ at least) at unloading. I

[PATCH v3 0/2] Fixes for memory corruption in mpt2sas

2015-07-31 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. Changes are noted in the individual patches, I realized putting them in the cover was probably a bit confusing. Thanks, Calvin Patches in this series: [PATCH

[PATCH v3 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-07-31 Thread Calvin Owens
-off-by: Calvin Owens calvinow...@fb.com --- Changes in v3: * Drop the sas_device_lock while enabling devices, and leave the sas_device object on the list, since it may need to be looked up there while it is being enabled. * Drop put() in _scsih_add_device

[PATCH] net: Unbreak resetting default values for tcp_wmem/udp_wmem_min

2015-08-05 Thread Calvin Owens
...) Signed-off-by: Calvin Owens calvinow...@fb.com --- net/ipv4/sysctl_net_ipv4.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 433231c..a214b6a 100644 --- a/net/ipv4/sysctl_net_ipv4.c +++ b/net/ipv4

[PATCH] Revert net: limit tcp/udp rmem/wmem to SOCK_{RCV,SND}BUF_MIN

2015-08-13 Thread Calvin Owens
...@gmail.com Cc: Sorin Dumitru so...@returnze.ro Signed-off-by: Calvin Owens calvinow...@fb.com --- net/ipv4/sysctl_net_ipv4.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 433231c..0330ab2 100644 --- a/net/ipv4

[PATCH v4 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-08-13 Thread Calvin Owens
-off-by: Calvin Owens calvinow...@fb.com --- Changes in v4: * Fix lack of put() in non-SATA case in _scsih_change_queue_depth() * Fix lack of put() in the non-error case in _scsih_check_device() * Add missing put() at bottom of _scsih_add_device() * Add put

Re: [PATCH v3 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-08-13 Thread Calvin Owens
On Monday 08/10 at 18:45 +0530, Sreekanth Reddy wrote: On Sat, Aug 1, 2015 at 10:32 AM, Calvin Owens calvinow...@fb.com wrote: Sreekanth, Thanks for the review, responses below. I'll have a v4 out shortly. Calvin These objects can be referenced concurrently throughout the driver, we need

[PATCH v4 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

2015-08-13 Thread Calvin Owens
() concurrently deletes items from the list. Cc: Christoph Hellwig h...@lst.de Signed-off-by: Calvin Owens calvinow...@fb.com --- Changes in v4: None Changes in v3: * Add a break condition to the REMOVE_UNRESPONDING_DEVICES fw_event, which can loop over a sleep forever (5m+ at least

[PATCH v4 0/2] Fixes for memory corruption in mpt2sas

2015-08-13 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. Thanks, Calvin [PATCH v4 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list [PATCH v4 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

Re: [PATCH] net: Unbreak resetting default values for tcp_wmem/udp_wmem_min

2015-08-10 Thread Calvin Owens
On Sunday 08/09 at 22:41 -0700, David Miller wrote: From: Calvin Owens calvinow...@fb.com Date: Wed, 5 Aug 2015 13:26:54 -0700 Commit 8133534c760d4083 (net: limit tcp/udp rmem/wmem to SOCK_{RCV,SND}BUF_MIN) modified four sysctls to enforce that the values written to them are not less

[PATCH] net: Use SK_MEM_QUANTUM as minimum for tcp/udp rmem/wmem

2015-08-11 Thread Calvin Owens
anybody's sysctl configurations. Fixes: 8133534c760d4083 (net: limit tcp/udp rmem/wmem to SOCK_MIN...) Signed-off-by: Calvin Owens calvinow...@fb.com --- net/ipv4/sysctl_net_ipv4.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4

Re: [PATCH] net: Use SK_MEM_QUANTUM as minimum for tcp/udp rmem/wmem

2015-08-13 Thread Calvin Owens
On Wednesday 08/12 at 10:46 -0700, Eric Dumazet wrote: On Wed, 2015-08-12 at 20:00 +0300, Sorin Dumitru wrote: Would clamping the values to a min value, like setsockopt(SO_SNDBUF) does, be an option? I still find it odd that SO_SNDBUF limits you, while the /proc interface doesn't. If

Re: [PATCH v7] procfs: Always expose /proc/pid/map_files/ and make it readable

2015-07-15 Thread Calvin Owens
On Wednesday 07/15 at 15:21 -0700, Andrew Morton wrote: On Thu, 18 Jun 2015 19:32:18 -0700 Calvin Owens calvinow...@fb.com wrote: Currently, /proc/pid/map_files/ is restricted to CAP_SYS_ADMIN, and is only exposed if CONFIG_CHECKPOINT_RESTORE is set. Each mapped file region gets

Re: [PATCH 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-07-21 Thread Calvin Owens
On Sunday 07/12 at 23:52 -0700, Christoph Hellwig wrote: On Sat, Jul 11, 2015 at 09:24:55PM -0700, Calvin Owens wrote: These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. This patch adds

Re: [PATCH 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-07-21 Thread Calvin Owens
On Thursday 07/16 at 20:27 +0530, Sreekanth Reddy wrote: On Sun, Jul 12, 2015 at 9:54 AM, Calvin Owens calvinow...@fb.com wrote: These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. This patch

Re: [PATCH 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-07-21 Thread Calvin Owens
On Monday 07/13 at 11:05 -0400, Joe Lawrence wrote: On 07/12/2015 12:24 AM, Calvin Owens wrote: These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. This patch adds the refcount, and refactors

[PATCH] sg: Fix double-free when drives detach during SG_IO

2015-10-30 Thread Calvin Owens
if it isn't embedded in the object itself. KASAN was extremely helpful in finding the root cause of this bug. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drivers/scsi/sg.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/

Re: [PATCH 5/6] Refactor code to use new fw_event refcount

2015-07-11 Thread Calvin Owens
Thanks for this, I'm sending a v2 shortly. On Friday 07/03 at 09:00 -0700, Christoph Hellwig wrote: On Mon, Jun 08, 2015 at 08:50:55PM -0700, Calvin Owens wrote: This refactors the fw_event code to use the new refcount. I spent some time looking over this code because it's so convoluted

Re: [PATCH 2/6] Refactor code to use new sas_device refcount

2015-07-11 Thread Calvin Owens
On Friday 07/03 at 08:38 -0700, Christoph Hellwig wrote: +struct _sas_device * +mpt2sas_scsih_sas_device_get_by_sas_address_nolock(struct MPT2SAS_ADAPTER *ioc, +u64 sas_address) Any chance to use a shorter name for this function? E.g. __mpt2sas_get_sdev_by_addr ? Will do.

Re: [PATCH 6/6] Fix unsafe fw_event_list usage

2015-07-11 Thread Calvin Owens
On Friday 07/03 at 09:02 -0700, Christoph Hellwig wrote: On Mon, Jun 08, 2015 at 08:50:56PM -0700, Calvin Owens wrote: Since the fw_event deletes itself from the list, cleanup_queue() can walk onto garbage pointers or walk off into freed memory. This refactors the code

[PATCH 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-07-11 Thread Calvin Owens
, or we risk corrupting random memory if items are added or deleted as we iterate. This patch refactors _scsih_probe_sas() to use the sas_device_list in a safe way. Cc: Christoph Hellwig h...@infradead.org Cc: Bart Van Assche bart.vanass...@sandisk.com Signed-off-by: Calvin Owens calvinow...@fb.com

[PATCH 0/2 v2] Fixes for memory corruption in mpt2sas

2015-07-11 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. Thanks, Calvin Patches in this series: [PATCH 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage [PATCH 2/2] mpt2sas: Refcount fw_events and fix

[PATCH 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

2015-07-11 Thread Calvin Owens
() concurrently deletes items from the list. Cc: Christoph Hellwig h...@infradead.org Cc: Bart Van Assche bart.vanass...@sandisk.com Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 101 --- 1 file changed, 81 insertions(+), 20 deletions

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-26 Thread Calvin Owens
On Wednesday 08/26 at 04:09 +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi James Co, This series is a mpt3sas forward port of Calvin Owens' in-flight reference counting bugfixes for mpt2sas LLD code here: [PATCH v4 0/2] Fixes for memory corruption

Re: [PATCH 2/2] mpt3sas: Refcount fw_events and fix unsafe list usage

2015-08-26 Thread Calvin Owens
_scsih_fw_event_cleanup_queue() such that it no longer iterates over the list without holding the lock, since _firmware_event_work() concurrently deletes items from the list. This patch is a port of Calvin's PATCH-v4 for mpt2sas code. Cc: Calvin Owens calvinow...@fb.com Cc: Christoph Hellwig h...@infradead.org Cc

Re: [PATCH 1/2] mpt3sas: Refcount sas_device objects and fix unsafe list usage

2015-08-26 Thread Calvin Owens
is a port of Calvin's PATCH-v4 for mpt2sas code. Cc: Calvin Owens calvinow...@fb.com Cc: Christoph Hellwig h...@infradead.org Cc: Sreekanth Reddy sreekanth.re...@avagotech.com Cc: MPT-FusionLinux.pdl mpt-fusionlinux@avagotech.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org

[PATCH] netconsole: Initialize after all core networking drivers

2015-12-17 Thread Calvin Owens
+0x3f/0x70 [] ? rest_init+0x80/0x80 This happens because IXGBE assumes that vxlan has already been initialized. The cleanest way to fix this is to just initialize netconsole after all the other core networking stuff has completed. Signed-off-by: Calvin Owens <calvinow...@fb.com> --- drive

  1   2   3   4   >