Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp544846pxb; Wed, 8 Sep 2021 07:04:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz73gGyRdLPF4umMsR/zMRqEuOuPWfFxBiu1w1gFTC/tF4s7XTx3JOL9YHC+/rvpXO4HWSi X-Received: by 2002:a6b:b20c:: with SMTP id b12mr3570190iof.145.1631109857377; Wed, 08 Sep 2021 07:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631109857; cv=none; d=google.com; s=arc-20160816; b=geQy02QAtV+mhF6sCV/vtVrTrCyb61M7pXVU7/H7CviBuVmRVw0yK0ziKpO+Lx6JOK Hhg7y37fPTGMEJ/tImBFRaEfD85s4teGsXlktFlbOW08y9EnS9RdEBmBS++/vTr4sCsD 3ihdBWP53vhzz1D27sq4m5cW/njUb0jXzI3Mz4BQgJdo6CnRKvAVzjNeE3q5a+gWzsDg k+koKDFG8VURaGDAmVudhVlQtlZopwjNjQa3mTCeeGRPyCinFqS+FtJu6KBRTlhe0wwB oTZkfS9INJD/iHx2IvB1mjTFV/GyjaX5qePx+Bae7izYZQk6JqtsmspAzD5ipmHDXFiM qhkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to:sender:dkim-signature; bh=KVSAsAmNU3tpwYv+FwBzgvsKBTEXiRMkI36CYU+m7jk=; b=u9a0z4+2Y20zDAp2t7/s18EfKwHGJO4sPC8SGtLewREmDFavO1bY2z7Ssz6qxbFm45 D6mNJt3yax2smKrpgLEG8SJ+LDxEW5Ju8CWE4V/Kc6M/nPESSvOvH6NqW16Nbz9OB1xG 4gx1exjjp1r+pzKVsd7Cw0OAdkXRy18YGfaGoe7YBFuSbZpCky+VDN04nhpv7b0ja+zk cn/nbZvapSYrPpXIe7B4syGr2jG8zmyK0IYzUQRzjCa6fGKHFS3szRG0yeweUW1Ng8cT sub5cKTVXQdXcHUKVSNPp2PGKniZSYF0VpLr8Fq+z0G8O8uM9jpS+4NvRIzOb1GHRYtV uxZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YAuKZsUw; 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 q35si1748352jac.78.2021.09.08.07.03.58; Wed, 08 Sep 2021 07:04:17 -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=@gmail.com header.s=20210112 header.b=YAuKZsUw; 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 S1351771AbhIHNzX (ORCPT + 99 others); Wed, 8 Sep 2021 09:55:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbhIHNzV (ORCPT ); Wed, 8 Sep 2021 09:55:21 -0400 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC647C061757; Wed, 8 Sep 2021 06:54:13 -0700 (PDT) Received: by mail-ot1-x334.google.com with SMTP id i8-20020a056830402800b0051afc3e373aso3056651ots.5; Wed, 08 Sep 2021 06:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KVSAsAmNU3tpwYv+FwBzgvsKBTEXiRMkI36CYU+m7jk=; b=YAuKZsUwSoXOmchxu4hDVApkdnFGSH6PtyETCFmTcUaM7xNM4jO1h/oZHjDmI5JUVZ FgDkoQosToFnrlF2bjOhMJANYz8N6fc0lHrNaKL/bCKekiluZz4VpJzRWd+HZbBwD2DP 1/Zp28WFjqgllHezBDRwt1JYd6stJP3eypXuJ042O26P7++MII9tKH9ekDAsueMzLZwD WQMTY8dMxYfTruDB9cv7eUHjkUjnx/g7JKIgemRb3F3EmteWZfMPEofoQznUk/ZvAeYK DchBOgSH2o3HCyUmYt2QBscSwfFCSnuJZnNc9fdjb9ZSIjU7BeIf1Q1s3ruIUFN4mpSJ YaKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:cc:references:from:subject:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KVSAsAmNU3tpwYv+FwBzgvsKBTEXiRMkI36CYU+m7jk=; b=gsGW2mfAZl8UNwgXDDR/NO4ABkoc2DioQwVMJ9Fq+E2TOHuS3ZlkoHwtZ9xyej4zUH B52wfZK5bNPCodAhxvdHyqxwQ7qf4lLayaXArOLlrudBy17ui/iM9zu38U2zEo/KepxV uljjjiNXsUi+u/eMkGME4ca024o8Gk71puJ/JZRYgISLpe1O1WIG0B0RZ+S7D90YEr4V YkEM9TGvduWrEzoClM97yjLYVciglPWal2wIEavNEOiMk3W6FnVsSOwEOyOubFj6Oak5 uD3wMxxyCJjV6qne9eh7T2x+9VNrWgWihsAbPvi+G8aRGhsjUB6rpvl5VVh529Bw5IqP reiQ== X-Gm-Message-State: AOAM531xow0/Qm3sZfvp270MymZ9AtMVUJ/BN4omKj53DYIimH4eUvNS DLSx+c4Jrg4pMMkPNunEJLI= X-Received: by 2002:a9d:5a9e:: with SMTP id w30mr3046135oth.378.1631109253346; Wed, 08 Sep 2021 06:54:13 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id x22sm442213oox.26.2021.09.08.06.54.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Sep 2021 06:54:12 -0700 (PDT) Sender: Guenter Roeck To: Al Viro Cc: Arnd Bergmann , Geert Uytterhoeven , Linus Torvalds , "David S. Miller" , Dmitry Torokhov , Christian Koenig , Huang Rui , Linux Kernel Mailing List , linux-sparc , Martin Sebor References: <20210906234921.GA1394069@roeck-us.net> <20210908042838.GA2585993@roeck-us.net> <23b3a9ab-7205-9f4e-9425-17506aec3170@roeck-us.net> From: Guenter Roeck Subject: Re: [PATCH] Enable '-Werror' by default for all kernel builds Message-ID: <1c1c54c4-efd9-e3da-022f-3396471d72d2@roeck-us.net> Date: Wed, 8 Sep 2021 06:54:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/8/21 6:19 AM, Al Viro wrote: > On Wed, Sep 08, 2021 at 05:42:30AM -0700, Guenter Roeck wrote: > >> Oddly enough, a memcpy on the 'rtc' variable doesn't fail, >> neither with nor without volatile. Something else is going on. > > While we are at it, would memcpy_fromio() complain? Seeing that > this is what's really intended there... > It doesn't make a difference on m68k. #define memcpy_fromio memcpy_fromio static inline void memcpy_fromio(void *dst, const volatile void __iomem *src, int count) { __builtin_memcpy(dst, (void __force *) src, count); } It boils down to the use of __builtin_memcpy(). m68k implements its own version of memcpy(). If that is used, everything works fine. However, if a file includes , memcpy is replaced with __builtin_memcpy: #define __HAVE_ARCH_MEMCPY extern void *memcpy(void *, const void *, __kernel_size_t); #define memcpy(d, s, n) __builtin_memcpy(d, s, n) and the compilation fails. That also explains why only some architectures/files are affected. Presumably those are the architectures which use __builtin_memcpy(). Guenter