From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62D3BC3A5A4 for ; Mon, 26 Aug 2019 17:31:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E117206E0 for ; Mon, 26 Aug 2019 17:31:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="W1ThBxZ2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732901AbfHZRbX (ORCPT ); Mon, 26 Aug 2019 13:31:23 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41442 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727211AbfHZRbW (ORCPT ); Mon, 26 Aug 2019 13:31:22 -0400 Received: by mail-pg1-f196.google.com with SMTP id x15so11018996pgg.8 for ; Mon, 26 Aug 2019 10:31:21 -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=Q3xiFZ2HkA5ScIJ98h57XT9QNlYTEuEKJ22ZvSjaM40=; b=W1ThBxZ2ULnw8wV8rQg1L3El9s0wK00VOmaEsGsImpIPXIn1KF9TIXouDdGAS2494U Ln5MsCmf2BCNQBcec2cm0FE4g1R00CGWTiOtLL0C0guajRLNy+eQMRUsPPsYGktFx+4D Yi2HGK7OSwFlwQm2QgQgkWFuW/YkbY7FAEScriQ1rUoziDQLATISbN/yFTOEHO/56cgr AjQoOboGivycl+rixm0sW0HJ4JCqplkDYsx2rs+D99X/qO9K0Ck9PVGglRw4XGNyyxAx zhzYaGIUCbm0qV19s7h/T3wdg10yB5I2p8Dh+6VXBUOQS/AzUhZovRKOHBAV5k9UjPAk aydA== 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=Q3xiFZ2HkA5ScIJ98h57XT9QNlYTEuEKJ22ZvSjaM40=; b=QWgrXT+JGwD+JNVbVNqwNZIIWHLy8EqFinakURUG7uzXGMFF1HzAimYZywjjSdgC6T FjovUqTv9zvlRgwlpsqhaT0NYORrC08fHT1Swfa+CTYJdPBGx0y7rneH1HJhk4BTpxmg yKEu7+o4AtkWMn/c12Q1drSdyFObiEP1dcECX8xEpq/Ita98tk1OeHp6xUsGhQ9hsZ2I TjqZhl2/OmfRuVmdIpJWVQ36jS2p1EdLOVrpiDJtNxBXJDzJZYnIY9NXOxR9SeCtgBra TKVU9s+Syei1hCHX2bNvbSP31OfJqf2Zr5U6pJBp44ySmvkOGUHWb6V7YPX2Ar4bHb1B FPbg== X-Gm-Message-State: APjAAAUZ9L0IvrEpjYjNfLv1RtiBoN1KonFPBhjzki1miH22w+le/2I2 NY/N/MRA46kxDJ2ru9jORxYEIly5Rk0H9jo7eByHPQ== X-Google-Smtp-Source: APXvYqwVHgxJShCK/u78N3hHrJbEGajACMI2eyaTo9bILVYml2dMPRUPYBd4Hp9yNcVXJCNqVnOQd2UZpp0sc0R6gpk= X-Received: by 2002:a63:60a:: with SMTP id 10mr17262703pgg.381.1566840680814; Mon, 26 Aug 2019 10:31:20 -0700 (PDT) MIME-Version: 1.0 References: <20190729211014.39333-1-ndesaulniers@google.com> <20190824141213.svzmdr3pxdaqssuj@pburton-laptop> In-Reply-To: <20190824141213.svzmdr3pxdaqssuj@pburton-laptop> From: Nick Desaulniers Date: Mon, 26 Aug 2019 10:31:09 -0700 Message-ID: Subject: Re: [PATCH] mips: avoid explicit UB in assignment of mips_io_port_base To: Paul Burton Cc: Ralf Baechle , James Hogan , Nathan Chancellor , Eli Friedman , Hassan Naveed , Stephen Kitt , Serge Semin , Mike Rapoport , Andrew Morton , Michal Hocko , "linux-mips@vger.kernel.org" , LKML , clang-built-linux , "regehr@cs.utah.edu" , Philip Reames , Alexander Potapenko , Alistair Delva , "Maciej W. Rozycki" 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 Sat, Aug 24, 2019 at 7:12 AM Paul Burton wrote: > > Hi Nick, > > On Fri, Aug 23, 2019 at 10:16:04AM -0700, Nick Desaulniers wrote: > > On Tue, Aug 20, 2019 at 10:15 AM Nick Desaulniers > > wrote: > > > Hi Paul, > > > Bumping this thread; we'd really like to be able to boot test another > > > ISA in our CI. This lone patch is affecting our ability to boot. Can > > > you please pick it up? > > > https://lore.kernel.org/lkml/20190729211014.39333-1-ndesaulniers@google.com/ > > > > Hi Paul, > > Following up with this link that explains the undefined behavior issue more: > > https://wiki.sei.cmu.edu/confluence/display/c/EXP05-C.+Do+not+cast+away+a+const+qualification > > Please reconsider accepting this patch. > > Sorry, it's been a crazy few months & I'm currently away awaiting my > father's funeral so I'm working through a backlog & catching up on > things. That's an extremely tough hand to be dealt. Got it myself a week before I turned 20. Technically, (spoiler) everyone is eventually dealt it; not that that or really anything else can ever truly provide solace despite the common refrain "time heals all wounds" (Narrator: it doesn't). Depending on where you are in life it can really really destabilize things. I wrote this blog post (https://nickdesaulniers.github.io/blog/2013/04/29/the-persistence-of-memory/) that I'm not too proud of at a time I now realize that I was still kind of a state of shock (even years later). I also found it very difficult to accept advice from others who didn't share the experience of losing a parent. No one would fault you for asking your co-maintainers to handle more maintainer responsibilities for a while. I hope you can find a friend to commiserate with over beers. I owe you one. > > It will be a shame to lose the optimization opportunities const offers > us, but it is an ugly hack & so I'm OK with applying this. It's likely > to affect older machines more than newer ones (which tend to use less or > no I/O port access) so I'm not too worried about the impact, but if we > find it matters we can always try the fixmap approach I suggested > previously. > > Thanks, > Paul -- Thanks, ~Nick Desaulniers