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=-2.1 required=3.0 tests=DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,T_DKIM_INVALID, USER_AGENT_MUTT autolearn=ham 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 D4ADFC4321E for ; Fri, 7 Sep 2018 13:58:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7624E20844 for ; Fri, 7 Sep 2018 13:58:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="m9UYVjJC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7624E20844 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728691AbeIGSj3 (ORCPT ); Fri, 7 Sep 2018 14:39:29 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46638 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727718AbeIGSj2 (ORCPT ); Fri, 7 Sep 2018 14:39:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TCnKgmT5DcseuwWIzumYqCQNmDAnfRFSpzpGJJq83FE=; b=m9UYVjJC7BOildnlrC9Y1iYfy gaVSq+THbUAmz1RUHjMQ/teWNL1jIVpv2ywbLB1RS+XkWobeWkgePM1mcDzZb7V5maWOr5LPOeN2X kMSh8XotOOUZ0fRjOCafsUrwNr3JZltyvbnjzt5scna75sNzic9VV9S8Ezy8B5m2urNz/+HBPJDba 7pyO6BTXV7TH/Ul2Y1cBRpDIhVOUC57mVkZyamfZ4+EGCGZUWaBTL2tYJdSaqiMxeWttw2B3se00m iAnd0/P+tP50MHKwewcP4RqBI0/E40vLdg8QExwP77oKusLIn7x4f5OVMdZQ17xf0hN/K7/CFlC6J qD18o2oKA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fyHH8-00085K-T6; Fri, 07 Sep 2018 13:58:19 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 66CAA2024DB84; Fri, 7 Sep 2018 15:58:17 +0200 (CEST) Date: Fri, 7 Sep 2018 15:58:17 +0200 From: Peter Zijlstra To: Christophe Leroy Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h Message-ID: <20180907135817.GF24106@hirez.programming.kicks-ass.net> References: <20180907134246.GC24106@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 07, 2018 at 01:50:18PM +0000, Christophe Leroy wrote: > > > On 09/07/2018 01:42 PM, Peter Zijlstra wrote: > > On Fri, Sep 07, 2018 at 01:27:19PM +0000, Christophe Leroy wrote: > > > On PPC32, enums are 32 bits, so __PERF_SAMPLE_CALLCHAIN_EARLY is > > > out of scope. The following sparse warning is encountered: > > > > > > CHECK arch/powerpc/kernel/process.c > > > ./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) > > > > Urgh... what compiler is that? I've not seen anything like that from the > > build bots. > > > > [root@pc16082vm linux-powerpc]# sparse --version > 0.5.2 > > [root@pc16082vm linux-powerpc]# ppc-linux-gcc --version > ppc-linux-gcc (GCC) 5.4.0 Ah, that's a sparse warning. But does your GCC agree? The thing is, sparse uses the C enum spec, but I suspect GCC uses the C++ enum spec and it all works fine.