Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp62349ybl; Tue, 27 Aug 2019 15:52:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjiKd5o/cQQ5hqbA2y2rVRTqDSzW8DSTQU3YMBa7D2S2vgV+alI+2hnuu27uXrxhkF5zY1 X-Received: by 2002:a63:f941:: with SMTP id q1mr755206pgk.350.1566946352400; Tue, 27 Aug 2019 15:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566946352; cv=none; d=google.com; s=arc-20160816; b=vkjlUK/AVjgPkP2eqrO46zXnR6A+Z7nbmjYH49wwc1KhAi8m9vQktWlnh7vehW8x2l TJVk3gLMb91F+jObnxNcheQm0AktsQPu4qnE5tmIIokQNOuehI4YouRihVy7qr9CjanP FVcv9H9hOtC67IVx9R4IG0J4N2FO4UX4G93vs/17Tdm0aehVIi7f8oUgOevMBFAg3fp8 +qZF8LaWIeyCsJ3vF8lHwzVS278nyhpTj9aAru24s3IubENSJO6fugBlQXZ7XpM9CAcW qSISXhCrc+k1HVnDx6xRq7sFyoOKLB7SqTJAsAXJwaBgRyqgopEilioxJp0SWQcJHqAq HqSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zOEu9xUSDVrsGM6W3Flcox0RxExlMvx/ACbW1pnrPBg=; b=03JEqon0ytYhhYSb/NTDiDwwTZbC8lLAskn4GqK1sTNKOJZ+IVB9jxiqyZZqZwlQOi wVjmNl0oMnlVCzHskHph8bpJobJ3KyBiwo3v8Nf08AMxTD2AQlvxyH71X+bAS6Gwt9B+ 0YznpZkFIPfa+roL+nsL8reCHHECjHoKWES9uCUPZri8wF5I4UNfin5L4ipiWflLEiRT vn/LZOOV0Gq7Ra2cZ83Z7+70X92xvv53v6rPjA8ICvohCqSu8rbgF95icik8Z8qFtzqz jt1cGlM5Mu3VgxdzAc7MYZxXi5ieKMfQGzNBniekcOdkST0YXFClojvebCeUXIdYySPl UV9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Usm12moH; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si359024plo.166.2019.08.27.15.52.17; Tue, 27 Aug 2019 15:52:32 -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=@google.com header.s=20161025 header.b=Usm12moH; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726342AbfH0Wu5 (ORCPT + 99 others); Tue, 27 Aug 2019 18:50:57 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36349 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbfH0Wu5 (ORCPT ); Tue, 27 Aug 2019 18:50:57 -0400 Received: by mail-pf1-f194.google.com with SMTP id w2so346164pfi.3 for ; Tue, 27 Aug 2019 15:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zOEu9xUSDVrsGM6W3Flcox0RxExlMvx/ACbW1pnrPBg=; b=Usm12moHUHac03LVvijuSRXEZBvccvhXSPy1aGZptmGTyOJlv9HwXwsEHdqFXO4Fjy oJjqfDRkaK7VUPH4iq5Z8rILoMIkn6m9JCNM6H4QIMSxqk9jAD+Oevb9x69xcP84m5cE Lg2/MGISpiT3slt9ksiZN8SPUlU+UcL8GidncWuemmZCmHTY6Xz7LzvTKno7sCq/IY/3 opXEgstVYldu6h1foTnU9ujFEcBzuq4MO/iJqviUjNpKDbi0MhWC9y97nLbn5AeFPrEA d8+jX/Jck3fmEVavrg9+D004WeqLpMx35UEME4kKaai+EKtaosFbxvZ/UVCMo6Y5HmxF RuNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zOEu9xUSDVrsGM6W3Flcox0RxExlMvx/ACbW1pnrPBg=; b=GKTGVuInYPfy0vlNh0w5QjLfjeKJpz3ar/xWDeU50zYsG/Nz5FAUHWgLU5ahB5Ln27 CBzjEAaFtOtQNihgJ5rEbOWLeXlnYkk87ak8wRKKi0xdgqfVId8htf8yTFFhZs3fY468 BoVipdgnEw2eLSLFcIBBesCBUH6NI5QO+tvykYY0+OcaFNuOnh8NeGsx70Myaf2KyEdi ltNPXUL3gC5v9RwO+GUsnM5cJaN+A2pk6XHr14xcj6EMZS2ueYOoS0QtX3ZUfIs+DdWL cKtxMbm1YPfSduXAViEY0+ng1HpAjOA0OAi9oJ/agvNV6AQK0JjzwbjhIKcAzZBZ7/11 fQiw== X-Gm-Message-State: APjAAAXyzVpyDHURYTNykP27iMXffVhZTDrLbrH8kT6SiNDjnvBjcgTf wEyZP1TYjpdX1IwOb7K80pow+Qnbtxob8MN0XRV32g== X-Received: by 2002:aa7:984a:: with SMTP id n10mr1036503pfq.3.1566946256177; Tue, 27 Aug 2019 15:50:56 -0700 (PDT) MIME-Version: 1.0 References: <20190711133915.GA25807@ziepe.ca> <20190711171808.GF25807@ziepe.ca> <20190711173030.GA844@archlinux-threadripper> <20190823142427.GD12968@ziepe.ca> <20190826153800.GA4752@archlinux-threadripper> <20190826154228.GE27349@ziepe.ca> <20190826233829.GA36284@archlinux-threadripper> <20190827150830.brsvsoopxut2od66@treble> <20190827170018.GA4725@mtr-leonro.mtl.com> <20190827192344.tcrzolbshwdsosl2@treble> In-Reply-To: From: Nick Desaulniers Date: Tue, 27 Aug 2019 15:50:44 -0700 Message-ID: Subject: Re: [PATCH] rdma/siw: Use proper enumerated type in map_cqe_status To: Josh Poimboeuf Cc: Leon Romanovsky , Nathan Chancellor , Jason Gunthorpe , Bernard Metzler , Doug Ledford , linux-rdma@vger.kernel.org, LKML , clang-built-linux , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 2:27 PM Nick Desaulniers wrote: > > On Tue, Aug 27, 2019 at 12:23 PM Josh Poimboeuf wrote: > > > > On Tue, Aug 27, 2019 at 08:00:18PM +0300, Leon Romanovsky wrote: > > > On Tue, Aug 27, 2019 at 10:08:30AM -0500, Josh Poimboeuf wrote: > > > > On Mon, Aug 26, 2019 at 04:38:29PM -0700, Nathan Chancellor wrote: > > > > > Looks like that comes from tune_qsfp, which gets inlined into > > > > > tune_serdes but I am far from an objtool expert so I am not > > > > > really sure what kind of issues I am looking for. Adding Josh > > > > > and Peter for a little more visibility. > > > > > > > > > > Here is the original .o file as well: > > > > > > > > > > https://github.com/nathanchance/creduce-files/raw/4e252c0ca19742c90be1445e6c722a43ae561144/rdma-objtool/platform.o.orig > > > > > > > > 574: 0f 87 00 0c 00 00 ja 117a > > > > > > > > It's jumping to la-la-land past the end of the function. > > > > > > How is it possible? > > > > Looks like a compiler bug. > > Nathan, > Thanks for the reduced test case. I modified it slightly: > https://godbolt.org/z/15xejg > > You can see that the label LBB0_5 seemingly points off into space. > Let me play with this one more a bit, then I will file a bug and > report back. Something funny going on in one of the earliest optimizations. Seems related to an analysis that's deducing that the case statement is exhaustive (so the GNU C case range is unrelated), but it's keeping the default case and its comparison around. The analysis is correct; the value should never be > 0xF so there shouldn't be any runtime bugs, but this would avoid an unnecessary comparison for exhaustive switch statements and save a few bytes of object code in such cases. Filed: https://bugs.llvm.org/show_bug.cgi?id=43129 -- Thanks, ~Nick Desaulniers