Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1276633ybz; Fri, 17 Apr 2020 20:20:12 -0700 (PDT) X-Google-Smtp-Source: APiQypLQNI49I+wC82Gx8AFmCwtc2ZSDGoU2lQkBE2FmDoysA9Kl6facWDxLhPrNYKs0jQhattb9 X-Received: by 2002:a50:c850:: with SMTP id s16mr6001451edg.90.1587180012405; Fri, 17 Apr 2020 20:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587180012; cv=none; d=google.com; s=arc-20160816; b=FS+FmGjKW6caw5kE/COhC47LPlnkadnFW39y1rlLwih9UvIzvTyUOiSnQoClIbgWaw ny8WiQyHT2vyIHadWHLJuk9enxQuUYgtLt5g2mge/jxnaEiPn1KpDIzQNg5Tk/06lsuB RDVACPczkgcxS4if1vbLS+IXX6uueko1zxCHla0Y2CCPBbV169Zi8f1zURBKDzKmTcqs 5cmA1/qnbNLMpNdAkr6d0coFdp9Br/Pen8PBhZ3fea73GXFDGU7tobezzNuy8rdT10SL q2BVy1P8EaAggUqMHJWvPx8ZbjwkTWLQcwTrPIwX91Y6Qy85ZyOc8hXOTdvHxxLa8vSU Horw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=CRqxf8T5bRxo/T712v0WU2H9pMxqHzrv9yCZKsRJO1k=; b=zDXx3vQlqhP+mjpk0GL/8v4mP9BHKLtFRgpBFX7ZOnnVZMOKtjgH/uqAkdj5tvEvO1 AmfR/k188hslzf59d3TtzQviuNhjeCAmWfnCAPaizJaSQ/ncpPMEvD1tjEjUU1gNDliM a8AltlAbUjFvM4jGYdJfRUz1LqxLg4xsyusAEAi/y42VYedI9wQUv1lBJODWQgdJUqMP Icvs5o599aO5B5e92PPlNu2liLzsciRQLUaKH+mhrxmwtuoGsCAsndehadoHFNbmAwQk jmSmN/2Wn17U9GhTBJ6Fcx6kHywIV7ede5MUime9/FyFuRt2XlCvpHILWg99Tfo5wrCS Nfmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ajelyZbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo19si9825175ejb.239.2020.04.17.20.19.49; Fri, 17 Apr 2020 20:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=ajelyZbA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725950AbgDRDSw (ORCPT + 99 others); Fri, 17 Apr 2020 23:18:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725887AbgDRDSv (ORCPT ); Fri, 17 Apr 2020 23:18:51 -0400 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81F98C061A0C for ; Fri, 17 Apr 2020 20:18:49 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id h6so3932240pfr.16 for ; Fri, 17 Apr 2020 20:18:49 -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=CRqxf8T5bRxo/T712v0WU2H9pMxqHzrv9yCZKsRJO1k=; b=ajelyZbAItvKpqcy6Z2JVr/HmXS32yXhFk3WhOlmBUApRGbSGPKDdd2b/0xaWhNzeg pbJ6CTgi/hrcR2GA9/9r4zzbzDUI8b9GbneSnyVNJsgPEZfGAivLmf/9i0MBwhfatKWc 1u972kzMOZ0UKUVZpav0YX5kVnr1nnFj41yoPco0bV0SwhdtPHq679t5GbtNaSuT1JWx enZBxFS6znX8KEndztit3HG8GDotznpgTEO+flJfyML1bpO8NCuM5CAMyvzKkG0f4w15 naNaLqxsnNdBKT4G30UKEdsMDFublaTtLiWZqZZCjoxCDmfQDRgTbBkjd09Ui9VF86By lVPg== 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=CRqxf8T5bRxo/T712v0WU2H9pMxqHzrv9yCZKsRJO1k=; b=OWFE0JTCAwW0YReDlocVrgtMAsligTv8vglr3UK2F4z9iwuJqFgTrzMV4JiCMrL4J6 Vmgu4/lnK8Fwkee4Sg69Kr+obf6xaCEl5MEtL1FW1eqSLr163HnvpyFYeaOzUXrA4f3A gqZYTn3hb6sNlzG5+C6CUcCeU8qoBo2HfK7jo6fZFaxKnSOfoPzzYb9zfCM6yrbkT0kV /BjLqPpNJ2owaNZ7p2RLpPat80cLG3BbXNu6LzMtkioaruYmFnQ90uQkTOAYayfJQTXD Gu9QL0XWnAmBxC6hqqO+uviHcX/AVlb8htj5hqd9rN4mEDGGClWPvbl2jq6GYmimT1s5 rN7Q== X-Gm-Message-State: AGi0PuY/hqlBC6MrZ/ye7NgZy2ZySBtypqV0wc08aDEufHzobl52cQn0 vuqMPIjZ6++VHa+/uKbGL7E4JH8TsxmThQ== X-Received: by 2002:a17:90a:30a5:: with SMTP id h34mr7674332pjb.171.1587179929037; Fri, 17 Apr 2020 20:18:49 -0700 (PDT) Date: Fri, 17 Apr 2020 20:18:29 -0700 In-Reply-To: <20200418031833.234942-1-davidgow@google.com> Message-Id: <20200418031833.234942-2-davidgow@google.com> Mime-Version: 1.0 References: <20200418031833.234942-1-davidgow@google.com> X-Mailer: git-send-email 2.26.1.301.g55bc3eb7cb9-goog Subject: [PATCH v6 1/5] 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 Cc: linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, David Gow Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 4418f5cb8324..e50c568a8dc7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1188,6 +1188,10 @@ struct task_struct { unsigned int kasan_depth; #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; -- 2.26.1.301.g55bc3eb7cb9-goog