From: Igor Stoppa <hidden> Date: 2018-09-05 20:35:12
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa <redacted>
Acked-by: Kees Cook <redacted>
Cc: linux-security-module at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
---
kernel/seccomp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -195,7 +195,7 @@ static u32 seccomp_run_filters(const struct seccomp_data *sd,READ_ONCE(current->seccomp.filter);/* Ensure unexpected behavior doesn't result in failing open. */-if(unlikely(WARN_ON(f==NULL)))+if(WARN_ON(f==NULL))returnSECCOMP_RET_KILL_PROCESS;if(!sd){
@@ -297,7 +297,7 @@ static inline pid_t seccomp_can_sync_threads(void)/* Return the first thread that cannot be synchronized. */failed=task_pid_vnr(thread);/* If the pid cannot be resolved, then return -ESRCH */-if(unlikely(WARN_ON(failed==0)))+if(WARN_ON(failed==0))failed=-ESRCH;returnfailed;}
On Wed, Sep 5, 2018 at 1:34 PM, Igor Stoppa [off-list ref] wrote:
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa <redacted>
Acked-by: Kees Cook <redacted>
Should I take this, or is it part of your series going somewhere else?
-Kees
quoted hunk
Cc: linux-security-module at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
---
kernel/seccomp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -195,7 +195,7 @@ static u32 seccomp_run_filters(const struct seccomp_data *sd,READ_ONCE(current->seccomp.filter);/* Ensure unexpected behavior doesn't result in failing open. */-if(unlikely(WARN_ON(f==NULL)))+if(WARN_ON(f==NULL))returnSECCOMP_RET_KILL_PROCESS;if(!sd){
@@ -297,7 +297,7 @@ static inline pid_t seccomp_can_sync_threads(void)/* Return the first thread that cannot be synchronized. */failed=task_pid_vnr(thread);/* If the pid cannot be resolved, then return -ESRCH */-if(unlikely(WARN_ON(failed==0)))+if(WARN_ON(failed==0))failed=-ESRCH;returnfailed;}--
From: Igor Stoppa <hidden> Date: 2018-09-05 22:49:27
On 06/09/18 01:23, Kees Cook wrote:
Should I take this, or is it part of your series going somewhere else?
It turned out it doesn't really work to have a generic series against 20
trees :-/
I'm submitting them individually to each subsystem.
So this one is just for security.
--
thanks, igor
On Wed, Sep 5, 2018 at 5:08 PM, James Morris [off-list ref] wrote:
On Wed, 5 Sep 2018, Kees Cook wrote:
quoted
On Wed, Sep 5, 2018 at 3:49 PM, Igor Stoppa [off-list ref] wrote:
quoted
On 06/09/18 01:23, Kees Cook wrote:
quoted
Should I take this, or is it part of your series going somewhere else?
It turned out it doesn't really work to have a generic series against 20
trees :-/
I know that pain very well!
quoted
I'm submitting them individually to each subsystem.
So this one is just for security.
Sounds good.
James, can you take this directly, or would you prefer a pull request from me?
I'll take it with your ack.
Already included! :) (This was a v2, split from a separate series, so
Igor already included my Ack from the other thread.)
But, for completeness:
Acked-by: Kees Cook <redacted>
-Kees
--
Kees Cook
Pixel Security
From: James Morris <jmorris@namei.org> Date: 2018-09-06 20:31:41
On Wed, 5 Sep 2018, Igor Stoppa wrote:
WARN_ON() already contains an unlikely(), so it's not necessary to wrap it
into another.
Signed-off-by: Igor Stoppa <redacted>
Acked-by: Kees Cook <redacted>
Cc: linux-security-module at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general
and next-testing.
Thanks!
--
James Morris
[off-list ref]