Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1203969ybf; Thu, 27 Feb 2020 06:46:17 -0800 (PST) X-Google-Smtp-Source: APXvYqzOvXrgEmKZ0PwbM918ZnI1zQ7zCrzUxpifh/hRc8UgmvZJczHxcPj6EZfnLUc3Zzv9L1kt X-Received: by 2002:a9d:7f11:: with SMTP id j17mr3876629otq.281.1582814777824; Thu, 27 Feb 2020 06:46:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582814777; cv=none; d=google.com; s=arc-20160816; b=hZzIb5hsC7ZA9PPwmeeKaNQX6/YiPJKMOQW4J05wQ/XPMzAov6+1eHc315UxYhNAFc 4Ay4QYgsVmTSarEnQzonD0dd4eWXNqfO8y1uuMvsMYy5E/4V0QbPDRdYw1U5K9xaFYDV osxAkYxj8LR9Any4Ew+wzQumwYhOOJmp3tTpe0w/4gqh3Dq0BwvgeWljEavKENCPSV/j WQgAaG6Q2GRku9E/J+/0L3Hla0uClMTCC+UYOcflZ7iWYgRCtQsfRce3KJkk1080w1lj o3Ofc5fuQOUySjuUIEuLmcM5etSTTx+E5Tb7HWDrPu+6Y8+mcjrG14C2pIR0p4W1xQNO 3AoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=uIt9DyZ9nPgtt+YVHDl4cWP+F6uXmWHM0NievYA3/mQ=; b=damezbSNdhkyK9whCNDBN15ZEXQ4k2UO4VTcH/17AtXDjo/GZzhamUrNn81tYZwGR8 epYFsH3KIVhKRtETtGDDxGAZbpFC9NSKrV6m8Zu/Hdbg7UaFfOla/4L5u037kdqr8JeY N9BhbnlfV7GYq0OGoTc4Js/Rk+OaSVqGNvm8ooPgWeNtGGQTSSSF8iFrxJWBC4eLNO26 X4EPBdGa4lf8kjaCUtkkGg4MIHPRZDIxNa4muwH9tnnfeDhdaZAr9RsUvZCXDJ4ehpPW ojoFZvI2JGB+odIIQDHotr7NmnrvQ7Zy9CfNA7okuzzYV1eVBQ4+Owo4QdwmuyHtx5NK ecEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VQBU8iu2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d23si1553952oij.270.2020.02.27.06.46.05; Thu, 27 Feb 2020 06:46:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VQBU8iu2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1731129AbgB0OpZ (ORCPT + 99 others); Thu, 27 Feb 2020 09:45:25 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:46003 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731148AbgB0OpX (ORCPT ); Thu, 27 Feb 2020 09:45:23 -0500 Received: by mail-vs1-f65.google.com with SMTP id m4so1953174vsa.12 for ; Thu, 27 Feb 2020 06:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=uIt9DyZ9nPgtt+YVHDl4cWP+F6uXmWHM0NievYA3/mQ=; b=VQBU8iu2uCPmMFA6ZKYuIFOaqxlIebNshhGY19HbX6TJSpWpKgmpqa+OiCriOvOtfU SURggXzLsOrJPCaj2ZcunCf16QRKxHwV+Tln/q+jGedzB6sCrBuhKpDYKEMg60GJWWMK lMR1htPczf5Po2JHrIdWjlWPXyunGfIE0XuEU0NbogWA9f50GQK7Q6rxJWyoq6XXTFpR rtG323NNbZowjcYgEr8VNhaRP1Ml4MBs1jk546H6xPLSyU4wF883j7mE9+h51e1Hjl7h 6ZdSg6VS9SDba70F7hxyUJZGRa0WA/PbzdcftGgzs0iJkWdF5j8GuiPhpb8sAjPaK7yM zATA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=uIt9DyZ9nPgtt+YVHDl4cWP+F6uXmWHM0NievYA3/mQ=; b=fr2tIdIjwHv2HOHS/h40U5V1ERENk2Aw8jTrEAtS14hXtipHgTo0pxKvQEVY4FF+RI 1C0CkvUPMHQbkm4ug1cPug2Zbf7zz8+pmRXMZ2tj5LTn4xRwLQvL26My8YuIv1Ua+edL +lnAc9HEki9rOVDsiY11tgH9cLRTh26+MOTm6t6smz3aO7tPv6nRqkDYRtYhd8P3od2W SSE3uiO4fsqT9f07UnBGptkUycQjvCXSyPZgiOWBSkT/spLyfLk8x+ZZxrFWwOdkaNeg cWYITXirZL3h1Q1fzDjrdjB0h91q/WUfGjIVIE4fdrDd3CPhDaGRTY80L9jPQ42/OQtI zruA== X-Gm-Message-State: APjAAAXxx+OYKhaSb28IwF4FXiqKdtkVyb8lWJaAM6Jd6OgPAsqN2t8s GoE4otr4jXsteaLF1/CnWTgp5gV6hlJLnPLudN0OVw== X-Received: by 2002:a67:f318:: with SMTP id p24mr2792811vsf.240.1582814722123; Thu, 27 Feb 2020 06:45:22 -0800 (PST) MIME-Version: 1.0 References: <20200227024301.217042-1-trishalfonso@google.com> <20200227024301.217042-2-trishalfonso@google.com> In-Reply-To: <20200227024301.217042-2-trishalfonso@google.com> From: Dmitry Vyukov Date: Thu, 27 Feb 2020 15:45:10 +0100 Message-ID: Subject: Re: [RFC PATCH 2/2] KUnit: KASAN Integration To: Patricia Alfonso Cc: Andrey Ryabinin , Brendan Higgins , David Gow , Ingo Molnar , Peter Zijlstra , Juri Lelli , vincent.guittot@linaro.org, LKML , kasan-dev , "open list:KERNEL SELFTEST FRAMEWORK" , kunit-dev@googlegroups.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 3:44 AM 'Patricia Alfonso' via kasan-dev wrote: > > Integrate KASAN into KUnit testing framework. > - Fail tests when KASAN reports an error that is not expected > - Use KUNIT_EXPECT_KASAN_FAIL to expect a KASAN error in KASAN tests > - KUnit struct added to current task to keep track of the current test > from KASAN code > - Booleans representing if a KASAN report is expected and if a KASAN > report is found added to kunit struct > - This prints "line# has passed" or "line# has failed" > > Signed-off-by: Patricia Alfonso This does not build for me: $ make scripts/kconfig/conf --syncconfig Kconfig CC arch/x86/kernel/asm-offsets.s UPD include/generated/asm-offsets.h CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool CC init/main.o In file included from ./include/linux/uaccess.h:11, from ./arch/x86/include/asm/fpu/xstate.h:5, from ./arch/x86/include/asm/pgtable.h:26, from ./include/linux/kasan.h:15, from ./include/linux/slab.h:136, from ./include/kunit/test.h:16, from ./include/linux/sched.h:35, from ./include/linux/ioprio.h:5, from ./include/linux/fs.h:39, from ./include/linux/proc_fs.h:9, from init/main.c:18: ./arch/x86/include/asm/uaccess.h: In function =E2=80=98set_fs=E2=80=99: ./arch/x86/include/asm/uaccess.h:31:9: error: dereferencing pointer to incomplete type =E2=80=98struct task_struct=E2=80=99 31 | current->thread.addr_limit =3D fs; | ^~ make[1]: *** [scripts/Makefile.build:268: init/main.o] Error 1 make: *** [Makefile:1681: init] Error 2 On bfdc6d91a25f4545bcd1b12e3219af4838142ef1 config: https://pastebin.com/raw/nwnL2N9w