Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1514063rdb; Mon, 8 Jan 2024 01:18:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwF27IfTjXWogZsEqxEC+um9JBgphrrI1dMq/27t9Dqi3zUzUhTmVJpWC38c3jw0GNa82L X-Received: by 2002:a17:90a:38e4:b0:28c:b1bd:3c42 with SMTP id x91-20020a17090a38e400b0028cb1bd3c42mr824772pjb.55.1704705529729; Mon, 08 Jan 2024 01:18:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704705529; cv=none; d=google.com; s=arc-20160816; b=LRV8sSVLlvVSSL6Gu51m46fhhV/JfJhp+ogYSx45jRNW51RhTTgmDQZx91sJJ/AX7B A8+Sk72XMPxXR5ZHgS706tYCureAwGQjg/E31eIXMuU2n/crQvW18KNX3rbR9Z/uHECS m7mwJ1k3wanG07h4DxmH4y7WK8yhYjdm2NcMVQgpqG7u4NsCnFv0jDzg7IXy/VSfps1d nXw7GQSV8Y8Nl9zlW090CsSsO3q2/xFJqNIBFbL6dFNYznIB/DLUcUcGo+0kHIs6DP7r PmhhmalYEIuer0xbFgk5rzU+RDmuE8Bl0q75EW8s0QSwCUrPrxB5pdoiGnNPdcIp0Wxt meRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=y2yeQMptxxMuTcnH9ibzCQxO7swjSIFRDv8RJtb5wdE=; fh=jfDMmd1sFKlSCPrFmObI7PfV51r4qLNsDwUod/BlZP4=; b=i9fk9jwPB7VHVlY8kCvmeNq9KNj9EC8PVOjRpyifDq2Ypn6P0EQQCfjNfwe57KGHwx eNDru3VRm4qy+ApAz4tavE2/u82ddD9E3xf2+VFArsjznN1wsxfHr+bY8xg+5IpNMtlJ XUttM1KBP0o+Wde4+HC3+VG/ViK67QFalXi1a3VuyxqH7WQw3eGzbkbT9XDenHC089iw ZQHSMzayBFUYKjEZx7bVvhyhHWodGBx/LsOcwQ2R38RcxoMvRgVyxTxhwOPj68GJh8sE 0+lbTafeW5KSlr0plsTHIpCQ/sUqmXSUu0fIB985ZAVm64jJWPKQ0auvYJqlJi2ORLId 68rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DZHEv9Zj; spf=pass (google.com: domain of linux-kernel+bounces-19257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y10-20020a17090aa40a00b0028ce93b3676si5365594pjp.32.2024.01.08.01.18.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 01:18:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DZHEv9Zj; spf=pass (google.com: domain of linux-kernel+bounces-19257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19257-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 664ADB214A7 for ; Mon, 8 Jan 2024 09:15:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3E8111716; Mon, 8 Jan 2024 09:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DZHEv9Zj" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 0E184111BD for ; Mon, 8 Jan 2024 09:15:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a271a28aeb4so145869366b.2 for ; Mon, 08 Jan 2024 01:15:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704705337; x=1705310137; darn=vger.kernel.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=y2yeQMptxxMuTcnH9ibzCQxO7swjSIFRDv8RJtb5wdE=; b=DZHEv9ZjK/OLkkuQRvxe+dQYI3r2+jBUMhAUr7pLXG6wRVF4qUinMLYx/+QBKe6zV0 xcg65jSlMxdsjftAJwRdRLUyvKiRucN0FKsIxtGlVvdZ0z5Eaa6juaQw+/13CshLYufe kETsA1rRAoduvEVuO5HR//JHRVLO9sNjGSv0yJvLF/pwUiLo+dZPCiQbL8KHnvMzmmXn 6zhQQ+HvwTYzvh7ZFNi44VSjd7AVlFhw3MdAjQ1OykCDB158mMPp6upSKItYf6Cm89Ph wPaz/b3eiqT+zV6XquCIg1EBpRwYP7tnlkDe9J9R0z1UTPy8ZqfWgBtkuPb5UywzErnU /iqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704705337; x=1705310137; 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=y2yeQMptxxMuTcnH9ibzCQxO7swjSIFRDv8RJtb5wdE=; b=TPvDpGI0dW7zRyqMf05dyNWgIBncPZ+AyFbmehXqirUm7OU3rpjRUPfy0jLQaNz9fF R3M8vZyZ5ji6yY78/otmMnSemy+UKx4TDrme/QBuYRRXkcSYViX4xR5wuzcoVoCN2Kw6 qpVUrR0B+qR2ad89t/sD+5N8l//oHvT5lcsy77QCi388SM8EWBnGSAvxKyenRJAV4yU5 hILp+LrXY1N6+QqGBmpjmp7fW0H5flUJdaBcW5LpQLq0AmkRfxT/LiBpXT8Ym7piZ+OI f/YDoiC0FGig0rd17I2xu+V/u9uS1NLpPCYYO/ZdGGfqiRMUJJ/4JoLGbZPW6Ir2er0o Aczw== X-Gm-Message-State: AOJu0YwQgcBFKESNoeDJCrbjRGaAbFo02Bx92NZasIuyNB1uMckaZGMh E5479WK0G+FF7CuqZWNP1bk= X-Received: by 2002:a17:906:2802:b0:a28:c148:e457 with SMTP id r2-20020a170906280200b00a28c148e457mr1257622ejc.47.1704705337303; Mon, 08 Jan 2024 01:15:37 -0800 (PST) Received: from gmail.com (1F2EF3FE.nat.pool.telekom.hu. [31.46.243.254]) by smtp.gmail.com with ESMTPSA id r3-20020a170906704300b00a27e4d34455sm3718542ejj.183.2024.01.08.01.15.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 01:15:36 -0800 (PST) Sender: Ingo Molnar Date: Mon, 8 Jan 2024 10:15:34 +0100 From: Ingo Molnar To: Dimitri John Ledkov Cc: jpoimboe@kernel.org, peterz@infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] objtool: Make objtool check actually fatal upon fatal errors Message-ID: References: <20231213134303.2302285-1-dimitri.ledkov@canonical.com> <20231213134303.2302285-2-dimitri.ledkov@canonical.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20231213134303.2302285-2-dimitri.ledkov@canonical.com> * Dimitri John Ledkov wrote: > Currently function calls within check() are sensitive to fatal errors > (negative return codes) and abort execution prematurely. However, in > all such cases the check() function still returns 0, and thus > resulting in a successful kernel build. > > The only correct code paths were the ones that escpae the control flow > with `return ret`. > > Make the check() function return `ret` status code, and make all > negative return codes goto that instruction. This makes fatal errors > (not warnings) from various function calls actually fail the > build. E.g. if create_retpoline_sites_sections() fails to create elf > section pair retpoline_sites the tool now exits with an error code. > > Signed-off-by: Dimitri John Ledkov So, is this not expected to be the case anymore: > out: > - /* > - * For now, don't fail the kernel build on fatal warnings. These > - * errors are still fairly common due to the growing matrix of > - * supported toolchains and their recent pace of change. > - */ > - return 0; ? How about making it only fatal if CONFIG_WERROR=y, ie. an analogue to our treatment of compiler warnings? Thanks, Ingo