Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4520023ybl; Tue, 21 Jan 2020 22:58:28 -0800 (PST) X-Google-Smtp-Source: APXvYqzcS3u4AeKbuefCkgSEwb1UnbQCF0S/I4OxCGSS9f2sfUxp7ctb0f6Gz4HbTncqGO64reYt X-Received: by 2002:aca:1b08:: with SMTP id b8mr5877076oib.62.1579676308607; Tue, 21 Jan 2020 22:58:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579676308; cv=none; d=google.com; s=arc-20160816; b=R7B3E7qDsoKnWpTbojDLkkZYAUmLlcnnosCzy3J+E4C4QjC72O3GtMmJFT5K09ixUu NTpaXOVVcoQNgkZ1Wlacr8o3fdeXnqCTlIBehEUhTxAD70iO42YcKhlsNuvlxXEVH9iz 3sDViU1WH2TbiJbF1qubUxyp44rL1TQPqDCTm/2GOcQIn2hFnmhurNsAaAS6XkX4HNvi bT9BiDGjoWo8mEpsuT0W0PwaBogzqi+U+pIn8lhUX57LgljR+C+MFBOoDtw7SVC8jUCl /+HmO5iO0CihB6nNQUoB7DPRSKnNXL8ItIUXiQNjcNneHtqFDncxpJx3R8v6Y+V4K9M7 Cs9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=CBx7iS06BSIP6qNB7l3ahv3OsouitLiZYefJlZ5dcu8=; b=Knh4u0Jq4TF+SwYgwhiLgRxQvmBEFjk9ZU5R5Jl9JorN7bQwS05kFsND4dahHFgmo+ t94YrhMB+LUo2NKi+6Qi11JpTfRH/VU6b5ur8TWgar/+oQ7AVq7NAwaBlpMFDJGVT/IZ bCjGwI8utYgt8QL7WcHOenNGDQm4VFkuIQPyQ5P17+Hh7hLP0d6Sk4A5+9jdZ2SLweil +rNpUgGMVb6ilfhS/kEjkLQ7CAfghmjHTiohFvgcwKhT5oUFi1S3Ahdn1o4MzDKu7vxk CfuuTrf8Ekwy1wBqETeR3kGZjB21F1VivQEP0wj7Wd9styksEiN84nBpgmNMRQJUjI5i y6SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=EHsTER7Z; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si13456168otq.183.2020.01.21.22.58.16; Tue, 21 Jan 2020 22:58:28 -0800 (PST) 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=@c-s.fr header.s=mail header.b=EHsTER7Z; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729045AbgAVG5S (ORCPT + 99 others); Wed, 22 Jan 2020 01:57:18 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:30892 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725836AbgAVG5R (ORCPT ); Wed, 22 Jan 2020 01:57:17 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 482bn71Kscz9v1G1; Wed, 22 Jan 2020 07:57:15 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=EHsTER7Z; dkim-adsp=pass; dkim-atps=neutral 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 OVFmCX_L5Lgn; Wed, 22 Jan 2020 07:57:15 +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 482bn707RTz9v1G0; Wed, 22 Jan 2020 07:57:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1579676235; bh=CBx7iS06BSIP6qNB7l3ahv3OsouitLiZYefJlZ5dcu8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=EHsTER7Z4Oqsp2+hty+bZTYAq8pwQujk5eElZEjELZauCDitzjjH1brzpv/wO7gNp zjVa610e+LoXEkBmEtVGNxrUCBuQ81/RVZwXAv0nB3xNteJHEf/0PK2i2dpoUNGNsd dZTnPsMHvWIQAB0dbbrapwoR0Q2lLT0ClO+/dDpY= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C4D468B7EC; Wed, 22 Jan 2020 07:57:15 +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 qVDc0MUIikwf; Wed, 22 Jan 2020 07:57:15 +0100 (CET) Received: from [172.25.230.100] (po15451.idsi0.si.c-s.fr [172.25.230.100]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9AD258B776; Wed, 22 Jan 2020 07:57:15 +0100 (CET) Subject: Re: GCC bug ? Re: [PATCH v2 10/10] powerpc/32s: Implement Kernel Userspace Access Protection To: Segher Boessenkool Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , ruscur@russell.cc, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <87ftqfu7j1.fsf@concordia.ellerman.id.au> <20200121195501.GJ3191@gate.crashing.org> From: Christophe Leroy Message-ID: <8501a33e-6c76-b6bd-9d8e-985313f94579@c-s.fr> Date: Wed, 22 Jan 2020 07:57:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <20200121195501.GJ3191@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 21/01/2020 à 20:55, Segher Boessenkool a écrit : > On Tue, Jan 21, 2020 at 05:22:32PM +0000, Christophe Leroy wrote: >> g1() should return 3, not 5. > > What makes you say that? > > "A return of 0 does not indicate that the > value is _not_ a constant, but merely that GCC cannot prove it is a > constant with the specified value of the '-O' option." > GCC doc also says: "if you use it in an inlined function and pass an argument of the function as the argument to the built-in, GCC never returns 1 when you call the inline function with a string constant" Does GCC considers (void*)0 as a string constant ? Christophe