Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Revert r1.254, put back || for KASAN, some destruct...



details:   https://anonhg.NetBSD.org/src/rev/fc7dc7c06b81
branches:  trunk
changeset: 965001:fc7dc7c06b81
user:      maxv <maxv%NetBSD.org@localhost>
date:      Mon Aug 26 10:35:35 2019 +0000

description:
Revert r1.254, put back || for KASAN, some destructors like lwp_dtor()
caused false positives. Needs more work.

diffstat:

 sys/kern/subr_pool.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 5cb4412409c2 -r fc7dc7c06b81 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Mon Aug 26 10:24:39 2019 +0000
+++ b/sys/kern/subr_pool.c      Mon Aug 26 10:35:35 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.256 2019/08/17 12:37:49 maxv Exp $     */
+/*     $NetBSD: subr_pool.c,v 1.257 2019/08/26 10:35:35 maxv Exp $     */
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.256 2019/08/17 12:37:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.257 2019/08/26 10:35:35 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -3104,8 +3104,8 @@
 pool_cache_redzone_check(pool_cache_t pc, void *p)
 {
 #ifdef KASAN
-       /* If there is a ctor+dtor, leave the data as valid. */
-       if (__predict_false(pc_has_ctor(pc) && pc_has_dtor(pc))) {
+       /* If there is a ctor/dtor, leave the data as valid. */
+       if (__predict_false(pc_has_ctor(pc) || pc_has_dtor(pc))) {
                return;
        }
 #endif



Home | Main Index | Thread Index | Old Index