Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp823206oof; Tue, 25 Sep 2018 05:15:28 -0700 (PDT) X-Google-Smtp-Source: ACcGV61hxTTxlfmcmxktS0szMRbbumv6PDF+UmYfHaQV+ybNnkzEwaPzBwevQlj9p+wrsFK6HKmX X-Received: by 2002:a17:902:4d45:: with SMTP id o5-v6mr955022plh.78.1537877728756; Tue, 25 Sep 2018 05:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537877728; cv=none; d=google.com; s=arc-20160816; b=UEfN0Cpgm9sPVyD2YgcYBuEZdnnL0qFP4JBCuLeMlGMOCeXE6SmbEZDACwOaPBEXYZ DUMjJtkhGEUmH+CNjG5QkklZeiaB8eSIInXOf48pifNOIUO4jqEB6FWExQ4wgZDDHKuw 1RZP7dDJV7zF0MHiI/cazN/qThCGi13eMHvjpGMKj80ygFOrdkJC+Va6qghthzGvXtRy DswXVo8MrkVrwO867XzQs7B7V6x5miGkDYhG52P0lsfBuDXFeuXUT1g69T8+ETY48ZZX /FAhsYTTZPed5NPjVWTp1YWeYQSDPYPc3y9loaeKAG9bFPM0PcqhvRNNPanqfWhr9y8g civA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:openpgp:from:references:cc:to :dkim-signature; bh=Fvp/X7/8sFPQBhrGbFVXCEa7eR0xcoXR+Gm4A7KjO1A=; b=MwCEdUAJ0jjfHc7HYDZueFWnh2ZYflI56icYbMr8oc+WYaAR1SFhsWSVwelNV4sa/9 G7MUtjFUpNudlqib34MSHuVizrJpsOuzypit/Xiyxcy5HVh9qh38t2ELOv2ROJyHdC+2 kSNWbA88wtpb9sNJI8L8W9CKt+4P+mapw01x0Lap7H+W4NwJ4poNzm+rYXvWlonEDkOt mKUolou4Mm1/P0NCQNUeuA12W5QUJ7l05SbNbp0//iQbRqu1n5E93ThM7Brv6HsO4pYc NEpm8gPMS2UySruptNfi5rkPWS+2S+XyGb0dS1L8lhvpgMlv9qFDVVtG9lQKNzTna5Lu +WKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tu-dortmund.de header.s=unimail header.b="m/IagoWq"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d28-v6si2408267pgn.203.2018.09.25.05.15.12; Tue, 25 Sep 2018 05:15:28 -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=@tu-dortmund.de header.s=unimail header.b="m/IagoWq"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729148AbeIYSUt (ORCPT + 99 others); Tue, 25 Sep 2018 14:20:49 -0400 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:59459 "EHLO unimail.uni-dortmund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727531AbeIYSUt (ORCPT ); Tue, 25 Sep 2018 14:20:49 -0400 Received: from [129.217.43.49] (limnos.cs.uni-dortmund.de [129.217.43.49]) (authenticated bits=0) by unimail.uni-dortmund.de (8.16.0.29/8.16.0.29) with ESMTPSA id w8PCDU0T016443 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 25 Sep 2018 14:13:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tu-dortmund.de; s=unimail; t=1537877610; bh=TXL0pWzabghjnrE6CP7f3ySgaDu+7uqMBeBiUZvYz2o=; h=To:Cc:References:From:Subject:Date:In-Reply-To; b=m/IagoWqo4ThKKVIMCS5F9DHnXvQdRO3VY+F+qvH8Ug7aA7Z7OCUqzsonZxLU+/b+ m45jm4pzRxIZ9B5HdKVkRGRp8hNkShocWYw9thCgnDMD9ZCHNcmtwfztrU7o3QtGiU TRlgZCyiKn/V5AZ+JzVjjfxnGJZe2IT9ZS8Ot5q4= To: Arnd Bergmann Cc: linux-arch , Linux Kernel Mailing List References: <9516e4b3-f9f2-b150-f019-8b1ef465efb3@tu-dortmund.de> From: Alexander Lochmann Openpgp: preference=signencrypt Autocrypt: addr=alexander.lochmann@tu-dortmund.de; prefer-encrypt=mutual; keydata= xsFNBFQIyUEBEADZ+x+Ssg/46SiU66zm2lPGYAdqYfmXVv+sf/23+/KSj0FQHZKywzWjsmgR vWZZVlGJolwcW3MJ/g6ctZeOpfYiZVpzbZwNgKU0ETGjUmqmlq5/o5KnENKOimZzaKSaNn9p IC+EIeWXvu7pQjW0w1bK/RVVNw0p1Iz82W4Z+vKtD8CS+YJLAcZ6YoZMvQEg84O9odlV2Ryp oVj9EzHH40TWEdtgd4pQkaOks01PEr19sJXUjnP0VxLfs91AZjRnmGJKnI4HcrOKwquoQEeL DtHCxK0VNeoXCWkz33uBxSL5cicQ7D09hxjWthMilUpDZT94x0K452q4nybQ1TSLTYC8mlW+ xKUvJmqfHZbITJ10dTgjNvOe0kLbpXeQ1789lNmnA9bkQAK5Cefo55WbXmr1Mo3PV7y0XCib OaiijPlZo/Isc03EOK3lHPK8NuY8G+ftvphO4RyXCUWXw/o01cDnPaIEcTWkUbXvMhf/6ltP 1QWEfkguzGVjTw7Xssm9YuokC+P+49JKRyZzyCJZ022OxMlsX6c1BNZ4+cWUNmn6xr1xRNse SglpMLL1m3K1KuLf1hdAor6PBzFLiLa33lUhsWtg1ACFhpfZZOQRVas2McXTYUUpmCzOYI5F +km5q6cZStr9m7O3Y3DDGotiaJDpLtATwZ4MIM4ADbg/xl6Z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rTU5gIja5lt4kJ 73oYy2TmFzl8eKL7Fnb0J9NXVKN4Al3RFkOckCzkERkwnK6tYcwhHf/74svaE7KTa3GSX9aW 6NxCpAsFDwJbauda2prWMzruCg== Subject: Re: [x86] BUG()/BUG_ON() macros cannot be disabled Message-ID: <649d3c5c-3d96-0ed3-cd4d-57641f0ee614@tu-dortmund.de> Date: Tue, 25 Sep 2018 14:13:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="plRjT5M0KG0HWIQBCIifdXzlmUphX7rxs" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --plRjT5M0KG0HWIQBCIifdXzlmUphX7rxs Content-Type: multipart/mixed; boundary="srBuUoupMQxGmtk16jvc3cOaIRwQCeh4h"; protected-headers="v1" From: Alexander Lochmann To: Arnd Bergmann Cc: linux-arch , Linux Kernel Mailing List Message-ID: <649d3c5c-3d96-0ed3-cd4d-57641f0ee614@tu-dortmund.de> Subject: Re: [x86] BUG()/BUG_ON() macros cannot be disabled References: <9516e4b3-f9f2-b150-f019-8b1ef465efb3@tu-dortmund.de> In-Reply-To: --srBuUoupMQxGmtk16jvc3cOaIRwQCeh4h Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Am 25.09.2018 um 14:06 schrieb Arnd Bergmann: > On Tue, Sep 25, 2018 at 1:35 PM Alexander Lochmann > wrote: >> >> Hi Arnd, >> >> I recently tried to disable the BUG macros on x86-32. I disabled the >> config item in 'General Setup -> Configure standard kernel features >> (expert users) -> BUG() support'. >> However, BUG/BUG_ON is still defined. In the !CONFIG_BUG branch in >> include/asm-generic/bug.h (line 181) the code checks for the existence= >> of architecture-specific variants of those macros. >> Since x86 defines its own version of BUG(), line 182 is *not* used. >> In the following, the x86 variant of BUG() is then used to define the >> BUG_ON() macro. >> >> I propose a patch that really disables both macros if the developer >> wants it. >> It undefines the respective x86 variants, and defines both macros as >> 'empty' macros. >=20 > Maybe we should update the documentation instead. Note that the > generic version is using 'while (1)' rather than 'while (0)', so this i= s > not an empty macro but rather one that does more than the > arch-specific one-instruction version does. >=20 > We don't really want an empty macro any more, this was used in > the past, but causes compile-time warnings and undefined behavior > for no good reason I see. So the documentation of the CONFIG_BUG option is wrong? It currently states that 'Disabling this option eliminates support for BUG and WARN'. Is the current implemention (an endless loop) desired behavior? - Alex >=20 > Arnd >=20 --=20 Technische Universit=C3=A4t Dortmund Alexander Lochmann PGP key: 0xBC3EF6FD Otto-Hahn-Str. 16 phone: +49.231.7556141 D-44227 Dortmund fax: +49.231.7556116 http://ess.cs.tu-dortmund.de/Staff/al --srBuUoupMQxGmtk16jvc3cOaIRwQCeh4h-- --plRjT5M0KG0HWIQBCIifdXzlmUphX7rxs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEElhZsUHzVP0dbkjCRWT7tBbw+9v0FAluqJmoACgkQWT7tBbw+ 9v2uLQ//anJDuopN0CqNXjQyuQiVulhUqsDL0zdhMcmJ95dXNkqPiT8gj+tGGbXN FEqTogl2ixf93cB/f8kprk1E/mB/OBhKr2BU130qVRPS7Vm/JJ+UBTiVFkg2etqT Ua1lyqBRHXOo93+/t0DWxH1/P4DoDlkblz8/oPO3GKaE9OlXdrU07gCmjlcI4sNN zFHNMkzNBOHWLDa2HaPRg7rBG+zcELBPDp7Z0Uap8cIKcrARC3QdKGQ5+pnGz64C 4FkHITb2cH2P3O7oo1FgB5iDAv6S/ca6WiDRAZNpLTbzxA9sHtHSocJll4w2T8bN kMqLUbsg8k5Cf7zh0gVveS2xT7GLW6UmkvCctYS2DjSIiCRAg76OZAwVLpmrDD0E IX+l4WYs/PHg29aH61LpmNeRwDRxWFehPKrUAjNIUCv/MuFF01rELQTJ+GAQtJzP WHNGnEC0nN9VokCNjp3LxiGpUvkRRr8nyko/WgPdujAt8n8R5QjmBPTL+nG7XvAV UEFA/khdyW1piLmgb8LM/Q51c2CGLec9GfRzqx8L9Uv2tdX80bR2vtJf7ebA6UzI 0DTc/2wSen5uVmo5BtRm96QOvlsV+wbF5ziouL0S7GjIAI/4/pEsl1vtscdc2+Rw a+Ji6s7T6HfMoE0bGb3L0NWgGsdfv+VKoeZyZEYCGX2syGjlIvI= =KN5L -----END PGP SIGNATURE----- --plRjT5M0KG0HWIQBCIifdXzlmUphX7rxs--