Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3655459rdb; Wed, 27 Dec 2023 15:22:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYzyPSJm8BOaLuR6Yd1fWWQULZYkj2Pg1FWUlQ/d2MREwJOVEX4PKSW2A5rXIV5pom4zZS X-Received: by 2002:a05:6e02:194a:b0:35d:5615:9f96 with SMTP id x10-20020a056e02194a00b0035d56159f96mr20711508ilu.29.1703719324593; Wed, 27 Dec 2023 15:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703719324; cv=none; d=google.com; s=arc-20160816; b=vjxPLP/2hcgACLnzyejAJqXENksQOOyGcmkrdqeOrl/abccBvrAp7SwB5rKgsYI9Y7 dlT8jijpWqVNLyvEcmhb8a1fV12MvtgR58nXtLcrE2gL4mSvkLzKBba786q+8+bqaHr5 uRQsFt5QwNWTCkk0FJYo6PVhJXh8pL40IFXMXjNvwTGq2DJ6hHLNrPKu24MOgE2Ps876 cQnwu2cflGUDNhbklrRl3owPV2W9hz37w+OTeECh15IdzLPsDZf9/gKIOAm2nZcAb5OP 9KOvhnCsO0MvcndB4rw76BVPaEZ98/V62enNuVCiQY4XwdjhmPGhxnjLDjNSG7tbTv6q MaXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=swUUhVhGR84IN8e7Uhazo2gmUEhU/6ZIWjlBrcgxqH4=; fh=VUrkiG7JLJEYXpxMeajo5ADQewr/4wDFVrmyUcnSsfI=; b=nb1/L0Q65VQyYxZoNpnESpxnmNZ1EGMj5ESWNyL5BvuDJDiRXmC/JGp5s5lenlFsgK 1KOpqmcZ9PZRzYD3SV7k7RaIfBYpgd0DxPrYrPUsL07uwjIeMARtIh7ASjqO2CLcvhW4 a4TqSnLqtx6Z4BQj4qZCGIfAuXfGirrZnxUo0ABND4z6NRHz9AL6GWPuayVKmIX9RKHN +WoegIzjbQMeX818tcvaDvj/bbEfrzTYgiDOFJJqTlnoCOYwXt1WY+9VXR6Tmb/aChb9 8OrPzucIbx/mly14DxY1N5B9BYm1OaTRgJu9jMRtLFA7GtbHOkwAUSREC5gKyfGuzrbf maYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ykmhsx0P; spf=pass (google.com: domain of linux-kernel+bounces-12306-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ju19-20020a170903429300b001d3ec96857asi11584422plb.85.2023.12.27.15.22.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 15:22:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12306-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=@gmail.com header.s=20230601 header.b=Ykmhsx0P; spf=pass (google.com: domain of linux-kernel+bounces-12306-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12306-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 D5385283C0B for ; Wed, 27 Dec 2023 23:22:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F9A8498B1; Wed, 27 Dec 2023 23:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ykmhsx0P" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (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 4A225495CA for ; Wed, 27 Dec 2023 23:21:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-f50.google.com with SMTP id ca18e2360f4ac-7ba84a3cc96so289139239f.3 for ; Wed, 27 Dec 2023 15:21:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703719316; x=1704324116; darn=vger.kernel.org; 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=swUUhVhGR84IN8e7Uhazo2gmUEhU/6ZIWjlBrcgxqH4=; b=Ykmhsx0PHF6394u+d6HBh7KmJsKsigOUFokSHMto8rBelL1y+ccQgLfiSpm+cXl0lZ W5bJbxZoYZ1/6lUzJA/TM21/ad8hrY1tTddqPFoZy0/vl0fp6W+By6ccES+HNS5St27U N9KCzGmSHyvkVKBU7KfbvkSPTpqfmTXXOaFOoQtVrLlwZNA5+Org/sR+sYwQHVIcstwB 2HjqVqoZEvreTjQapS6On6k1hzeL5dgMQjFkYzwwRpJRDYqWw3retHcJD5t0Ds14XTQw YgSrP++dttZnmA9areLMQyTZoq5wSTgcDEhn5eDr71D6eX/YR6YOpdiaFS63GRLAiahW QSrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703719316; x=1704324116; 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=swUUhVhGR84IN8e7Uhazo2gmUEhU/6ZIWjlBrcgxqH4=; b=mo5UIdyU0rONfBs15krK2imzyOweAvvMYEjVzYUc0HW/0vGlmICQrI+KiDp6TgoTqJ 3EP0C5Fonx8vfO17Ke2mjWpKMKfUWcl1r8VAW2Pzq/H6SUSFYAMYz10dF77J76oP9XIR +8Tf1l7mxpVzZf2a00RjBfJ8yD+ccqPJJiPIydaEC7pe7ucT2HBmDPzKvm4zE1eEHjH/ 8HyyC366cuFIWdLc+Ap2jClf8RdFFtl7hPtt7Kd8jhzA35JDO/yjY0I8KVhKe1r6QC35 mrYn45wB7YqKHfB6YqlEgmp+hYPywqD61g4Mv4lEpBCnT/N150g3r9jq+JjiyybYn8bX FzPg== X-Gm-Message-State: AOJu0YwCsYgyQnahJNFiZB+eRRAVIx1AweR2XdhQ/xqKvLloET2KzDlZ Nl7DG/a438eWGtnMluM4qJIf0+pbZOUcM9NX97Y= X-Received: by 2002:a6b:4f04:0:b0:7b7:ae3:442 with SMTP id d4-20020a6b4f04000000b007b70ae30442mr13877651iob.10.1703719316273; Wed, 27 Dec 2023 15:21:56 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231213-zswap-dstmem-v4-0-f228b059dd89@bytedance.com> <20231213-zswap-dstmem-v4-1-f228b059dd89@bytedance.com> <20231227125853.2dd07cd61f8a8df95042677c@linux-foundation.org> In-Reply-To: <20231227125853.2dd07cd61f8a8df95042677c@linux-foundation.org> From: Nhat Pham Date: Wed, 27 Dec 2023 15:21:45 -0800 Message-ID: Subject: Re: [PATCH v4 1/6] mm/zswap: change dstmem size to one page To: Andrew Morton Cc: Chengming Zhou , Barry Song <21cnbao@gmail.com>, Seth Jennings , Johannes Weiner , Vitaly Wool , Chris Li , Yosry Ahmed , Dan Streetman , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Chris Li Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 27, 2023 at 12:58=E2=80=AFPM Andrew Morton wrote: > > On Wed, 27 Dec 2023 14:11:06 +0800 Chengming Zhou wrote: > > > > i remember there was an over-compression case, that means the compre= ssed > > > data can be bigger than the source data. the similar thing is also do= ne in zram > > > drivers/block/zram/zcomp.c > > > > Right, there is a buffer overflow report[1] that I just +to you. > > What does "[1]" refer to? Is there a bug report about this series? I think Chengming was referring to this: https://lore.kernel.org/lkml/0000000000000b05cd060d6b5511@google.com/ Syzkaller/syzbot found an edge case where the page's "compressed" form was larger than one page, which tripped up the compression code (since we reduced the compression buffer size to 1 page here).