[PATCH RESEND v5] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-04-15 Thread Stephen Brennan
indicates that it is not necessary to drop RCU in pid_revalidate(), as no RCU data is modified and the function never sleeps. So, remove the LOOKUP_RCU check. Signed-off-by: Stephen Brennan --- Resending this in the hopes of Al picking this up, or else more feedback about how to test for RCU

Re: [PATCH RESEND v5] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-02-17 Thread Stephen Brennan
Stephen Brennan writes: > The pid_revalidate() function drops from RCU into REF lookup mode. When > many threads are resolving paths within /proc in parallel, this can > result in heavy spinlock contention on d_lockref as each thread tries to > grab a reference to the /proc dent

[PATCH RESEND v5] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-02-04 Thread Stephen Brennan
indicates that it is not necessary to drop RCU in pid_revalidate(), as no RCU data is modified and the function never sleeps. So, remove the LOOKUP_RCU check. Signed-off-by: Stephen Brennan --- When running running ~100 parallel instances of "TZ=/etc/localtime ps -fe >/dev/null"

[PATCH] KVM: x86/mmu: Remove unused variable invalid_list

2021-02-01 Thread Stephen Brennan
Since commit ebdb292dac79 ("KVM: x86/mmu: Batch zap MMU pages when shrinking the slab"), invalid_list is no longer used in mmu_shrink_scan(). Remove it. Signed-off-by: Stephen Brennan --- arch/x86/kvm/mmu/mmu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kvm/mmu/mmu.c

[PATCH v5] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-01-22 Thread Stephen Brennan
indicates that it is not necessary to drop RCU in pid_revalidate(), as no RCU data is modified and the function never sleeps. So, remove the LOOKUP_RCU check. Signed-off-by: Stephen Brennan --- When running running ~100 parallel instances of "TZ=/etc/localtime ps -fe >/dev/null"

Re: [PATCH v4] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-01-14 Thread Stephen Brennan
Al Viro writes: > OTTH, it's not really needed there - see vfs.git #work.audit > for (untested) turning that sucker non-blocking. I hadn't tried > a followup that would get rid of the entire AVC_NONBLOCKING thing yet, > but I suspect that it should simplify the things in there nicely... I went

Re: [PATCH v4] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-01-05 Thread Stephen Brennan
Al Viro writes: > On Mon, Jan 04, 2021 at 03:21:22PM -0800, Stephen Brennan wrote: >> The pid_revalidate() function drops from RCU into REF lookup mode. When >> many threads are resolving paths within /proc in parallel, this can >> result in heavy spinlock contention on d_l

Re: [PATCH v4] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-01-05 Thread Stephen Brennan
Al Viro writes: > On Tue, Jan 05, 2021 at 04:50:05PM +, Al Viro wrote: > >> LSM_AUDIT_DATA_DENTRY is easy to handle - wrap >> audit_log_untrustedstring(ab, a->u.dentry->d_name.name); >> into grabbing/dropping a->u.dentry->d_lock and we are done. > > Incidentally,

[PATCH v4] proc: Allow pid_revalidate() during LOOKUP_RCU

2021-01-04 Thread Stephen Brennan
indicates that it is not necessary to drop RCU in pid_revalidate(), as no RCU data is modified and the function never sleeps. So, remove the LOOKUP_RCU check. Signed-off-by: Stephen Brennan --- When running running ~100 parallel instances of "TZ=/etc/localtime ps -fe >/dev/null"

Re: [PATCH v3 2/2] proc: ensure security hook is called after exec

