Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5213696rwd; Tue, 23 May 2023 20:58:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5PxdV9JdY+SsudORap0QGktfE5dsMAUppvr5IJMJBqdvMSeiShgPUMHzbRWddyDR340wxS X-Received: by 2002:a17:90a:6444:b0:255:99c0:9f2 with SMTP id y4-20020a17090a644400b0025599c009f2mr4844922pjm.1.1684900713533; Tue, 23 May 2023 20:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684900713; cv=none; d=google.com; s=arc-20160816; b=JDgWXdFQiscQvgiGarXHlwxCfI5wpL6p2p7MXkv06EGOEUQKRSfvhIKOV/w3jAar5M z4zjj2nJqkKskhcl0EVpNp/z9lsOYmQhUGTshOagaf+Am4Q0N81hiTssVV8cJfdX7n0o gLA6w96LJnLRxiDN86n2YS7YI/tuJU7nOgET0g7d1IFyAXfuJgJ2qEOlw1GDX8vkIzm8 ZnG93LzfHwjPHOwvsgIVB3+D7ETJysKQU9ayw/4SGm7wc7SE4e3LJ1V/CZNQALd4eazh RKwOmmmpiGuell8t0A/3Z31mq7xW8CcCGotX/LlgVgvT/Bi/Z8/7/85/tvT8kU/ksWum ZcYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=eERsr2KIMKuXdu39RaY5MYbtRVFOF/NWR6LanLsqRiE=; b=FrEK0xBUg+4Qjr2V1jU6qc4VenzDCmJeNaykxBB0/455hQ4syD6M0p7o2Bjpr47fby k8ER0wF8aLe5oa1JvBHHiZ/pqe76qYfyQIE84DyKM2Q1ppDLLYDB5/pmyezC3wNRoGpq Ibi7rgnTpJ4bLBpLJQ0altYoIgef12I+sEbu95qkHLXwDFRt+qeVklIoirA5A2UGvkei 90T2krxtUskmQv2xnAnKG7OW3IxQli10B7W/2cQw4Vssg43JxqgFj1p/mzZsvnxRi7BG NPK+vnKDx1xvsuC/3R3TsO2miJDUxaC0ipQNy/rx3qAQrL7MBLgpShu0kwvik1VxIaZ4 oJvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oX1i/2BM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 26-20020a17090a191a00b00232f57260c1si590686pjg.1.2023.05.23.20.58.19; Tue, 23 May 2023 20:58:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oX1i/2BM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239375AbjEXDqh (ORCPT + 99 others); Tue, 23 May 2023 23:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239396AbjEXDqD (ORCPT ); Tue, 23 May 2023 23:46:03 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECD561BD for ; Tue, 23 May 2023 20:45:47 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-64d577071a6so397105b3a.1 for ; Tue, 23 May 2023 20:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684899947; x=1687491947; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=eERsr2KIMKuXdu39RaY5MYbtRVFOF/NWR6LanLsqRiE=; b=oX1i/2BM+POPpgU0H7rR2FA3xezK1PV62m0gmR8X7cDypxDgrcNm6y1hN2L7xe0Iyt 1mqpUUfU5wVY2ct7zwN0337V84n335jWKfp/fLGAae/GVQX9d8VHopDXSbyc+VR1Aw1J 9Ln+3f/S210eHii1JUTImMdQcMguXXxjCOJMG/os9DxbKxZoC3hCKTQnLCF93Q1iaQ2d av0h8BHHGKbrBu5ciEaKli2LNHRY7yFVTfPWjAoQjfyG42IfpEaak2hpBJvurKUqdl4x ITXpwstImNpqzIKZSk8wc9OYgBtYSk1nlvLmy+qLuTu2DYOqJGPDLsbxqqKtB6I35i6L mLtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684899947; x=1687491947; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eERsr2KIMKuXdu39RaY5MYbtRVFOF/NWR6LanLsqRiE=; b=O5V51ZQ+6QtbUZr2vN1wHaAcrW8U7x9jY4tYMoJl0R90vzUTxx+vPOBn6YhxDfcw3n Jz2eiDJSKCY17Majjea/b8fQGBL8lqpmO0fTH/H9tPYmJ+4h1rri3vg3u9gj39Qsd2dt RfGh+2LAX4B6AEdWpZ+yErn/hG4rF2lKAniUBhQMNGZyBWOmNfr/6Gy2CKjSCEptJpwl Ma1rtExSORHHw50UwPlu/7xK218XvACfVPhR9YP/wweBSUVSw2D34v844ZVOu2XOoxer fSCcvYf46BXFx1+QAgeuv7g3Bhg2agJ3f+v16UzfmV44krS6QQ/6v/FwrPqtQRvb9Y65 RqGw== X-Gm-Message-State: AC+VfDzwRPiXzDaWcW42MiYsA7gPArTD6DpBzVBC53BWVWUh061qjcX3 7YuIzCRvmiPn+NO+iL2kjPci86fo2nC61koBlNc9Cw== X-Received: by 2002:a05:6a21:788f:b0:10b:58f1:7a6f with SMTP id bf15-20020a056a21788f00b0010b58f17a6fmr11464439pzc.41.1684899947297; Tue, 23 May 2023 20:45:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?RGFuaWVsIETDrWF6?= Date: Tue, 23 May 2023 21:45:36 -0600 Message-ID: Subject: Re: Stable backport request: skbuff: Proactively round up to kmalloc bucket size To: Nick Desaulniers Cc: Greg Kroah-Hartman , Sasha Levin , linux- stable , open list , Kees Cook , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:NETWORKING [GENERAL]" , rientjes@google.com, vbabka@suse.cz, Sumit Semwal , clang-built-linux Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On Mon, 22 May 2023 at 12:37, Nick Desaulniers wr= ote: > > On Mon, May 22, 2023 at 11:24=E2=80=AFAM Daniel D=C3=ADaz 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 > > Does android's gki_defconfig fail to boot on the `android14-6.1` > branch of https://android.googlesource.com/kernel/common? > > (i.e. downstream branch from linux stable's linux-6.1.y)? > > We just ran CI successfully on that branch 10 hours ago. > https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/5= 042504560/jobs/9045030265 > > Do you have more information on the observed boot failure? (panic splat?) Apologies if it sounded like we were trying to boot an Android kernel. Let me clarify: We're booting v6.1.29 from linux-stable/linux-6.1.y. This is what we get under Qemu-arm64 for v6.1.29 with Clang 16: -----8<----- Unexpected kernel BRK exception at EL1 Internal error: BRK handler: 00000000f2000001 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.29 #1 Hardware name: linux,dummy-virt (DT) pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=3D--) pc : pskb_expand_head+0x448/0x480 lr : pskb_expand_head+0x13c/0x480 sp : ffff80000802b850 x29: ffff80000802b860 x28: 00000000000002c0 x27: 0000000000000ec0 x26: ffff0000c02c8ec0 x25: ffff0000c02c8000 x24: 00000000000128c0 x23: ffff0000c030e800 x22: ffff0000c030e800 x21: 0000000000000240 x20: 0000000000000000 x19: ffff0000c085e900 x18: ffff800008021068 x17: 00000000ad6b63b6 x16: 00000000ad6b63b6 x15: 0001001c00070038 x14: 0000000c00020008 x13: 00882cc00000ffff x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000001 x8 : ffff0000c030eac0 x7 : 0000000000000000 x6 : 0000000000000000 x5 : ffff0000c030eaf0 x4 : ffff0000ff7abd10 x3 : 0000000000001740 x2 : ffff0000c02c8000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: pskb_expand_head+0x448/0x480 netlink_trim+0xa0/0xc8 netlink_broadcast+0x54/0x764 genl_ctrl_event+0x21c/0x37c genl_register_family+0x628/0x708 thermal_netlink_init+0x28/0x3c thermal_init+0x28/0xec do_one_initcall+0xfc/0x358 do_initcall_level+0xd8/0x1b4 do_initcalls+0x64/0xa8 do_basic_setup+0x2c/0x3c kernel_init_freeable+0x118/0x198 kernel_init+0x30/0x1c0 ret_from_fork+0x10/0x20 Code: f9406679 38776b28 3707eba8 17ffff67 (d4200020) ---[ end trace 0000000000000000 ]--- Kernel panic - not syncing: BRK handler: Fatal exception SMP: stopping secondary CPUs ----->8----- Here's a link to that test, with all artifacts: https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/daniel/tests/2QA2CVTT= vG6KZETMUyZCNgS8koR This can be reproduced locally via Tuxrun: -----8<----- #pip3 install -U tuxrun tuxrun --runtime podman \ --device qemu-arm64 \ --image docker.io/lavasoftware/lava-dispatcher:2023.01.0020.gc1598238f \ --boot-args rw \ --kernel https://storage.tuxsuite.com/public/linaro/daniel/builds/2QA2CHQ= UpqKe27FyMZrBNILVwXi/Image.gz \ --modules https://storage.tuxsuite.com/public/linaro/daniel/builds/2QA2CH= QUpqKe27FyMZrBNILVwXi/modules.tar.xz \ --rootfs https://storage.tuxboot.com/debian/bookworm/arm64/rootfs.ext4.xz ----->8----- This is vanilla v6.1.29 with no extra patches, just this kernel configurati= on: https://storage.tuxsuite.com/public/linaro/daniel/builds/2QA2CHQUpqKe27Fy= MZrBNILVwXi/config Greetings! Daniel D=C3=ADaz daniel.diaz@linaro.org > > extras) on Arm64 and test it under Qemu-arm64, but it fails to boot. > > Bisection has pointed here. > > > > 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 si= ze, > > 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 com= mit > > 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/20221021= 234713.you.031-kees@kernel.org/ > > Signed-off-by: Kees Cook > > Link: https://lore.kernel.org/r/20221025223811.up.360-kees@kernel.o= rg > > Signed-off-by: Paolo Abeni > > > > > > Thanks and greetings! > > > > Daniel D=C3=ADaz > > daniel.diaz@linaro.org > > > > -- > Thanks, > ~Nick Desaulniers