Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1226254imj; Sun, 17 Feb 2019 00:41:43 -0800 (PST) X-Google-Smtp-Source: AHgI3IYdY6+vZQiaqktAUAUCJcdW5X6VUHKtTD0NKHCe7aef9a/hVztFPVAIUAWNPl4r7O+Chboa X-Received: by 2002:aa7:8109:: with SMTP id b9mr18501605pfi.140.1550392903599; Sun, 17 Feb 2019 00:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550392903; cv=none; d=google.com; s=arc-20160816; b=PZAoBzr7epZZ7GRP6MXVlK7JRK+GyoN0ctR4avXNPhZ5blGSi2OXMbQkJLnwnq8566 CbOburzdFTZIi3dBhuuvHKbVTLgTUPjGehaFWXEqIyfuZBmB4YIWCzzWRLohwGsq0Zpf ZfTJgJuXRhLgD2qTZowwTE4qKtjpmoaligj363BWqq5o5o2b0oKqvdrDC3nr8rhFBhm4 B/JyO43Jc1pSrEH/sXJL2lqq6zxI0uaYG2UtDKQQlGoszNjT70JQSrCyx6xCu67CNpjP lOKqGKzaU4gtdpzapNbdRcXoX4x8fudihjLFS6H+m7Fr/zTj5NvXs930FthW71/fzWQ9 62SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=ftxkWchyFbaweklNC2tPHH4we0OIRk56ARBfnXFaUWA=; b=0jHu5jrzEGLgSDhfbc46o7wjAOMWHlRcjetFcFtDjs5vJzMTYgPia3/Pndmq3LlsUY QwRoBFe5e8SCsvnufcyL+23asneD9ldLyHWcFTRuO/It308+n252Fn1ohEmVH4Ja3IWS fLPk+roSYxI12IApzZYOczSLAnM1hCfNb5CYD6qw1ILwhochsrd7CwQ+s4mhm4mwQAcu orHy+eF8YKrrX42ErrMOPxPreZtHm/Gesvv2oZLtWw5bWmDChzpTbzaeQjGBBlO8AvC0 Okqip2Zy0/gJphvolvOQYvPt54bsX08YjiahJcx9s4iitar2lSEKoYvIi9g1mSPFCXCv jvWg== ARC-Authentication-Results: i=1; mx.google.com; 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 b6si10116329pgg.2.2019.02.17.00.41.28; Sun, 17 Feb 2019 00:41:43 -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; 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 S1727447AbfBQI0d (ORCPT + 99 others); Sun, 17 Feb 2019 03:26:33 -0500 Received: from ozlabs.org ([203.11.71.1]:56239 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbfBQI0c (ORCPT ); Sun, 17 Feb 2019 03:26:32 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 442KpZ5B0Dz9sDr; Sun, 17 Feb 2019 19:26:30 +1100 (AEDT) From: Michael Ellerman To: Andreas Schwab Cc: linuxppc-dev@ozlabs.org, linux-mm@kvack.org, erhard_f@mailbox.org, jack@suse.cz, aneesh.kumar@linux.vnet.ibm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/64s: Fix possible corruption on big endian due to pgd/pud_present() In-Reply-To: <87pnrran89.fsf@igel.home> References: <20190214062339.7139-1-mpe@ellerman.id.au> <87pnrran89.fsf@igel.home> Date: Sun, 17 Feb 2019 19:26:29 +1100 Message-ID: <87h8d2ddmy.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andreas Schwab writes: > On Feb 14 2019, Michael Ellerman wrote: > >> The fix is simple, we need to convert the result of the bitwise && to >> an int before returning it. > > Alternatively, the return type could be changed to bool, so that the > compiler does the right thing by itself. Yes that would be preferable. All other architectures return an int so I wasn't game to switch to bool for a fix. But I don't see why it should matter so I'll do a patch using bool for next. cheers