2021-01-04 Thread Stephen Brennan
Stephen Smalley writes: > On Fri, Dec 18, 2020 at 7:06 PM Stephen Brennan > wrote: >> >> Smack needs its security_task_to_inode() hook to be called when a task >> execs a new executable. Store the self_exec_id of the task and call the >> hook via pid_update_inode(

[PATCH v3 1/2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-18 Thread Stephen Brennan
). Allow the pid_revalidate() function to execute under LOOKUP_RCU. When updates must be made to the inode, drop out of RCU and into REF mode. Signed-off-by: Stephen Brennan --- When running running ~100 parallel instances of "TZ=/etc/localtime ps -fe >/dev/null" on a 100CPU mach

[PATCH v3 2/2] proc: ensure security hook is called after exec

2020-12-18 Thread Stephen Brennan
Smack needs its security_task_to_inode() hook to be called when a task execs a new executable. Store the self_exec_id of the task and call the hook via pid_update_inode() whenever the exec_id changes. Signed-off-by: Stephen Brennan --- As discussed on the v2 of the patch, this should allow

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-15 Thread Stephen Brennan
Sun, Dec 13, 2020 at 08:22:32AM -0600, Eric W. Biederman wrote: >>>>>> Matthew Wilcox writes: >>>>>> >>>>>>> On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: >>>>>>>> -void pid_update_inode

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-14 Thread Stephen Brennan
ebied...@xmission.com (Eric W. Biederman) writes: > Matthew Wilcox writes: > >> On Thu, Dec 03, 2020 at 04:02:12PM -0800, Stephen Brennan wrote: >>> -void pid_update_inode(struct task_struct *task, struct inode *inode) >>> +static int do_pid_update_inode(struct t

Re: [PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-14 Thread Stephen Brennan
ebied...@xmission.com (Eric W. Biederman) writes: > Stephen Brennan writes: > >> The pid_revalidate() function requires dropping from RCU into REF lookup >> mode. When many threads are resolving paths within /proc in parallel, >> this can result in heavy spinlock content

[PATCH v2] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-03 Thread Stephen Brennan
the pid_revalidate() function to execute under LOOKUP_RCU. When updates must be made to the inode due to the owning task performing setuid(), drop out of RCU and into REF mode. Remove the call to security_task_to_inode(), since we can rely on the call from proc_pid_make_inode(). Signed-off-by: Stephen

Re: [PATCH] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-12-01 Thread Stephen Brennan
ebied...@xmission.com (Eric W. Biederman) writes: > Stephen Brennan writes: > >> The pid_revalidate() function requires dropping from RCU into REF lookup >> mode. When many threads are resolving paths within /proc in parallel, >> this can result in heavy spinlock content

[PATCH] proc: Allow pid_revalidate() during LOOKUP_RCU

2020-11-30 Thread Stephen Brennan
the pid_revalidate() function to execute under LOOKUP_RCU. When updates must be made to the inode due to the owning task performing setuid(), drop out of RCU and into REF mode. Signed-off-by: Stephen Brennan --- I'd like to use this patch as an RFC on this approach for reducing spinlock contention during

[PATCH v2] staging: rtl8192u: Fix indentation

2019-08-27 Thread Stephen Brennan
Checkpatch reports WARNING:SUSPECT_CODE_INDENT in several places. Fix this by aligning code properly with tabs. Signed-off-by: Stephen Brennan --- Changes in v2: rebase on next-20190827, fixing conflict with spacing fixes. .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 2 +- .../staging

[PATCH] staging: rtl8192u: remove code under TO_DO_LIST

2019-08-23 Thread Stephen Brennan
Several blocks of code are guarded by #ifdef TO_DO_LIST. If this is defined, compilation fails. No machinery exists to define this, and no documenation on the in-progress feature exists. Since this code is dead, let's delete it. Signed-off-by: Stephen Brennan --- Sorry, I know you're giving

[PATCH] staging: rtl8192u: Fix indentation

2019-08-22 Thread Stephen Brennan
Checkpatch reports WARNING:SUSPECT_CODE_INDENT in several places. Fix this by aligning code properly with tabs. Signed-off-by: Stephen Brennan --- .../rtl8192u/ieee80211/ieee80211_crypt_ccmp.c | 2 +- .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 112 +- .../staging/rtl8192u

[PATCH v2 1/3] staging: rtl8192u: fix OPEN_BRACE errors in ieee80211

2019-08-21 Thread Stephen Brennan
Checkpatch emits several errors regarding braces being on the incorrect line. These can be fixed by moving the brace, do this. In a few cases, some comments were moved to facilitate this. Signed-off-by: Stephen Brennan --- .../staging/rtl8192u/ieee80211/ieee80211.h| 3 +- .../staging

[PATCH v2 2/3] staging: rtl8192u: fix macro alignment in ieee80211

2019-08-21 Thread Stephen Brennan
Several macros display unaligned, due to mixes of tabs and spaces. These can be fixed by making spacing consistent, do this. Signed-off-by: Stephen Brennan --- .../staging/rtl8192u/ieee80211/ieee80211.h| 35 ++- .../staging/rtl8192u/ieee80211/rtl819x_HT.h | 8 ++--- 2

[PATCH v2 3/3] staging: rtl8192u: fix spacing in ieee80211

2019-08-21 Thread Stephen Brennan
Checkpatch emits several errors, warnings, and checks about spacing. Apply checkpatch's suggested spacing rules. Signed-off-by: Stephen Brennan --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 10 ++-- .../staging/rtl8192u/ieee80211/ieee80211.h| 4 +- .../rtl8192u/ieee80211

[PATCH v2 0/3] staging: rtl8192u: coding style fixes in ieee80211

2019-08-21 Thread Stephen Brennan
Addressed some spacing, brace placement, and macro alignment in this driver. I do not have the relevant hardware, but I verified that the drivers/staging/rtl8192u module built between each patch. This time I've included proper patch descriptions, my apologies for the previous series. Stephen

[PATCH 3/3] staging: rtl8192u: fix spacing in ieee80211

2019-08-20 Thread Stephen Brennan
Signed-off-by: Stephen Brennan --- drivers/staging/rtl8192u/ieee80211/dot11d.c | 10 ++-- .../staging/rtl8192u/ieee80211/ieee80211.h| 4 +- .../rtl8192u/ieee80211/ieee80211_crypt.c | 2 +- .../rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 22 .../rtl8192u/ieee80211

[PATCH 2/3] staging: rtl8192u: fix macro alignment in ieee80211

2019-08-20 Thread Stephen Brennan
Signed-off-by: Stephen Brennan --- .../staging/rtl8192u/ieee80211/ieee80211.h| 35 ++- .../staging/rtl8192u/ieee80211/rtl819x_HT.h | 8 ++--- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging

[PATCH 0/3] staging: rtl8192u: coding style fixes in ieee80211

2019-08-20 Thread Stephen Brennan
Addressed some spacing, brace placement, and macro alignment in this driver. I do not have the relevent hardware, but I verified that the drivers/staging/rtl8192u module built between each patch. Stephen Brennan (3): staging: rtl8192u: fix OPEN_BRACE errors in ieee80211 staging: rtl8192u: fix

[PATCH 1/3] staging: rtl8192u: fix OPEN_BRACE errors in ieee80211

2019-08-20 Thread Stephen Brennan
Signed-off-by: Stephen Brennan --- .../staging/rtl8192u/ieee80211/ieee80211.h| 3 +- .../staging/rtl8192u/ieee80211/ieee80211_rx.c | 116 ++ .../staging/rtl8192u/ieee80211/ieee80211_tx.c | 81 +--- .../staging/rtl8192u/ieee80211/ieee80211_wx.c | 3 +- .../staging

[PATCH] staging: rtl8192u: fix spacing errors

2019-08-11 Thread Stephen Brennan
Used checkpatch's --fix-inplace option for types SPACING, OPEN_BRACE, ELSE_AFTER_BRACE. Manually edited the resulting changes to correct for mistaken fixes and complete fixes that were only partially applied. Signed-off-by: Stephen Brennan --- To prevent this patch from getting even longer

[PATCH v2] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Stephen Brennan
In particular, fixes some over-indented if statement bodies as well as a couple lines indented with spaces. checkpatch.pl now reports no warnings on this file other than 80 character warnings. Signed-off-by: Stephen Brennan <step...@brennan.io> --- V2 also fixes an overlooked indentation

[PATCH v2] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Stephen Brennan
In particular, fixes some over-indented if statement bodies as well as a couple lines indented with spaces. checkpatch.pl now reports no warnings on this file other than 80 character warnings. Signed-off-by: Stephen Brennan --- V2 also fixes an overlooked indentation error that checkpatch didn't

Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Stephen Brennan
On Fri, Oct 27, 2017 at 07:23:58AM -0700, Joe Perches wrote: > On Fri, 2017-10-27 at 11:32 +0300, Dan Carpenter wrote: > > But then ssi_buffer_mgr_copy_scatterlist_portion() is still not indented > > correctly. Yeah, I don't know how I missed it. I'll send a new version of the patch out

Re: [PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-27 Thread Stephen Brennan
On Fri, Oct 27, 2017 at 07:23:58AM -0700, Joe Perches wrote: > On Fri, 2017-10-27 at 11:32 +0300, Dan Carpenter wrote: > > But then ssi_buffer_mgr_copy_scatterlist_portion() is still not indented > > correctly. Yeah, I don't know how I missed it. I'll send a new version of the patch out

[PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-26 Thread Stephen Brennan
In particular, fixes some over-indented if statement bodies as well as a couple lines indented with spaces. checkpatch.pl now reports no warnings on this file other than 80 character warnings. Signed-off-by: Stephen Brennan <step...@brennan.io> --- Hello again, hoping these indentation

[PATCH] staging: ccree: Fix indentation in ssi_buffer_mgr.c

2017-10-26 Thread Stephen Brennan
In particular, fixes some over-indented if statement bodies as well as a couple lines indented with spaces. checkpatch.pl now reports no warnings on this file other than 80 character warnings. Signed-off-by: Stephen Brennan --- Hello again, hoping these indentation issues are a bit more

Re: [PATCH] staging: ccree: Fix lines longer than 80 characters

2017-10-26 Thread Stephen Brennan
Apologies for the noise, this was the wrong patch. Please ignore this.

Re: [PATCH] staging: ccree: Fix lines longer than 80 characters

2017-10-26 Thread Stephen Brennan
Apologies for the noise, this was the wrong patch. Please ignore this.

[PATCH] staging: ccree: Fix lines longer than 80 characters

2017-10-26 Thread Stephen Brennan
Simply break down some long lines and tab-indent them. Signed-off-by: Stephen Brennan <step...@brennan.io> --- I'm learning the patch submission process, and this is my first patch. I know it's trivial but I'm just trying to get my feet wet. Thanks in advance for taking the time to

[PATCH] staging: ccree: Fix lines longer than 80 characters

2017-10-26 Thread Stephen Brennan
Simply break down some long lines and tab-indent them. Signed-off-by: Stephen Brennan --- I'm learning the patch submission process, and this is my first patch. I know it's trivial but I'm just trying to get my feet wet. Thanks in advance for taking the time to review this! drivers/staging