Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1986355lqb; Mon, 27 May 2024 04:26:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU2Mi2aocGrK+eip5tHIjw+7ZWfmbpm2FJqPbNhUScjvlzso41CZ1utfLN3rLt2EFL2UYu4txuYXoBjjSwdqUoQCqzewtOJol8FTEFxVg== X-Google-Smtp-Source: AGHT+IGigll4sCYNrsrd9NCP6xJRAzm9Dr6hywHgGyoFDyy5SS6K10TLz8+txod5g1pXal3Gv9Ij X-Received: by 2002:a05:6359:6382:b0:197:b7d8:3590 with SMTP id e5c5f4694b2df-197e52199abmr642780155d.19.1716809171486; Mon, 27 May 2024 04:26:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716809171; cv=pass; d=google.com; s=arc-20160816; b=PR0z5f4eUPJzgI/8R6yeUVJM9SQjB0MuccYL35XITR05OUJwGKQYCbWmh8R4T0FiKI OoqSz0KhWXK3wm+rY1BX9HfeP4UK9hV4BSDbrs0juxRrq18gz444BhFRb4MZikV+7n0w +vQcboSnaja0y74rkvv77gWlLtWO257RqxZm+4GH01GgKb3g/4EFEYhRSQcjw8NRMcFV x7rn6Ufii2nJJQFBAbxMKfH4tZy7vDHPIAmpwyLzlWiFOroG6fOJN42Wxkgc8odqgp3C +2IauzmzBKchuP0eTvb6dXhy6CkW7cnJdS6X44X2VmeDRjSuKKHMUgk+mY6L6XtWfS1a jXOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=Q+621Dnv2ibRxQTGa/2GbBLACpbN7ercwRBRx17FeVk=; fh=7FqQY95/6dNosXCjFkEopk0YDb4YCNocz5tbx4U0IiY=; b=vTa9WXzS9AjJdmH/tH4XbjYJLx9s9olJfM/bzfKWB1A3IpdXYeF0qN1g46OJDWTqVC NU4le5al/Yno8PjQQEUc1/B24y6E/7gf2BWhfrNObhagtZnLTKiNb4ThzIhG/rO3+2YT 9sGPdLksoNxd5GonJFWSpK0e98YCX+hkidG6UNgpf8akkFceHdve2mFqWUfpDGq4qLs6 8taos/kVLAgvOVqNp6i4cY/kdgOX5r6nMyOtoCohPgEKhKu1JbxqyqAN614NNlXShbrY 6dBuP/FBnHmtwqMaH0stO/QgK6bhlCCW2d+wU59AWCXgayAa9/8LJ2afDByQnTP85fSU nDyQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DDxfd5pz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DDxfd5pz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-190485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68221b73010si6469731a12.85.2024.05.27.04.26.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 04:26:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DDxfd5pz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DDxfd5pz; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-190485-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190485-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9BB77283847 for ; Mon, 27 May 2024 11:26:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02D8E14F9EC; Mon, 27 May 2024 11:26:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="DDxfd5pz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="mCZhjzJU"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="DDxfd5pz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="mCZhjzJU" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B782514F13B for ; Mon, 27 May 2024 11:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716809160; cv=none; b=ejhqIDZQE9vPBuzHHXNA/aHTZfVA4uN+dUAhFGOdnlIDTnBLZ0Ob1WaxsQhJjRpf5qWOXJSRlgwC04OND67WmJMTMRmkssUjKrUJyif88p0+VZFtD/LvbNLKfTKMK4kxjMXQyKAXez4QpEqO2WM7ri0jzfO8l/Z41JNurVKjMos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716809160; c=relaxed/simple; bh=mxaLW9F/KHm1Crwp8xU6s17vqlBhoqn3MlPE2dMdJz4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ok9xJbxI7Q2c1yoDhX1IO63S7ELvTVz0Xg32Ghq7XNBH6pNACD0tbP8/Tg4ue9WXB3NZE4RDdha7FKVfeL1rvL5QE+lAWEcvX7vb5tdgPUqfhUAodtH0Y1zhOJKERX8Ip7D6oKX0xvX0/6VJzGCzfcCMSEP1+XT4si2bCXfe+uk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=DDxfd5pz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=mCZhjzJU; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=DDxfd5pz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=mCZhjzJU; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D46991FCFD; Mon, 27 May 2024 11:25:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1716809156; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q+621Dnv2ibRxQTGa/2GbBLACpbN7ercwRBRx17FeVk=; b=DDxfd5pzRBfBiYYNnL2Fg9WCnRRkOEfeR9YBiddC+vQjA8+OJO8hoGwyqF7r6LPfktZoEt TXXtjgv6kbdyFfi60mh3Gmawr8NXtV6+05abXqHCfY3iqRgHk85G9VLUC1oaFT3PxVGdm0 NYr5Z9FL1HstWWWqHmLt1EexrqTght8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1716809156; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q+621Dnv2ibRxQTGa/2GbBLACpbN7ercwRBRx17FeVk=; b=mCZhjzJU5PsVCkeZkYpz/vZsgq5HliEWZ+WVjS7262gZNQAi/7nY91Cltbhn/32czXAv5R D4Od0ITOC1tg/JBA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1716809156; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q+621Dnv2ibRxQTGa/2GbBLACpbN7ercwRBRx17FeVk=; b=DDxfd5pzRBfBiYYNnL2Fg9WCnRRkOEfeR9YBiddC+vQjA8+OJO8hoGwyqF7r6LPfktZoEt TXXtjgv6kbdyFfi60mh3Gmawr8NXtV6+05abXqHCfY3iqRgHk85G9VLUC1oaFT3PxVGdm0 NYr5Z9FL1HstWWWqHmLt1EexrqTght8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1716809156; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q+621Dnv2ibRxQTGa/2GbBLACpbN7ercwRBRx17FeVk=; b=mCZhjzJU5PsVCkeZkYpz/vZsgq5HliEWZ+WVjS7262gZNQAi/7nY91Cltbhn/32czXAv5R D4Od0ITOC1tg/JBA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5741413A6B; Mon, 27 May 2024 11:25:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id HXTREsRtVGbSCgAAD6G6ig (envelope-from ); Mon, 27 May 2024 11:25:56 +0000 Date: Mon, 27 May 2024 13:25:39 +0200 From: Oscar Salvador To: Christophe Leroy Cc: Andrew Morton , Jason Gunthorpe , Peter Xu , Michael Ellerman , Nicholas Piggin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [RFC PATCH v3 05/16] powerpc/mm: Fix __find_linux_pte() on 32 bits with PMD leaf entries Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Flag: NO X-Spam-Score: -4.30 X-Spam-Level: X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_SEVEN(0.00)[9]; RCVD_TLS_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[linux-foundation.org,nvidia.com,redhat.com,ellerman.id.au,gmail.com,vger.kernel.org,kvack.org,lists.ozlabs.org]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,imap1.dmz-prg2.suse.org:helo] On Sun, May 26, 2024 at 11:22:25AM +0200, Christophe Leroy wrote: > Building on 32 bits with pmd_leaf() not returning always false leads > to the following error: > > CC arch/powerpc/mm/pgtable.o > arch/powerpc/mm/pgtable.c: In function '__find_linux_pte': > arch/powerpc/mm/pgtable.c:506:1: error: function may return address of local variable [-Werror=return-local-addr] > 506 | } > | ^ > arch/powerpc/mm/pgtable.c:394:15: note: declared here > 394 | pud_t pud, *pudp; > | ^~~ > arch/powerpc/mm/pgtable.c:394:15: note: declared here > > This is due to pmd_offset() being a no-op in that case. > > So rework it for powerpc/32 so that pXd_offset() are used on real > pointers and not on on-stack copies. > > Signed-off-by: Christophe Leroy Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE Labs