Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22140647rwd; Fri, 30 Jun 2023 04:34:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlHg8aG//HbnHiNTF+mpATb6gGF8rHBCJFNvKsbpWc3hlj6bS8w6y1tNjS9B4md8wjlCtBFA X-Received: by 2002:a05:6e02:924:b0:345:8a74:761b with SMTP id o4-20020a056e02092400b003458a74761bmr2421582ilt.1.1688124848455; Fri, 30 Jun 2023 04:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688124848; cv=none; d=google.com; s=arc-20160816; b=pVKfZganLyY/ypZNlZBIyQLk3icc/If7A3Ya6YXmAoOQO9Nec8Q2zs7zBL/cOXXtN2 LrV1oIFvCJ1eFJB3ZOJ484aWY7Whn+dj1qH4HBUgkisCWRAQ7F3igaomiXULU7j6NavB y+36BGm8eoVN90/a7NEsmMlIHsrN/0JpWGtiIB0WuoOqV9rQbNCRCrUSRCdHc8P8T4IV 1ei0CIxjJ8HHYIJxRLxEzyScTAPnzHWJtdrsa89p9x8f7FdRtIkdkVD7lnJXZe/d+Y1q +Pyuae7l3MFPVYnngz25QX2mhvgi7yf/32/gR+Gl2VUErjtMFkY9DfGn6xxqCzAZfSjr g5Eg== 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=LBu5cobzaIIszKw8PqMrQerCBUrk/84QgCZoRtB7nuY=; fh=iFYAKGokALX0moFbOria4Zw/9oEFb6iZ9pzunP9nraU=; b=d9yb+hVnnZ63BiOY7r3A1XRYKOYMbKFvNL6fPs6+ZaRe4x6J8QqMoRSVn4l1VWUnZC +qz5H/+H+/pW/RdLUdf2wwYy9+8/prXGvdNkK0QMnXD+QMg0yAcTCtQ7ww8HbvcQtYwp bHjuQU/5pC9aVsPdFMhyq12vf2zros7mSbhRN+Yzex+hY7qHfl95lj+jrqmX/XLT1G1U sDYws4MrN0Fz+f56rcYDYl5Ry9VzxsNqsINB1sfCHCu13DxW8QMreDC9+7l/9kPFJ5E5 S5jybJYtgVbbf7sKw3eknPiEbXwMOP9GdTIn+7XecGF0D/vi3nGzPidyJj7XFkoSXPid 9sUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=RtCKK2KA; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a635c0a000000b0053f25f2d32csi12112780pgb.840.2023.06.30.04.33.46; Fri, 30 Jun 2023 04:34:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@google.com header.s=20221208 header.b=RtCKK2KA; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbjF3LZA (ORCPT + 99 others); Fri, 30 Jun 2023 07:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232900AbjF3LYp (ORCPT ); Fri, 30 Jun 2023 07:24:45 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDDBD3C0C for ; Fri, 30 Jun 2023 04:24:36 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-4007b5bafceso175541cf.1 for ; Fri, 30 Jun 2023 04:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688124276; x=1690716276; 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=LBu5cobzaIIszKw8PqMrQerCBUrk/84QgCZoRtB7nuY=; b=RtCKK2KAlY4OiHyya1PKFV7l1X2zYZHbimqrltg18ADEf1ZdE/PLPOYB2MfXak5S/k D4OnrURRksMi6do7vybc7BYwSCuNPIeJXtNdkJ0cTtGzKkAFIicaNQo+FFxCrnE12PvN LMOAf67h7774RElPLckuFpWfzGYzWn+8yw+QBezBjeROmysL9vDk97lYIrgSxQG4+f3M 5i1OBqqUraItBxjbD/sChSaPjE6kVDpQRBoX2t7f5w5yl44hCWPts2sLNcB/NP+4lpzD wACB/oEcDAormIAtKcZePVU4PryvwLx5tiT8+cuTTohXMSfRNiO3R+4fRNk4Rf0oGfPg ky+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688124276; x=1690716276; 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=LBu5cobzaIIszKw8PqMrQerCBUrk/84QgCZoRtB7nuY=; b=NsSFrJgFm3UtLPkMghjy8rgh2bieoFdilGGinMOUKsZOQNHf31u6hFsN7ONMfJ6fLq OuiRx/R8IhyRFDIEJJb3gedtzAQBu/gCl3NIPOEHg7UAO3pe1lZBtmLXypN3YXpegumq gdTOwE5xFM8H8L1tf+uMVD9pRJOhx3r86N3ZNMh+qwYO+CyUFNXKlnC/dZcJxqMmWNvG k9Uj3YJHIL91wqLYNV/60bXpzKbyE8Xb6sQIHHCB+48oW/5V7XEiuLpBhAc4EndGBZHj PVZZjm6fJA4zLcDeVoCwGn6bN6vrNgszI1TcqlqPijn7L8gIVaSzB6Nvkj0CmPQt3Hcy ifaQ== X-Gm-Message-State: AC+VfDwT2haV8TFOFbL9khhb2+jzmCO25WeNpqgb5x7heVcM0/boaVus 2G3KcL1FxZQdtwaHpTYMUhKxrxJHrYimCZjUcW9hEA== X-Received: by 2002:ac8:5882:0:b0:3ef:4319:c6c5 with SMTP id t2-20020ac85882000000b003ef4319c6c5mr611889qta.19.1688124275638; Fri, 30 Jun 2023 04:24:35 -0700 (PDT) MIME-Version: 1.0 References: <0000000000008a7ae505aef61db1@google.com> <20200911170150.GA889@sol.localdomain> <59e1d5c0-aedb-7b5b-f37f-0c20185d7e9b@I-love.SAKURA.ne.jp> In-Reply-To: From: Eric Dumazet Date: Fri, 30 Jun 2023 13:24:23 +0200 Message-ID: Subject: Re: [PATCH] net: tls: enable __GFP_ZERO upon tls_init() To: Tetsuo Handa Cc: Ard Biesheuvel , Alexander Potapenko , Boris Pismenny , John Fastabend , Jakub Kicinski , herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org, syzkaller-bugs@googlegroups.com, syzbot , Eric Biggers , Aviad Yehezkel , Daniel Borkmann , netdev@vger.kernel.org, "David S. Miller" , Paolo Abeni Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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-crypto@vger.kernel.org On Fri, Jun 30, 2023 at 1:11=E2=80=AFPM Tetsuo Handa wrote: > > On 2023/06/30 19:18, Ard Biesheuvel wrote: > > On Fri, 30 Jun 2023 at 12:11, Alexander Potapenko w= rote: > >> > >> On Fri, Jun 30, 2023 at 12:02=E2=80=AFPM Ard Biesheuvel wrote: > >>> > >>> On Fri, 30 Jun 2023 at 11:53, Tetsuo Handa > >>> wrote: > >>>> > >>>> On 2023/06/30 18:36, Ard Biesheuvel wrote: > >>>>> Why are you sending this now? > >>>> > >>>> Just because this is currently top crasher and I can reproduce local= ly. > >>>> > >>>>> Do you have a reproducer for this issue? > >>>> > >>>> Yes. https://syzkaller.appspot.com/text?tag=3DReproC&x=3D12931621900= 000 works. > >>>> > >>> > >>> Could you please share your kernel config and the resulting kernel lo= g > >>> when running the reproducer? I'll try to reproduce locally as well, > >>> and see if I can figure out what is going on in the crypto layer > >> > >> The config together with the repro is available at > >> https://syzkaller.appspot.com/bug?extid=3D828dfc12440b4f6f305d, see th= e > >> latest row of the "Crashes" table that contains a C repro. > > Kernel is commit e6bc8833d80f of https://github.com/google/kmsan/commits/= master . > Config is available in the dashboard page, but a smaller one is available= at > https://I-love.SAKURA.ne.jp/tmp/config-6.4.0-rc7-kmsan . > > I'm using a debug printk() patch shown below. > Please note that your patch is not correct, unless I am missing something. sk_page_frag() will use a per-thread frag allocator (current->task_frag), which might be fed with pages allocated from other sockets (standard TCP ones), without __GFP_ZERO. If we must (and I am not saying we should) take this route, we also need to force "sk->sk_use_task_frag =3D false" for TLS sockets.