From nobody Mon Apr 22 17:12:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VNWyW2wGyz5HV21; Mon, 22 Apr 2024 17:12:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VNWyW1F2qz4MBK; Mon, 22 Apr 2024 17:12:19 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-69b6d36b71cso21970396d6.3; Mon, 22 Apr 2024 10:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713805938; x=1714410738; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=uaRFLJeJ/Z765Kr+dCoO7X7cQZB9Y2UKiDtFJJSfPKM=; b=k8/ExoeniU2AD/kmQ8nidqWnfhpCbMGM2iU9rmSbu0JgFtd73f8s36CSILqPznHjBy yKwGxu9dxba4EyFYpq0PPKcFygPw7+ch09YIkXBCd8cWEao159FO/NBR4K/5BH3l45md axGSepB1el/cWWP8LryyJpoYGLx8UywNnfcVqRPwjjx67OVKl0QV2sC0g3BUyscbvnQ9 f4PJFJfBvhR3IRff344zcqSR5qn4/onx3QCzkfHlt3r+w6OkIfupLCQu94vow0gxIjhQ sQsIyY1o/vRshAIXtvqfOyk903aUJ/NjnsLQyTDUyETrH126rFGQZyvb5Hq2aKvdm55t XHkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713805938; x=1714410738; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uaRFLJeJ/Z765Kr+dCoO7X7cQZB9Y2UKiDtFJJSfPKM=; b=maZ/Q8cdUrx1R6HScoiot0JJpCnJnV46Rt7xHtXc5QU9OAkRZSku6NG9jaU6J5SYfX dFGxJ0Y+jIWWi087YidUqnd+LJC+aaa/+83aG4Jhv6mqylMZMHBIBv8nE0ICCqypvl5X oRMkQ7u47yaS4FXXLJW3DUw1iaN8UA2eupDKG8Siw4vXcj/9JxfHzKxOcrPNrDzUAR83 fvuPlHBcpzlcCEVVDGhJYzgHYlYbvzUTiCfnhNQTCfZ5sOO+BakTpmsvhoFt7pCbG5UK mxiIhDXTWubpRxXE/tXaX5U4onYvtgQtkND6P7FVSAl2issFo3CCz2XVClsUC6VV3p9b 0kHw== X-Forwarded-Encrypted: i=1; AJvYcCW9tXzRd5NFYoVuxa8Zwq6Pn07SftsB6eD4KycaxoTYmeqdn7liSJ7k3R3rChzs4z7LIPouzCgNJy+aOakI5+y64ap23XDJM8fVOpJlZS28qpQogF/N2O2kO18dTP3nZhfuMuvWzFaTjo1T4gVIGFJ8Xg== X-Gm-Message-State: AOJu0Yxo4lKpL+vYUFcrqIESslzp2nuFyHYZScP9G9+fvGVgoCRhWYNn r6YS/5C4dxv8qIe/1XBNTb7fIHmglM9JiTT/8ly2B/NevihiuZxjIa13KQ== X-Google-Smtp-Source: AGHT+IGSfs/Ou2KoVbyYH/eWdWpLfRHt1OIXNrp/g1K1uXRGipsIU/0vBeGfWoQvzXGRE2JoYepVZg== X-Received: by 2002:a05:6214:424b:b0:6a0:6bf1:446f with SMTP id ne11-20020a056214424b00b006a06bf1446fmr7072033qvb.48.1713805937992; Mon, 22 Apr 2024 10:12:17 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id u5-20020a0c8dc5000000b0069b412e3716sm3357586qvb.80.2024.04.22.10.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 10:12:17 -0700 (PDT) Date: Mon, 22 Apr 2024 13:12:14 -0400 From: Mark Johnston To: FreeBSD User Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 800da341bc4a - main - thread: Simplify sanitizer integration with thread creation Message-ID: References: <202404221554.43MFsR3n041218@gitrepo.freebsd.org> <20240422190658.51b1484e@thor.intern.walstatt.dynvpn.de> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240422190658.51b1484e@thor.intern.walstatt.dynvpn.de> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4VNWyW1F2qz4MBK On Mon, Apr 22, 2024 at 07:06:31PM +0200, FreeBSD User wrote: > Am Mon, 22 Apr 2024 15:54:27 GMT > Mark Johnston schrieb: > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=800da341bc4a35f4b4d82d104b130825d9a42ffa > > > > commit 800da341bc4a35f4b4d82d104b130825d9a42ffa > > Author: Mark Johnston > > AuthorDate: 2024-04-22 15:43:17 +0000 > > Commit: Mark Johnston > > CommitDate: 2024-04-22 15:46:59 +0000 > > > > thread: Simplify sanitizer integration with thread creation > > > > fork() may allocate a new thread in one of two ways: from UMA, or cached > > in a freed proc that was just allocated from UMA. In either case, KASAN > > and KMSAN need to initialize some state; in particular they need to > > initialize the shadow mapping of the new thread's stack. > > > > This is done differently between KASAN and KMSAN, which is confusing. > > This patch improves things a bit: > > - Add a new thread_recycle() function, which moves all kernel stack > > handling out of kern_fork.c, since it doesn't really belong there. > > - Then, thread_alloc_stack() has only one local caller, so just inline > > it. > > - Avoid redundant shadow stack initialization: thread_alloc() > > initializes the KMSAN shadow stack (via kmsan_thread_alloc()) even > > through vm_thread_new() already did that. > > - Add kasan_thread_alloc(), for consistency with kmsan_thread_alloc(). > > > > No functional change intended. > > > > Reviewed by: khng > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D44891 > > [...] > It seems to me that this commit breaks make buildkernel: > > [...] > ===> accf_dns (all) > --- kern_thread.o --- > /usr/src/sys/kern/kern_thread.c:801:2: error: call to undeclared function > 'kasan_thread_alloc'; ISO C99 and later do not support implicit function declarations > [-Werror,-Wimplicit-function-declaration] 801 | kasan_thread_alloc(td); | ^ > /usr/src/sys/kern/kern_thread.c:818:2: error: call to undeclared function > 'kasan_thread_alloc'; ISO C99 and later do not support implicit function declarations > [-Werror,-Wimplicit-function-declaration] --- modules-all --- --- all_subdir_accf_http --- > ===> accf_http (all) > --- kern_thread.o --- > 818 | kasan_thread_alloc(td); > | ^ > 2 errors generated. I've just pushed a commit to fix this.