Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2160935imm; Fri, 7 Sep 2018 11:45:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZI1dPBvCadAgmm2PQ+jnrqOuntxFU/6nMZR6Qo+dd7jdWxpOTGYe6rSA1nxJSfyryTxV83 X-Received: by 2002:a63:c046:: with SMTP id z6-v6mr9799567pgi.114.1536345927225; Fri, 07 Sep 2018 11:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536345927; cv=none; d=google.com; s=arc-20160816; b=rzBC/29sCs7k8gPASuARzTvdVD20HizqZC8b7nylMg8kvNOORczdCZylKR1Aug0XJy P7kVXzh5h4pOGYT2zbdrwy8wS/3YsGbuE8fmG2KMicsPvUSzcCfCuI340Dmsp2Oa82Pg D1KH+n2bdj/uye4ksDICPyyolmiQvqD5ht1HzmH82mplGMbRDA6Iy2qcMqAxlkpcNNqu 1bH/WDgpR36FSJXX7a8crsh0dMkGlSt6hTC9y0qBu4HQeYgMIoyvMVWyhi9msa/wBn6G iqoS0Lz0J/YHV6487Wylq861t8YaS6wY5/6jxuI7d9HDfgcd5XU0OA1aYO7x0we5cbwc 6QGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XWq8NkvCfXgb0A2yW3w95vsSjh8wCd6g9bOryYAODXQ=; b=OjNSTozdK7Mwk01Kh7Fd2pc7BDsJb5x7zjgZ0Ro3FXXPLFAuVeumorhi8/Ni6WbwUh Y+t1pjUXgZ1xiyA0WHgzBJt34yjvIaXoKIYuH+ZuqZ65CcxBOPrV8ZaiZgN+j5wMbOSY urQgr5Z3yW7htZ3BHjwUBa3X2tYAcaHPdqGAzF58Ja26ZgfJfXSz/5nmI4F85DV4sWOY llLoYfc68vj3xjR+t01YB14Ng2Ntr4+KW41yIREBIvp/rPO8lQWfxEf67r7EDG5+ml76 16wNR4agQW+t8TMbEF7z7v2qssR/FP9917GSvvTVLdidEDyCqJV+YEcgppU6XhsY0WVC 5Wcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SjfpcCQt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si9704302pgr.467.2018.09.07.11.45.10; Fri, 07 Sep 2018 11:45:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SjfpcCQt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727607AbeIGX0R (ORCPT + 99 others); Fri, 7 Sep 2018 19:26:17 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40183 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbeIGX0Q (ORCPT ); Fri, 7 Sep 2018 19:26:16 -0400 Received: by mail-wr1-f66.google.com with SMTP id n2-v6so15906139wrw.7; Fri, 07 Sep 2018 11:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=XWq8NkvCfXgb0A2yW3w95vsSjh8wCd6g9bOryYAODXQ=; b=SjfpcCQtYruHVXDxA65wO8aMw98yg73v8vkj/7sWRuBIheTcg0fyCc8di8Eyz8bugo HosfPZoGqJZUf+J0PfoDnaC/tFacdeLFdz9XJbz69IDKqzi9ic9RC4ihP4gSbS7HSpCb lWc0i7MM6AVOuSPaJ1brGzKVkTenvwc0mod7CFEQgqdWpMu7kpIPD1bgttfb+r5OwsSc CvqkinbCiKtz0xaBogHNz87Ou8i2A5OfKJ8LyKmHzTYoLxz9uCiipwcRCIYccjOD+SkD NKwoYpJiF2QoBWWC8+Wgo+nEC13WIxYdZhwLVYZJyXoE4kOmmOmUvKT+tk8pLMlhHz5R OTYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=XWq8NkvCfXgb0A2yW3w95vsSjh8wCd6g9bOryYAODXQ=; b=U7YoSfbrwDa3xUhQiGDNiyyVDD8a2eo2tEgAp6y9/zQGepRXrgYB2uhM4hOaAiH3La MZh7pn25vzGN975yllHSg0/esTSFV5mrrkv6i+exLR3PicA13Jd+NhlLt66jiCwMR3qB 74UIkT5O4TX5BKCuMTui5+6z40b4zYQEnYGEEQMVz2Ux4/kodF18tqPX3gGPJbfcFbDY VJTPU0KF4Q9w8DXs/yW6gvjYr8Ns/SToEFkOYBQZcT+iSt3Z5wwDMMlebarwUxDiGq6x bqJ3/YARnVPfk2EhJHtCRW9RxXAFcxgbeby0NiQMWzsrO3Gl5PC9+J1i5TWwLDw+9T1/ tZ/A== X-Gm-Message-State: APzg51C7UqXXeSLWLZ/tFV2NFwyfzdIstlb5Ukormwctzibm9W1+y52i PaP4hUQLCCL8IuFMWG9u4r+XViwC X-Received: by 2002:adf:f28c:: with SMTP id k12-v6mr7450598wro.263.1536345842047; Fri, 07 Sep 2018 11:44:02 -0700 (PDT) Received: from ltop.local ([2a02:a03f:4006:df00:c856:97f7:a8a9:88f6]) by smtp.gmail.com with ESMTPSA id h206-v6sm9914569wmf.25.2018.09.07.11.44.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 11:44:01 -0700 (PDT) Date: Fri, 7 Sep 2018 20:43:59 +0200 From: Luc Van Oostenryck To: Christophe LEROY Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sparse@vger.kernel.org Subject: Re: [PATCH] perf: enum overflow in uapi/linux/perf_event.h Message-ID: <20180907184358.pg2ho4m4tc3dpwlw@ltop.local> References: <20180907134246.GC24106@hirez.programming.kicks-ass.net> <20180907135817.GF24106@hirez.programming.kicks-ass.net> <7a086a56-a896-9513-7315-9d0d21b61a44@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7a086a56-a896-9513-7315-9d0d21b61a44@c-s.fr> User-Agent: NeoMutt/20180622 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 04:15:33PM +0200, Christophe LEROY wrote: > Le 07/09/2018 ? 15:58, Peter Zijlstra a ?crit?: > > 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. Sparse is a bit weird about the exact underlying type used for enums. > Ah yes, it seems that GCC is happy. So sparse should be fixed instead ? I'll investigate (I suppose the same is given on x86-32). -- Luc