From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 194DFC7EE23 for ; Tue, 23 May 2023 06:28:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235293AbjEWG2q (ORCPT ); Tue, 23 May 2023 02:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235231AbjEWG2U (ORCPT ); Tue, 23 May 2023 02:28:20 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ADF5119; Mon, 22 May 2023 23:28:18 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F1F9C1FF65; Tue, 23 May 2023 06:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1684823297; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ovwyqxaxul6Jnout/fYdCqVEyw+eZaKVXfjLn1UYFNc=; b=o35r5KkS78FAKg6uvqfrWx67mDl0FiQYw2dIOG9NHZV5C8wey/zXZMXT5lCjRT+R6eZ9RU Hor8ambAavzb/XZSJYbkRAEfQzCO04JD56eEgVtCWTfzVhXAiwPnlW9KQQHaCfJjhu0wXq X6M3sUChkpE59yaoQL0A+kof+t0j6fw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1684823297; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ovwyqxaxul6Jnout/fYdCqVEyw+eZaKVXfjLn1UYFNc=; b=9UGKksD10AY+0STy023y4uNjxIp8Ea6Gkq3nQnB+Srp4ZNWNWjgNhICxrwLEt+xMQp74rn O+xbSS3Zj4jCpmDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C00F813A10; Tue, 23 May 2023 06:28:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GRE4LgBdbGTkCAAAMHmgww (envelope-from ); Tue, 23 May 2023 06:28:16 +0000 Message-ID: Date: Tue, 23 May 2023 08:28:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Stable backport request: skbuff: Proactively round up to kmalloc bucket size To: =?UTF-8?Q?Daniel_D=c3=adaz?= , Greg Kroah-Hartman , Sasha Levin , linux- stable Cc: open list , Kees Cook , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:NETWORKING [GENERAL]" , ndesaulniers@google.com, rientjes@google.com, Sumit Semwal References: Content-Language: en-US From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/22/23 20:23, Daniel Díaz wrote: > Hello! > > Would the stable maintainers please consider backporting the following > commit to the 6.1? We are trying to build gki_defconfig (plus a few > extras) on Arm64 and test it under Qemu-arm64, but it fails to boot. > Bisection has pointed here. You mean the bisection was done to find the first "good" commit between 6.1 and e.g. 6.3? As others said, this commit wasn't expected to be a fix to a known bug. Maybe you found one that we didn't know of, or it might be accidentaly masking some other bug. > We have verified that cherry-picking this patch on top of v6.1.29 > applies cleanly and allows the kernel to boot. > > commit 12d6c1d3a2ad0c199ec57c201cdc71e8e157a232 > Author: Kees Cook > Date: Tue Oct 25 15:39:35 2022 -0700 > > skbuff: Proactively round up to kmalloc bucket size > > Instead of discovering the kmalloc bucket size _after_ allocation, round > up proactively so the allocation is explicitly made for the full size, > allowing the compiler to correctly reason about the resulting size of > the buffer through the existing __alloc_size() hint. > > This will allow for kernels built with CONFIG_UBSAN_BOUNDS or the > coming dynamic bounds checking under CONFIG_FORTIFY_SOURCE to gain > back the __alloc_size() hints that were temporarily reverted in commit > 93dd04ab0b2b ("slab: remove __alloc_size attribute from > __kmalloc_track_caller") > > Cc: "David S. Miller" > Cc: Eric Dumazet > Cc: Jakub Kicinski > Cc: Paolo Abeni > Cc: netdev@vger.kernel.org > Cc: Greg Kroah-Hartman > Cc: Nick Desaulniers > Cc: David Rientjes > Acked-by: Vlastimil Babka > Link: https://patchwork.kernel.org/project/netdevbpf/patch/20221021234713.you.031-kees@kernel.org/ > Signed-off-by: Kees Cook > Link: https://lore.kernel.org/r/20221025223811.up.360-kees@kernel.org > Signed-off-by: Paolo Abeni > > > Thanks and greetings! > > Daniel Díaz > daniel.diaz@linaro.org