Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp208105pxb; Tue, 7 Sep 2021 22:26:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxshuEGZJhegd57BEiKHYoki3m6NRm+Bfh3Wa6A/T0BQ57/AU/+m41EOISKlDYf6YpOtDJ X-Received: by 2002:a92:c848:: with SMTP id b8mr1485962ilq.54.1631078799084; Tue, 07 Sep 2021 22:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631078799; cv=none; d=google.com; s=arc-20160816; b=ikeaFAea6c4WS74AtI8/l8SBA/a3kJMxPOpPSOcJHXQfII7wWr32XvIs/ebRbD8x3L JHckiJJ/GgDr+45srNl2VqP/rDK9+73blRIG6juuuW2YmFRLpG5CYysvWupbz9vTRi2n /U7dysDS1ITQPA1v0KWQvB2xRgwZiHbZCSoEzIE74KcDN1DvHh6rTQUCIt8ubfV8V/jh zQZQkmGs/MDHVdlTXaFmQacYdi0h/aaEwTBcVPwW0LAOrGZW9qJnP1ad4QtlzXlx4PAN 0QpAeGq8FJ/NW6J1cmiLkEIiJWJ7eJjopKnhQ7sKDk7QrSkedinZMy+GZb80P4krhHzC 6PtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BGSSG1KppTdhFpfh0S8ytn/P5QNiyuOhgVXWuDULhJw=; b=F34H/ryc3ie47B58VKU4xCNH6BZLLqTM3+Oi4o732NVMxeEGRAlOUT8/UyXfZ5ivlp /R9kb7+68vBHLlL8o+qCCZeVQ1C7JLxe3Tl10rQtDWwiSIbeEz1M1yiEEQCZMiK5++OE 1JVQXl5u8NeWFTEqXK1C6byqMQNClWnmB1Ac6kfpfHARNy/hSjsCxQI6Q9xpAV5S9L85 w6ERGQj+4TX7NW/6os9ecY+7znVluMz1IhG3WobnfLqsK1fZBCVXpv4vZd7P8FkMVbyf R89GM6C+cbXK3DreSmpxbXWOaPt2UvQDOLwmeTIEjpGWQxSnPdIAFUUgeA+vtLNHPahr 5Eyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CStPE9Hc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 132si1063048jay.7.2021.09.07.22.26.21; Tue, 07 Sep 2021 22:26:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=CStPE9Hc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232041AbhIHE4j (ORCPT + 99 others); Wed, 8 Sep 2021 00:56:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232011AbhIHE4f (ORCPT ); Wed, 8 Sep 2021 00:56:35 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5C48C061757 for ; Tue, 7 Sep 2021 21:55:27 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id d16so1355047ljq.4 for ; Tue, 07 Sep 2021 21:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BGSSG1KppTdhFpfh0S8ytn/P5QNiyuOhgVXWuDULhJw=; b=CStPE9Hcsdp2M1zY8oDqlEXMK/e5mZky8VCHUR91VZTviVdYGsdmvADXEb6nRid6Eg AyzfyCf8pn634OVDyYLaboh2MKQybfXA96gozDLPvD9u3+wlsU46n50D/m0FqJGR5ayU VSuh+rFPr8/9ITNGdZWNdcCUB8bE11xCmIFdY= 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=BGSSG1KppTdhFpfh0S8ytn/P5QNiyuOhgVXWuDULhJw=; b=ANJsLIqbS7puEtXgs6dtKRrSF6n9is/p1HL5yF4F/hic62/2eGKoVpMraj/KeILlWJ Jstfu3j7oFeItYhSX4XWTCyciTsEaFvrrpviAPqm3mcK1SqnoaWlTOmORG4LSaPxusoa wOVY47ZNCE0QSTd8YJDIvoPC+qC83wYB7MpiK8U7MPZGrGMEDDpJf9kifrmwbAcnPvra p8Nb6bII+hk7SkfoXq1+OmnlsR9HlEUdZQh0kqplXvfaZZmDBeQ+q5DbZr080RS2wQ0f ob6Eh3ZuFW4FKy1HvMK2PbxHGtxGJfU34jcgKOZs31lZdIP6f1/ZUHONQHuig95dUHDY +yGA== X-Gm-Message-State: AOAM533zsDprTDl6wBbU6RRFFJHoW56sTnKmTK7Zrbcv5wiUWo+jS6Ip y3jZCsqmlVgZ894jB7hScj15+OrzTf6M/7RDIvY= X-Received: by 2002:a05:651c:281:: with SMTP id b1mr1366107ljo.372.1631076925502; Tue, 07 Sep 2021 21:55:25 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id a18sm107815ljd.4.2021.09.07.21.55.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 21:55:25 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id n2so2415793lfk.0 for ; Tue, 07 Sep 2021 21:55:24 -0700 (PDT) X-Received: by 2002:a05:6512:1112:: with SMTP id l18mr1314095lfg.402.1631076924200; Tue, 07 Sep 2021 21:55:24 -0700 (PDT) MIME-Version: 1.0 References: <20210906142615.GA1917503@roeck-us.net> <20210906234921.GA1394069@roeck-us.net> <20210908042838.GA2585993@roeck-us.net> In-Reply-To: <20210908042838.GA2585993@roeck-us.net> From: Linus Torvalds Date: Tue, 7 Sep 2021 21:55:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Enable '-Werror' by default for all kernel builds To: Guenter Roeck Cc: "David S. Miller" , Dmitry Torokhov , Christian Koenig , Huang Rui , Linux Kernel Mailing List , linux-sparc Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 7, 2021 at 9:28 PM Guenter Roeck wrote: > > It is seen with gcc 11.x whenever a memXXX or strXXX function parameter > is a pointer to a fixed address. I wonder why I don't see it with gcc 11.2 here on x86-64. > gcc is happy if "(void *) 0xfffc1f2c" > is passed to a global function which does nothing but return the address, > such as: > > void *sanitize_address(void *address) > { > return address; > } We have had reasons to do things like that before for somewhat similar (well, opposite) reasons - trying to disassociate some pointer from its originating symbol type. Look at RELOC_HIDE(). It might be worth it having something similar for "absolute_pointer()". Entirely untested "written-in-the-MUA" garbage: #define absolute_pointer(val) \ ({ void *__res; __asm__("":"=r" (__res):"0" ((unsigned long)(val))); __res; }) I dunno. Linus