From patchwork Tue Aug 11 05:39:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gow X-Patchwork-Id: 11708573 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A69B41392 for ; Tue, 11 Aug 2020 05:39:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72D5620772 for ; Tue, 11 Aug 2020 05:39:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ex3UMkvi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72D5620772 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1DBF26B0005; Tue, 11 Aug 2020 01:39:39 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 166836B0006; Tue, 11 Aug 2020 01:39:39 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 006416B0007; Tue, 11 Aug 2020 01:39:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0008.hostedemail.com [216.40.44.8]) by kanga.kvack.org (Postfix) with ESMTP id D94536B0005 for ; Tue, 11 Aug 2020 01:39:38 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 99404180AD804 for ; Tue, 11 Aug 2020 05:39:38 +0000 (UTC) X-FDA: 77137185636.26.able14_4b16ccf26fe0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 4F4EA1804B661 for ; Tue, 11 Aug 2020 05:39:38 +0000 (UTC) X-Spam-Summary: 1,0,0,5e0bdb6b6317da57,d41d8cd98f00b204,3gc8yxwgkcd8ebwjehpxhpphmf.dpnmjovy-nnlwbdl.psh@flex--davidgow.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1277:1313:1314:1345:1359:1431:1434:1437:1516:1518:1534:1540:1593:1594:1711:1714:1730:1747:1777:1792:2198:2199:2393:2559:2562:2731:3138:3139:3140:3141:3142:3152:3351:3865:3866:3867:3870:4250:4321:5007:6261:6653:6737:7576:9969:10004:10400:11026:11473:11658:11914:12048:12296:12297:12438:12555:12679:12895:12986:13069:13311:13357:14096:14097:14181:14394:14659:14721:21080:21220:21444:21451:21627:21740:30003:30054:30070,0,RBL:209.85.210.202:@flex--davidgow.bounces.google.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04yg1dahet6eiy3cds6fpa6wi75hoypjsbio1df66jygtddo6dsa4m9hcfhszwr.ea4h3obeb4wcs1hn8bz5no53npti6b3th9bbgnxd344jiwyhkyr4ixeasqc4azf.6-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_ru les:0:0: X-HE-Tag: able14_4b16ccf26fe0 X-Filterd-Recvd-Size: 3870 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Tue, 11 Aug 2020 05:39:37 +0000 (UTC) Received: by mail-pf1-f202.google.com with SMTP id l195so9588693pfd.22 for ; Mon, 10 Aug 2020 22:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=7T9CW/c7Zee0z3O+ssd8ugkXYgOmzh7dNULbFDDyxII=; b=ex3UMkvioGZcSdjkSZ3VMaDVrsMH7gLRv9mL8dE32SHnMS1Vp6aG8/WmhbdmLvhphx /1v5a5fB7wj+oPV+Oc932ItwZvqnOIfEfLFYIw2mw2xZ/BV4hxWbi6NbevXGJb6p/hAZ yLXIEGEadjNF+sz9Jmv4UDGjcUqUtFOw6QCS1DZ+FEz5mJ3M3jghYEh5nD/PUf70urZp sps9PvRiVV4Y8ga4E2mUIRkSVKdrG6kuk49HDExd1cDp6dbef6FbORjBCLjcD9mRJnpo UBL2v5FhX6Svv1k+vhVgCBzqe6WharEZ3d2Bd9kDkP7a6TkrmwopneVNZXXmKHG73Y36 zofw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=7T9CW/c7Zee0z3O+ssd8ugkXYgOmzh7dNULbFDDyxII=; b=LlMhkPpy843RV4MDMp3D7OB+wYqWuoFuL9+QiYvFoCrw0qjanEKeQNOrdpugi5c3j7 AUcNa/ETeGRlWCuV7y8UW0QUCPUKUIzpXoAogtG8AHlE6GGNk5bkXC/t2S0sBcZoPjkP vIlIi4mFWIEXDz3fk1EgrOVsqTefWroCtNYdsbhY91DLfRmXcPqsxyXH9czmxLJA5KGx jcbnJlFAHwpmR078xAgSDGVrCfCEjoqLFn3Kmxzc4Ll5wgW4XDFYDuC5oAVBAXlYLb/+ aQ/Ud8hrtBT26hZ9jJJD+jh7b3F/K+Btz5KPaq9LAOqxw9W22Jk5SrIJKtvGhsKVZ+uR FBIw== X-Gm-Message-State: AOAM530/vzQcP2viQXSkQHiK5UpWatwVdm8GZ6tnfhRKg5QdXubCtDoj m7FhBzdjzoj1tTep9MwqNW/g4+88p3MMAw== X-Google-Smtp-Source: ABdhPJyfog1oEdqhl3BDs/ZjD/wVYqou+PSwo2789g+sgcAektkcXd/V0M+4Yhqyd+fqVdDQRSewJ+BIlw1fHw== X-Received: by 2002:a17:90b:3684:: with SMTP id mj4mr2854429pjb.195.1597124376232; Mon, 10 Aug 2020 22:39:36 -0700 (PDT) Date: Mon, 10 Aug 2020 22:39:10 -0700 In-Reply-To: <20200811053914.652710-1-davidgow@google.com> Message-Id: <20200811053914.652710-2-davidgow@google.com> Mime-Version: 1.0 References: <20200811053914.652710-1-davidgow@google.com> X-Mailer: git-send-email 2.28.0.236.gb10cc79966-goog Subject: [PATCH v12 1/6] Add KUnit Struct to Current Task From: David Gow To: trishalfonso@google.com, brendanhiggins@google.com, aryabinin@virtuozzo.com, dvyukov@google.com, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, andreyknvl@google.com, shuah@kernel.org, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, David Gow X-Rspamd-Queue-Id: 4F4EA1804B661 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Patricia Alfonso In order to integrate debugging tools like KASAN into the KUnit framework, add KUnit struct to the current task to keep track of the current KUnit test. Signed-off-by: Patricia Alfonso Reviewed-by: Brendan Higgins Tested-by: Andrey Konovalov Signed-off-by: David Gow --- include/linux/sched.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index f92d03087b5c..3db26aa88971 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1203,6 +1203,10 @@ struct task_struct { #endif #endif +#if IS_ENABLED(CONFIG_KUNIT) + struct kunit *kunit_test; +#endif + #ifdef CONFIG_FUNCTION_GRAPH_TRACER /* Index of current stored address in ret_stack: */ int curr_ret_stack;