Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp64919lqc; Thu, 29 Feb 2024 10:22:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV4JGYT3mnRXiB6nyXrNi5lFbof8NqfjFH/MY5ED2KKtx1K40Rmx8ZWihnERMWtHy8Ic5d8psGhpvfKdQgJq39njV2yyCusaEQfgB5BVw== X-Google-Smtp-Source: AGHT+IEN7suTA3X3oYFPk2bJhlpdMvvw1+1HhusWa/vDBWoi6rkEdf4KsB43NG2YEg5GWr0ar/sf X-Received: by 2002:a17:906:1b15:b0:a44:742:d9c9 with SMTP id o21-20020a1709061b1500b00a440742d9c9mr2297436ejg.9.1709230945303; Thu, 29 Feb 2024 10:22:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709230945; cv=pass; d=google.com; s=arc-20160816; b=bz7Z2Dg4aB2DpXCgzW4aO32D3dMxcXSL1vwfe1YHgQr7Zj+bdxDYakT/buhbThVSrP sJIwisX/NN65u/8Z5BRWfFAiWLBeYmuQ6ri/iFQh2MGRPBFtSigDMSN2AmjHQGH8IydV p5BncFRZ8V6lMaTFxNQQCwrSo/MWKr+uvwFzzSnT/ekFXHtWKPcY2bU39/PqZHTN84Io oeIJBPuwdRhlQsGlAlManlgvk0qQw+XFDd9W/JsZjaIx9AEah4PxCr04jcfEwS/bQns3 otWLciVIzJI+LWbmskQ2KIFV+rp072VAzkLquyZN4akoTpai3Sf6oiqopKIZZHrBV/8q GSeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yXpj2r2UG5nknOxqJR2jUPNqVqUgtdngKnqrB/4KOeU=; fh=uUHeNlkL7lSLx2fehuLyDEcUYmocecG6mPiMgA+58DQ=; b=iaepGrSioknJfcp7IFlAYuh1Fhj6T5af+hN0iIVZ58KAedDN3gzVsVrQRk//QM3TkN UZbwq57FX9Tz7Twa5tTFbez3hoSfgqoRA1w7Q6iMCdgik9LHcvhzHPnzB2lZxPs0Hz5d UU1UjOgjDcgm+by57n3tWkbNO65LS7T2N+S4U8SQtCst/ZaJuIlr3DbyvFeatZIhJmSL hJa9AViQsQ1njFO5LSrtx4GZed4BpetuYyrJDImHmzSOWFVj6aZxaYazztJipnssgJ36 xgUC+ThO+ouwKlwPouRlSM1vR3ZX/m8B0Yx/qaJ8Nvj75mcT8nl8V7TsQ8/4bfH1E7zy nX6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oPn0oM3h; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-87273-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87273-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fy14-20020a170906b7ce00b00a44415c7235si763855ejb.399.2024.02.29.10.22.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 10:22:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87273-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=@chromium.org header.s=google header.b=oPn0oM3h; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-87273-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87273-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 003781F2673B for ; Thu, 29 Feb 2024 18:22:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 732F47E564; Thu, 29 Feb 2024 18:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="oPn0oM3h" Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AB38134412 for ; Thu, 29 Feb 2024 18:21:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709230911; cv=none; b=kkii8zPOaImOo4v+AlLaTsNLkccQAhYhQalzcYXeyp0rhe1fxAALoTKiIFBH7stZx0X8uirtQaTWYLomoeEgDVZEUGhMAtvloUdxMKhBKj6G9zhLjJLxa+UwcgngsEP9dZwrqMhh21Pq7jChtiS4oe0/+5USEP/HX2bMUQYmqUM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709230911; c=relaxed/simple; bh=YL/SyMq50QLHRa6w1uhHS9ErDLnXGftgcw+i2diIQZU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RQkE07Tih4ILZwGdB9lbMNoQlAUDb/OqBEp3wWwXzjOW+6Onkk2cHorp5IouWIzsgWQYOkU7S55/y1eJPKQKlILB7SNXdJj3JDhcdBuUp5TQn+vQAEheeb7kDZy/VbBynzfP+RY+xwXOr0LFAlolaW46JsiuC7tFAjAoAZP/BRo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=oPn0oM3h; arc=none smtp.client-ip=209.85.167.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3c1a1e1e539so1226891b6e.1 for ; Thu, 29 Feb 2024 10:21:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709230909; x=1709835709; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=yXpj2r2UG5nknOxqJR2jUPNqVqUgtdngKnqrB/4KOeU=; b=oPn0oM3hBHX9yRPVgDCgyYl2WY/6iqVSv2StMCNrJZbuvSi4gLCNH+QHd79HZUn63f fQEFhH1iYT2xdKneqnl65Mk1Ik0sgiwA8ImV1/8C/KrEgwgSDIvpweNIEwv1thPMcRZR gwhRwumWhubt/uiwxs9eMbRkeu+4CJ2jRsAqs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709230909; x=1709835709; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yXpj2r2UG5nknOxqJR2jUPNqVqUgtdngKnqrB/4KOeU=; b=kcVfed0xWwGGbz+CBYMDM9g90n/eWjehx/qZ/2s38aYEHIHAj2DGifSHE9PvonHjXe NoBD1cxi0rsfpCk+sQZ7VKm9DYqsjRlEDtgVFf87ioa+lfSpfyd2nD6EU+w5cOxVWOvM Czmv1Sq34SCEHpNfS1P4slRcsNpbvIOLyCdLYhI+fRChzBZ7nRXtyHf9lWGpg7F3dvo2 DGsQawHKHETbmErtmX9uySuwy8hq0bceSHPvCcOHUBXkqzO4zapmoQIfUOo32BS/0rUa Ma6OhbozUiHuDkDh12SZ/4vV8LOI9pL2ChMgzW4JOyAnFKO+6rIwsVlaxUfWZLZXn4EB x0Ng== X-Forwarded-Encrypted: i=1; AJvYcCXioboK1a4O6k2qEx3zE+qlHUABAZVVz6kovcuCXSxC/cHz32r9BtdRqvAt/U16sx9WU9zum5AoGkMk1IlERADBFzRvHQb0JUelp2EV X-Gm-Message-State: AOJu0YyqsZBkK5gXgP/gkcxqymiUZ2s/kf48eHSbJmN5GQIsqMHCxSTW 0nchYXkVf9LG3f4fRZXZ3VB9IMo2HJY+r32TUxgPN8uKywzqJe3u0zgE5EiHBw== X-Received: by 2002:a05:6808:3089:b0:3c1:cc65:5737 with SMTP id bl9-20020a056808308900b003c1cc655737mr1233505oib.16.1709230909255; Thu, 29 Feb 2024 10:21:49 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id j2-20020a056a00234200b006e56e5abc0bsm1556931pfj.51.2024.02.29.10.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 10:21:48 -0800 (PST) Date: Thu, 29 Feb 2024 10:21:48 -0800 From: Kees Cook To: =?iso-8859-1?Q?Micka=EBl_Sala=FCn?= Cc: Brendan Higgins , David Gow , Rae Moar , Shuah Khan , Alan Maguire , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Ingo Molnar , James Morris , Luis Chamberlain , "Madhavan T . Venkataraman" , Marco Pagani , Paolo Bonzini , Sean Christopherson , Stephen Boyd , Thara Gopinath , Thomas Gleixner , Vitaly Kuznetsov , Wanpeng Li , Zahra Tarkhani , kvm@vger.kernel.org, linux-hardening@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-um@lists.infradead.org, x86@kernel.org Subject: Re: [PATCH v1 2/8] kunit: Handle thread creation error Message-ID: <202402291021.43ED7D2@keescook> References: <20240229170409.365386-1-mic@digikod.net> <20240229170409.365386-3-mic@digikod.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240229170409.365386-3-mic@digikod.net> On Thu, Feb 29, 2024 at 06:04:03PM +0100, Micka?l Sala?n wrote: > Previously, if a thread creation failed (e.g. -ENOMEM), the function was > called (kunit_catch_run_case or kunit_catch_run_case_cleanup) without > marking the test as failed. Instead, fill try_result with the error > code returned by kthread_run(), which will mark the test as failed and > print "internal error occurred...". > > Cc: Brendan Higgins > Cc: David Gow > Cc: Rae Moar > Cc: Shuah Khan > Signed-off-by: Micka?l Sala?n Reviewed-by: Kees Cook -- Kees Cook