Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4445562pxf; Tue, 16 Mar 2021 13:45:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJkrJ9DL6Amprj4ZZ/XDri24SKfjaEOilN+MtUYFmcmTgytf2PhwkFLzuS2r4wYoOgUlHf X-Received: by 2002:a17:907:a06b:: with SMTP id ia11mr31468954ejc.294.1615927543801; Tue, 16 Mar 2021 13:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615927543; cv=none; d=google.com; s=arc-20160816; b=FZmqrsYIzX1jVLBtjdbVutu9156L1hPKBNkNHALdjhKdobwqOyk9Kflpgi4a2bUW+y TID6OIxxj//srkQOyBqlv1fOH6R0qq5Ikb8YhEbSTLzxtWS3tmiyaf9jNX68EwERS2EA JcfBdCQGQt9y9H2QH8iIN6imnDPe6KDvFECyWxe9UzEvrx7wAhDqKEbjc/H9JIrSRKpi +b9bHNt+WMdJGSCpKLua0C1E6PtyByphFuJQGpKQ33eOeje0Vpyj9ob02Mf9jQbhLViW WJ4oEf+Nofb8zirTvdaMhZhruu7BEXmsLC3biPaIbk0axOOhz93nFg+De5YUOjmZSzui x0OA== 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:from:references :cc:to:subject; bh=Lw/trWAsWdql0Ew17J4oyBvFrsw1fdHkFOfSE8nCD1s=; b=ydxUTq5skC2bXBiUNlukUzhT512NsJ454lxTz9uN5bAKo3u3ql29NTZ4oKtl5tPi+Y NEUiGKffSeSVhDxmSzTpHMZSwerUY6FJTJf0IxOWapSfV2imawOFroNkozgbgSDwVeTq vKF4ojhYST7WWq7QunREfZGfIUKUVdq8Q81mLEe9d40fBXn05HRJI6MotJNwWyVJiTzr jAPv8y7udOZ6ZMxZCvxvRR/U44RaxtcxJXCD7+k40Upc1HX8B5kjOnpSRPKEdTuz69um fb1ceRAKrb0c39apuutp4We6rLOWKbncWxbQ8L8OWaNyM//q3NJ+oK+3AuVgbvfxcGaR Dxfw== ARC-Authentication-Results: i=1; mx.google.com; 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 g20si15539984edy.270.2021.03.16.13.45.21; Tue, 16 Mar 2021 13:45:43 -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; 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 S231833AbhCPPlU (ORCPT + 99 others); Tue, 16 Mar 2021 11:41:20 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:65140 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234675AbhCPPlH (ORCPT ); Tue, 16 Mar 2021 11:41:07 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4F0HZ74Q2Mz9v0XB; Tue, 16 Mar 2021 16:41:03 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id k0D1psiW6rox; Tue, 16 Mar 2021 16:41:03 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4F0HZ73LcGz9v0X9; Tue, 16 Mar 2021 16:41:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 065CF8B7E1; Tue, 16 Mar 2021 16:41:05 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id zQauc1oIXtG0; Tue, 16 Mar 2021 16:41:04 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6D29C8B7E6; Tue, 16 Mar 2021 16:41:04 +0100 (CET) Subject: Re: [PATCH mm] kfence: fix printk format for ptrdiff_t To: Segher Boessenkool Cc: Alexander Potapenko , Marco Elver , Andrew Morton , Dmitriy Vyukov , Andrey Konovalov , Jann Horn , LKML , Linux Memory Management List , kasan-dev References: <20210303121157.3430807-1-elver@google.com> <20210316153320.GF16691@gate.crashing.org> From: Christophe Leroy Message-ID: <3f624e5b-567d-70f9-322f-e721b2df508b@csgroup.eu> Date: Tue, 16 Mar 2021 16:40:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210316153320.GF16691@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 16/03/2021 à 16:33, Segher Boessenkool a écrit : > On Tue, Mar 16, 2021 at 09:32:32AM +0100, Christophe Leroy wrote: >> +segher > > I cannot see through the wood of #defines here, sorry. > >> Still a problem. >> >> I don't understand, gcc bug ? > > Rule #1: If you do not understand what is happening, it is not a > compiler bug. I'm not saying that it isn't, just that it is much more > likely something else. > >> The offending argument is 'const ptrdiff_t object_index' >> >> We have: >> >> arch/powerpc/include/uapi/asm/posix_types.h:typedef long >> __kernel_ptrdiff_t; > > So this is a 64-bit build. No it's 32 bits. The code in posix-types.h is #ifdef __powerpc64__ ... #else ... typedef long __kernel_ptrdiff_t; > >> include/linux/types.h:typedef __kernel_ptrdiff_t ptrdiff_t; >> >> And get: >> >> CC mm/kfence/report.o >> In file included from ./include/linux/printk.h:7, >> from ./include/linux/kernel.h:16, >> from mm/kfence/report.c:10: >> mm/kfence/report.c: In function 'kfence_report_error': >> ./include/linux/kern_levels.h:5:18: warning: format '%td' expects argument >> of type 'ptrdiff_t', but argument 6 has type 'long int' [-Wformat=] > > This is declared as > const ptrdiff_t object_index = meta ? meta - kfence_metadata : -1; > so maybe something with that goes wrong? What happens if you delete the > (useless) "const" here? No change. Christophe