Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp377007rdb; Thu, 15 Feb 2024 03:03:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUVk8mjFTy73+MgpnoEAhv4qqeM+HyGLERj1HU0YOIKYLB6Rt3SH99cpxpMMA6+V+bylRxHxcUPklS8vO/T+ISI8TLLyJM6+QafXmu42w== X-Google-Smtp-Source: AGHT+IHQxd8xujBGUN2kP+YXMSPNHOkQSHQ0NdQ6M7ndE+SR9X966NLhhAIYmLVqLubcoLe9ayFk X-Received: by 2002:a17:90b:24c:b0:296:459d:c96e with SMTP id fz12-20020a17090b024c00b00296459dc96emr1249329pjb.44.1707994991077; Thu, 15 Feb 2024 03:03:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707994991; cv=pass; d=google.com; s=arc-20160816; b=myzHFYci/tjIjN6AHndCoAUkcsYnSEPxTa0CvfiTelCVCIvAzHvThVrkXyGJaGf69E 9MpGZfmYIDEfFEkf3I81nyt7hTIaa+wAVYBPfY4U2dE29J7b2nRK3s2tRCJipkg9ohhc he880i6+z/3Tz5I4efzQqv7iJcygVTnHrKdBYhZHQe33lGo5vOwsq7A7ynTOS+n+EE3N 3PLYQUjXt4i1VsX2VZwRO/GjW0pjcE1aAnJdFGI8zB5hl7CElyRFcpwNM3knA0FUsz2H baJWZAgpzHtDq8To6fC4+Okzmhqkm9ElaqGUC6Plk24BjaBrkXeJaIRBF8rGos7C5BlI 8QVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=8KZr5sGoHlhvspGJ/ogFPo9qxLHR8Gz1GWpTyAi9cig=; fh=Y4dxnW1/QzdWwCLFSwRGbbxHIEpEwGYbtdT1xeEyRq4=; b=IW2rDyfLmluEbV9cNgkNTiLmNVnsa2Vi1ifFDHocq+PDWgmmr98pNlIBg1MyG/cFFh k5k4vaC25b9IvrP8QessSxZiP2v1zPjO1k8TmZVZCWW5ZcL9KW+Yy+WEkRDiuWhN4t4U lymE+R0BPsRTkpb9fZLC5Ya2wcWQ8+v/x06guRlMufaQkqYyfly9bovWAj31LGSxmptN zcb6OvPNIRMvAt5zYfgx3JxHmr2xxZwJCdmefIbv7pUm4lmfYv/yzocaNPwnGorPWyk6 EcCe9L2QWMCYPT7cxQEj8hJhSnAOOS7t4nDk40/4ceW96np0SgyzKH/7eV6GZbhTDnTS fHBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-66709-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66709-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id oh7-20020a17090b3a4700b00296e1c56241si1047793pjb.61.2024.02.15.03.03.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 03:03:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66709-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; arc=pass (i=1 spf=pass spfdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-66709-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66709-linux.lists.archive=gmail.com@vger.kernel.org" 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 8C84328318D for ; Thu, 15 Feb 2024 11:00:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 376E61332B0; Thu, 15 Feb 2024 10:46:36 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (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 12ABC12DD96 for ; Thu, 15 Feb 2024 10:46:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707993995; cv=none; b=LnQy1i9N6nKAFG2fUdatJ3QrnAdC1Tt4e0uln8kqtUJIcV+LWFZYwqaxmp8/jL48GUZdQsVAgiKQ+lMXQ31/744xvnZ5svBj5zXeCzlrgN95b+5vJwGqbgCciJppsLOBqxz6RwCPCqnY+MDsS3YxbY5iz+a+i55D2jd/dUrDrXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707993995; c=relaxed/simple; bh=xea5c/vUudL7TI9t7cbNpN7u8WkZDcV7HrZPNxRxpQ4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Q0FnpQAD7pkcytk25Zr3EXAn3riJbid/sZNzognjXNvUqo8zojZbvMc3tmeR+P6YegZTjwacmsl6XxVofSn2XirR/6exmUQwX3EmWvKwqW6WFQIQJEMQRrOesmS7KrbjdTUWBJ0lszZ3P5UPrjPilr6ATbMaZ+nzOJdVppDFn4s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104: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-out1.suse.de (Postfix) with ESMTPS id 2866522031; Thu, 15 Feb 2024 10:46:32 +0000 (UTC) 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 0A33C13A53; Thu, 15 Feb 2024 10:46:32 +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 ucwwAojrzWWfLgAAD6G6ig (envelope-from ); Thu, 15 Feb 2024 10:46:32 +0000 Message-ID: Date: Thu, 15 Feb 2024 11:46:31 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 1/7] lib/stackdepot: Fix first entry having a 0-handle Content-Language: en-US To: Oscar Salvador , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Marco Elver , Andrey Konovalov , Alexander Potapenko References: <20240214170157.17530-1-osalvador@suse.de> <20240214170157.17530-2-osalvador@suse.de> From: Vlastimil Babka In-Reply-To: <20240214170157.17530-2-osalvador@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: Authentication-Results: smtp-out1.suse.de; none X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 2866522031 X-Spam-Flag: NO On 2/14/24 18:01, Oscar Salvador wrote: > The very first entry of stack_record gets a handle of 0, but this is wrong > because stackdepot treats a 0-handle as a non-valid one. > E.g: See the check in stack_depot_fetch() > > Fix this by adding and offset of 1. > > This bug has been lurking since the very beginning of stackdepot, > but no one really cared as it seems. > Because of that I am not adding a Fixes tag. > > Co-developed-by: Marco Elver > Signed-off-by: Marco Elver > Signed-off-by: Oscar Salvador Acked-by: Vlastimil Babka