Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2120586ybb; Thu, 26 Mar 2020 22:33:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtIK+M/mTbYN7CgFuN6OEzFI0m/qjpOB80oSjOs2MSuosh68rDxG/20eNTEB8sbkRSFU7Yi X-Received: by 2002:aca:3844:: with SMTP id f65mr2971485oia.176.1585287186636; Thu, 26 Mar 2020 22:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585287186; cv=none; d=google.com; s=arc-20160816; b=X4M7Uo4yt/ylI2vE/v9PyV7ZXvy6L/3YsX4Rhn7sIYKRLBzfKBTasPSCVxCnMRcT3V sGTHorYEU3ELEU1Gcpd0rYyKUI5pwq5BZeCfbp68HXuiYWKWVoL31ITSfMyccnFqZO+Q JwdsyZL2TDevctE8Zdc3/ZtUlI7J0FaLr/CTwmETJf/UgkJ++ClHeo8Xo0X26zq8rf0J TU3Vmd3dMX715XjQlDdCxt3wNe0ItqqP+dHqqRJTTBqPz7egNeHPCiKOjJHd6bNuwaRD /zi9pxh6sMq2RmH6Ay+zkgV7vgBNn9igj8iUY4kGaGgPoaUux9HaupKtIk/5OMbiUxei isMQ== 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=0aSGmCSFNaK2u76JjA7BVQB1O79rv1aQ7YCzvcBdSxY=; b=GdxWYvqP2owwyNkWfe5rnuyy0usYLy166B0pKZVTqhm9V9FhhRb8iDLoqcEewMWRSE V2JizzgVnH5k0wSJWKn6whiHKgaaB8ui/1AhMboVYfPgtJf/dktnJhheBEYra4qCgSgV 39ip3D5jd8rXUgBVSeD+lipRhF3cVA2TY54RparTv6R0ysFAkTEU/cZSuXf+nJobvu2/ XRDHMhEx/jhBV0FnWJa4RRqOBGt9ebzsgVb9MOxRomnKsr1NZspQlfjUrccenTqMOoke 8o5YLOW984FRgadeAR2XGEkNJqbqR9OxqmPROEkeD12/KYNq55oAmpXQOFRPpFzwid8e 6fAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=F8D9FdaZ; 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 t132si1945008oih.173.2020.03.26.22.32.53; Thu, 26 Mar 2020 22:33:06 -0700 (PDT) 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=F8D9FdaZ; 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 S1726739AbgC0Fbc (ORCPT + 99 others); Fri, 27 Mar 2020 01:31:32 -0400 Received: from mail-qv1-f66.google.com ([209.85.219.66]:36354 "EHLO mail-qv1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbgC0Fbb (ORCPT ); Fri, 27 Mar 2020 01:31:31 -0400 Received: by mail-qv1-f66.google.com with SMTP id z13so4360890qvw.3 for ; Thu, 26 Mar 2020 22:31:30 -0700 (PDT) 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=0aSGmCSFNaK2u76JjA7BVQB1O79rv1aQ7YCzvcBdSxY=; b=F8D9FdaZDtIs1Nvnss6zo39ggbeUmDGReLfXNJ0uVpGGGoIv8HmaV+x09St1MFctvx 8jCHCOkqMtYyI93+JUe2F1VL2D04tFx5vPN2FjtG6ZLCzvgT7CFZZFPmI934rbzuJRHi Soj9DuzRfLd1y+fbACoPWmAawlycl4CiqvFZpS9Y+eC8rtN0KKg5XRKbPh5g48insppB MUyTIhb5TytP8P4HnVcc/c53tgVuvrxKR14FIUgfxiY9I2MYDTZtIcyERJO66R4Ib6m5 q5pVUVUWhc7F0IdpEdeBybxi91Yz5j8hzV7iZDMLqN3Ln/b/6hH9ypSb0zRMreXqlMgR 1Cpg== 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=0aSGmCSFNaK2u76JjA7BVQB1O79rv1aQ7YCzvcBdSxY=; b=BrGB5CHHieFme6FbrTAeSKWYgCUsiO9JZ8J3tPW2wwoedVbWqWeU3D12VWTgosNk14 ZQ+KTbXRlI3Nxtz2PROb+rE5LrD2AMDEmg9QHa5SWrgxZIGv5HediZJXrgkEFXA1LENx NZLTFnFbikMH7JKkqWf0bdwOwufR/Urb/2vSN8Ox7yJg6cf0NQv4osplifNV2Jchx2rO WnNn2x/L6WCyFCzBJ7VsSViTPRC4Rftil23Lx/GOUBpE+EDQ0PG8po1FKpykVKBB7kPI O+ElB5zdaVMXHHAUPPeMHkFSJWZTJr0+eBzhkjiWwIcyM9dqo8Jl/hXGyTl9CrMo9OWu IeUw== X-Gm-Message-State: ANhLgQ2ZbormNdP0iQqSgUjKOJH5dqXA7LKTpzCyuXFPyneZa1pJYkQQ T9zZZSauonYX7TC0BLc8nSKKCHHpkdGnTU0z8JlNmQ== X-Received: by 2002:ad4:4088:: with SMTP id l8mr9904318qvp.34.1585287089966; Thu, 26 Mar 2020 22:31:29 -0700 (PDT) MIME-Version: 1.0 References: <20200319164227.87419-1-trishalfonso@google.com> <20200319164227.87419-4-trishalfonso@google.com> In-Reply-To: From: Dmitry Vyukov Date: Fri, 27 Mar 2020 06:31:18 +0100 Message-ID: Subject: Re: [RFC PATCH v2 3/3] KASAN: Port KASAN Tests to KUnit To: Patricia Alfonso Cc: David Gow , Brendan Higgins , Andrey Ryabinin , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , LKML , kasan-dev , kunit-dev@googlegroups.com, "open list:KERNEL SELFTEST FRAMEWORK" 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, Mar 26, 2020 at 4:15 PM Patricia Alfonso wrote: > > > > wrote: > > > > > > > > > > Transfer all previous tests for KASAN to KUnit so they can be run > > > > > more easily. Using kunit_tool, developers can run these tests wit= h their > > > > > other KUnit tests and see "pass" or "fail" with the appropriate K= ASAN > > > > > report instead of needing to parse each KASAN report to test KASA= N > > > > > functionalities. All KASAN reports are still printed to dmesg. > > > > > > > > > > Stack tests do not work in UML so those tests are protected insid= e an > > > > > "#if IS_ENABLED(CONFIG_KASAN_STACK)" so this only runs if stack > > > > > instrumentation is enabled. > > > > > > > > > > copy_user_test cannot be run in KUnit so there is a separate test= file > > > > > for those tests, which can be run as before as a module. > > > > > > > > Hi Patricia, > > > > > > > > FWIW I've got some conflicts applying this patch on latest linux-ne= xt > > > > next-20200324. There are some changes to the tests in mm tree I thi= nk. > > > > > > > > Which tree will this go through? I would be nice to resolve these > > > > conflicts somehow, but I am not sure how. Maybe the kasan tests > > > > changes are merged upstream next windows, and then rebase this? > > > > > > > > Also, how can I apply this for testing? I assume this is based on s= ome > > > > kunit branch? which one? > > > > > > > Hmm... okay, that sounds like a problem. I will have to look into the > > > conflicts. I'm not sure which tree this will go through upstream; I > > > expect someone will tell me which is best when the time comes. This i= s > > > based on the kunit branch in the kunit documentation here: > > > https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest= .git/log/?h=3Dkunit > > > > I've checked out: > > > > commit 0476e69f39377192d638c459d11400c6e9a6ffb0 (HEAD, kselftest/kunit) > > Date: Mon Mar 23 12:04:59 2020 -0700 > > > > But the build still fails for me: > > > > mm/kasan/report.c: In function =E2=80=98kasan_update_kunit_status=E2=80= =99: > > mm/kasan/report.c:466:6: error: implicit declaration of function > > =E2=80=98kunit_find_named_resource=E2=80=99 [-Werror=3Dimplicit-functio= n-declar] > > 466 | if (kunit_find_named_resource(cur_test, "kasan_data")) { > > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > > mm/kasan/report.c:467:12: warning: assignment to =E2=80=98struct > > kunit_resource *=E2=80=99 from =E2=80=98int=E2=80=99 makes pointer from= integer without a cas] > > 467 | resource =3D kunit_find_named_resource(cur_test, "kasan_data"= ); > > | ^ > > mm/kasan/report.c:468:24: error: =E2=80=98struct kunit_resource=E2=80= =99 has no member > > named =E2=80=98data=E2=80=99 > > 468 | kasan_data =3D resource->data; > > | ^~ > > > > What am I doing wrong? > > This patchset relies on another RFC patchset from Alan: > https://lore.kernel.org/linux-kselftest/1583251361-12748-1-git-send-email= -alan.maguire@oracle.com/T/#t > > I thought I linked it in the commit message but it may only be in the > commit message for part 2/3. It should work with Alan's patchset, but > let me know if you have any trouble. Please push your state of code to some git repository, so that I can pull it. Github or gerrit or whatever.