Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2151934yba; Mon, 6 May 2019 00:07:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFFdNffO4G1TR9gi4aBkxBKiV+Oa5EIy/RxD6D4K7FqrN/40IeMIHmzXimDzrIGb0jsljX X-Received: by 2002:aa7:92d1:: with SMTP id k17mr31704156pfa.91.1557126421390; Mon, 06 May 2019 00:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557126421; cv=none; d=google.com; s=arc-20160816; b=sDjjUNfM6PAL9W8XsVGFCfohuNqGIc0kxrwLQr5ckYJ6YiM69y1XQE3OLDOUr7r6hf yYoGJ/OgvwOvtiOWWSMvL7fVI0j3DccJ2ewpC6HwC5/Oc2yHnRSFs8WcVhiQTltQ2xpS OpuGdZqv5nWuoypgvVFDEESLWbQiRUFFF6qFM1lGm/a3Lm8rzJ9MtRbUNEhaD23PjmOd I2jE6y5ma7QZ7bRc7bx7270b0MZbJBhyO2/66y83kkeRd0tGwijrTt5Yz1MI6L6swlqt cFSvY2icL55z15VL9CwxpHjq2C5OLccFqpxqtNdDrqwtcIPxCROHt7y0K4nxneiFxVU4 mTHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5V6LFql9im1SPXc8YxW9Jo3rXT30savTgK/RedsezR8=; b=e9HuIbmTgkSox+7s9MLR1xw/GyL585bMkEBm+B1WfnTbFC6gz1ru0g91yDI5x27aGu Ges/cvz5FYH6i8FzG0/YgVe0Boi/GISBRFX507TdBwECK5o+GW9kD4F5es0qhf4Phrcm gfDS1ro0FJl7QTSdqi32m9FL5i/ydR43uda61hvyzOGObq8uCV6lmhTUM4iLd1UE39nO +w3pUhm2d0W0ySycVuDjoBasbhQTxDGXWKqVZ5FwFKVssWu0iWf21unLlJlWRVNW/IJI UvARG8XwitTHx8qIxUsuI/Rx8D85kM0FVptGRqXNSca0LNEDCpbe1WhQ4svVWTsMxms5 4thQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=mhLOADL9; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 126si13650834pgb.424.2019.05.06.00.06.46; Mon, 06 May 2019 00:07:01 -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=fail header.i=@gmail.com header.s=20161025 header.b=mhLOADL9; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726399AbfEFHFt (ORCPT + 99 others); Mon, 6 May 2019 03:05:49 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:56066 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbfEFHFt (ORCPT ); Mon, 6 May 2019 03:05:49 -0400 Received: by mail-wm1-f67.google.com with SMTP id y2so14019746wmi.5 for ; Mon, 06 May 2019 00:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5V6LFql9im1SPXc8YxW9Jo3rXT30savTgK/RedsezR8=; b=mhLOADL9bqOSSqke/X5TKBE3LDOfe2nbKYMCQidDFMKBOdyksQDafV2jYPTRt2XxBe AdhtK98Z9Qxa7k22gSsr4uMp++J7DJbPsAhdgfb4d5rFBZ8JOqqMs1k4kRy78OluZ8NI pqQYYSOwsVMYq21D3e54iLqFIjWOrUzSsrICzv8PwvE7myCD7zrEUJp1hdO/BX13E0Nn wk/uUxhcjd9TslYzN8t1cQtvFP+7Et0dSRmpFlNiShDBF0XQ6b1XvX5nTSblzJmmF7rO c8AhnCXdKulvKkejpAhstMRJse9EKwnjepdomaYnKBuF4DTKvVcp9RCoyhnLMlTUZvdm QhgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=5V6LFql9im1SPXc8YxW9Jo3rXT30savTgK/RedsezR8=; b=EkxpgN7RePV45939cj4xv+DJ4xsgXmezEPWdmobgCICxRs6ZpIcrH9JKOE/5bnue4J ZfwbIse9EPrqYlhsHUcFCeGHD7Oad3ETTR6pimMLKi3AqWKPl/8d/J16iBHwITz0w2No QEwJj+lJmfDWUALisIDDRpta9MZ3GlC5kXCO4J4CjcjYG3VaefTl6a+kwbt6l/FIywj0 YKNEQwLfUyDEluBHaYbeYzv+vxLvnmYScYXhaH6hu6izLjrGnY39TpvPdqWSd+6Rz5cN fVR4J9j5uPfsVMwZtU3BC3eUKxz7xXsS761x1V8dVCjbi/7UWdbaT9FH9n27k+VxfpmH 4czQ== X-Gm-Message-State: APjAAAXDKw19f5Zmb5108calFySXD3k3d0U9u1GYVVnJb+7D8823HYyz rN/ydVNBOVPuQT3UlYgj3p8= X-Received: by 2002:a7b:ce10:: with SMTP id m16mr9133691wmc.36.1557126347523; Mon, 06 May 2019 00:05:47 -0700 (PDT) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id d3sm18551842wmf.46.2019.05.06.00.05.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 May 2019 00:05:46 -0700 (PDT) Date: Mon, 6 May 2019 09:05:44 +0200 From: Ingo Molnar To: Rasmus Villemoes Cc: Andrew Morton , Jason Baron , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, x86@kernel.org, Michael Ellerman , Will Deacon , Ingo Molnar , Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Linus Torvalds , Andy Lutomirski Subject: Re: [PATCH 00/10] implement DYNAMIC_DEBUG_RELATIVE_POINTERS Message-ID: <20190506070544.GA66463@gmail.com> References: <20190409212517.7321-1-linux@rasmusvillemoes.dk> <1afb0702-3cc5-ba4f-2bdd-604d9da2b846@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1afb0702-3cc5-ba4f-2bdd-604d9da2b846@rasmusvillemoes.dk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Rasmus Villemoes wrote: > On 09/04/2019 23.25, Rasmus Villemoes wrote: > > > While refreshing these patches, which were orignally just targeted at > > x86-64, it occured to me that despite the implementation relying on > > inline asm, there's nothing x86 specific about it, and indeed it seems > > to work out-of-the-box for ppc64 and arm64 as well, but those have > > only been compile-tested. > > So, apart from the Clang build failures for non-x86, I now also got a > report that gcc 4.8 miscompiles this stuff in some cases [1], even for > x86 - gcc 4.9 does not seem to have the problem. So, given that the 5.2 > merge window just opened, I suppose this is the point where I should > pull the plug on this experiment :( > > Rasmus > > [1] Specifically, the problem manifested in net/ipv4/tcp_input.c: Both > uses of the static inline inet_csk_clear_xmit_timer() pass a > compile-time constant 'what', so the ifs get folded away and both uses > are completely inlined. Yet, gcc still decides to emit a copy of the > final 'else' branch of inet_csk_clear_xmit_timer() as its own > inet_csk_reset_xmit_timer.part.55 function, which is of course unused. > And despite the asm() that defines the ddebug descriptor being an "asm > volatile", gcc thinks it's fine to elide that (the code path is > unreachable, after all....), so the entire asm for that function is > > .section .text.unlikely > .type inet_csk_reset_xmit_timer.part.55, @function > inet_csk_reset_xmit_timer.part.55: > movq $.LC1, %rsi #, > movq $__UNIQUE_ID_ddebug160, %rdi #, > xorl %eax, %eax # > jmp __dynamic_pr_debug # > .size inet_csk_reset_xmit_timer.part.55, > .-inet_csk_reset_xmit_timer.part.55 > > which of course fails to link since the symbol __UNIQUE_ID_ddebug160 is > nowhere defined. It's sad to see such nice data footprint savings go the way of the dodo just because GCC 4.8 is buggy. The current compatibility cut-off is GCC 4.6: GNU C 4.6 gcc --version Do we know where the GCC bug was fixed, was it in GCC 4.9? According to the GCC release dates: https://www.gnu.org/software/gcc/releases.html 4.8.0 was released in early-2013, while 4.9.0 was released in early-2014. So the tooling compatibility window for latest upstream would narrow from ~6 years to ~5 years. Thanks, Ingo