Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp348249lqh; Fri, 31 May 2024 03:17:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBcQdjxqEg6g00z0EuJtQiVkGPmSbNq+nPcm4KWTu5Mf17F7GyRZP+kINEQ7o20/PLw9FYW1WKuu98aeFkoLSXAxlIpyOEPRuU+AiZvw== X-Google-Smtp-Source: AGHT+IH9ulrUrvQLWGU9pkX+XZYI5JoYvYsffCC3OnPG79hza0sFp074NYIdMYZSgxXYQAI57a5K X-Received: by 2002:a17:906:158c:b0:a63:6c46:d54f with SMTP id a640c23a62f3a-a681fc5bfdfmr92711366b.13.1717150637405; Fri, 31 May 2024 03:17:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717150637; cv=pass; d=google.com; s=arc-20160816; b=z54Kh3PJ3K3rB1TD1b8yryS0QbcMyQSw5gxUJecUAS78LUtH9jA3/bgrNWf+BWiKWD 0aH8IT8XI3YAqyPcqQQ1OTjOo30InjzJcUjwXq4Hx8pbIh/GZ5jS7i9cWhWEzkSrE9rN 0+bCQywW88fdoOa58x1Qx1vtvKjaaQjsumLwTCy4rdBkCUdIU9hI8HUBqBQ/OjNxKXV8 k/3UcSZ/jKdcc585E2KUzVIKIWoNGry1mi80gE/GY/ZcO/WQDuzUls3vOyEVRsUe6Ztj KbQLfsbMq1cYN7kuSSTVd+WGiRcCZ0BLVAOeaiP80YfOdigdbPgYcswJ8cT8JolBPbqd rpbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=837MK68WGDetvBo4PtCJIBgwkmRAOQPrvKQvmr6pvUU=; fh=ntz+BLuq37hy5Fe+wADZTCBvn0Xe0QVsV0rGioQ0Sxo=; b=zgVK41Bv1U6BIxofiQZmETFm9X1NT2E3CXGXq/DuxyVENh5EYw+03Ktc4e+lFscOBX Xnm+xcygYOGsApj82UieAndrenN721/5+wAfw0beTcd2e9hXpxl+WCvqgUD8zsNFbKe9 s89APimo4LIei7mm0dquXzQMSZqCBMKVgbfatoEDSrU69hW+Fg3lPOOwgziLfiGt0ywq Qhhs28mr4V8/ysPkypfnq8oPv4eoZGWCAoc7plaiTjG74ELmTOAZaWh8FY8vzCUMzLFQ MhJygrA6lQ8E+d5ha1xh9GJDDINEh8DdbVHrXXHjXYYfq8sq4aoacOS+BuRba26BKry7 IKJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OwNNV4NV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a67e6f03972si73795566b.205.2024.05.31.03.17.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 03:17:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OwNNV4NV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-196657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EAD161F2449D for ; Fri, 31 May 2024 10:17:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 270A81509AF; Fri, 31 May 2024 10:17:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OwNNV4NV" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E24C1420A8; Fri, 31 May 2024 10:17:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717150628; cv=none; b=EwbfrKa+/LiR12BrqJhCh97oWtb0sW0Ki2ZzzJvOkBFvLVnGqvHWazXPylEpCSpFYMnVZMZMSPJ+AEK22B/IzwbJmQbFAmfqFOIfbB7vV78o8w1Rk+e6m3s755CipL1nQMcKATIe1MliGWmT7mJ9QGhSokk2j4/6f4IYAfs4Dgw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717150628; c=relaxed/simple; bh=t03VszJlYXWjlgLgRz4DrrJUItlK5fWgyIBqemTmRtE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=GYzhyV64ty114tTmPgftyXyF70infcKu1S9o/s2O3A9N5XSF5t8FGIOD06txXflkhro2zleheyrBuOkzBGDKHVnYR0qGuyjyBHzrUaywqNHchSGSIjbhdKzOtq7JvX/d0n+nvDcceCQ70LaG5p+4rlul2+ZT99l3nuva4nAwVOU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OwNNV4NV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2575C32789; Fri, 31 May 2024 10:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717150627; bh=t03VszJlYXWjlgLgRz4DrrJUItlK5fWgyIBqemTmRtE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OwNNV4NVWYhb8XQhusRpYk4z3BAAEsR63IshMyAo1R+SN7+LyGc+EgTcWAAhHfAkx Dy/IeAZDixFPoYCj+EVj17U69ic/eKAPJKTqLdfwRmvgz/ojvB91rmimCbaO2Fd+f0 A3+s71Ds6Tli1quSxCQ5Hn0uEw/UKq5L2PoO4vjFn9Deq9frUn1vJ159fbAvyqfaX6 gHQ7G3r2Nn5+9znCMpd0zeYg1U2+MS8KfuuyxUXaM9D8v0sAAqH+oo34ubIuPANrjv d4IgxAj05wERlT3HMFmQDF7tbOzu9PDnE+MYIUWEAod8CvuIKXc6F7YyAGsXQnB8X5 cELxPcLQOthAg== Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2e6f2534e41so10440911fa.0; Fri, 31 May 2024 03:17:07 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXxo6KOmGnFZsUVw1gkHdWTUGFk6EUUB4Mr9J2kdB26AB2aA07yp38pommhLDuMP+Y4vWs1bT+O1WWHB+ehRq27AVSIqtsMJ7E81FO9O0ZEHHXktEcmYsx1xOPV1CtoTJm9UG8ttofWwg== X-Gm-Message-State: AOJu0YztF1i3Ph/s01k4cS10RCg8PX3WXBY/06Pr111dW5qT1KLGjlyM 6n89CQkJLrL6LXXGpOBmQLJKTAXSw6PBHhbWUxQKUpG3GsRzYRju+QD9pztqkf+1W70YDfQE6df FXRHu5xj1/hVQ8XfjgD7kKqot6ng= X-Received: by 2002:a2e:818c:0:b0:2da:736d:3cf5 with SMTP id 38308e7fff4ca-2ea951ac985mr11126011fa.41.1717150626510; Fri, 31 May 2024 03:17:06 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240506133544.2861555-1-masahiroy@kernel.org> <20240506133544.2861555-2-masahiroy@kernel.org> <0e8dee26-41cc-41ae-9493-10cd1a8e3268@app.fastmail.com> In-Reply-To: From: Masahiro Yamada Date: Fri, 31 May 2024 19:16:30 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/3] kbuild: provide reasonable defaults for tool coverage To: Arnd Bergmann Cc: linux-kbuild@vger.kernel.org, Linux-Arch , linux-kernel@vger.kernel.org, Kees Cook Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 31, 2024 at 6:06=E2=80=AFPM Arnd Bergmann wrote= : > > On Fri, May 31, 2024, at 10:52, Masahiro Yamada wrote: > > On Tue, May 28, 2024 at 8:36=E2=80=AFPM Arnd Bergmann w= rote: > > >> I don't understand the nature of this warning, but I see > >> that your patch ended up dropping -fsanitize=3Dkernel-address > >> from the compiler flags because the lib/test_fortify/*.c files > >> don't match the $(is-kernel-object) rule. Adding back > >> -fsanitize=3Dkernel-address shuts up these warnings. > > > > > > In my understanding, fortify-string is independent of KASAN. > > > > I do not understand why -fsanitize=3Dkernel-address matters. > > Right, this is something I've failed to understand as well > so far. > > >> I've applied a local workaround in my randconfig tree > >> > >> diff --git a/lib/Makefile b/lib/Makefile > >> index ddcb76b294b5..d7b8fab64068 100644 > >> --- a/lib/Makefile > >> +++ b/lib/Makefile > >> @@ -425,5 +425,7 @@ $(obj)/$(TEST_FORTIFY_LOG): $(addprefix $(obj)/, $= (TEST_FORTIFY_LOGS)) FORCE > >> > >> # Fake dependency to trigger the fortify tests. > >> ifeq ($(CONFIG_FORTIFY_SOURCE),y) > >> +ifndef CONFIG_KASAN > >> $(obj)/string.o: $(obj)/$(TEST_FORTIFY_LOG) > >> +endif > >> endif > >> > >> > >> which I don't think we want upstream. Can you and Kees come > >> up with a proper fix instead? > > > > I set CONFIG_FORTIFY_SOURCE=3Dy and CONFIG_KASAN=3Dy, > > but I did not observe such warnings. > > Is this arch or compiler-specific? > > > > > > Could you provide me with the steps to reproduce it? > > This is a randconfig .config file that shows it, but > I've seen it in a lot of others: > https://pastebin.com/raw/ESVzUeth > > If this doesn't reproduce it for you, I can try to narrow > it down further. > > Arnd Thanks, I was able to reproduce it. The issue happens with CONFIG_KASAN_SW_TAGS. I do not see the issue with CONFIG_KASAN_GENERIC. --=20 Best Regards Masahiro Yamada