Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp483127lqt; Mon, 18 Mar 2024 13:42:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdPtDiHu+yG1btprWgoepk1h02y9Amygose6GIq++f50kg326guHxQ8j5cuu4BL4VUF2mlyLhjTF1s6h7323j+i/NH5StHcz4p2r/diw== X-Google-Smtp-Source: AGHT+IH7IBnlHRJVktQcZbDPjjoQ0+Riuj+c0fgjSH+0EL6a+YcYpF20CjGuNeAGn/52I19m5Qka X-Received: by 2002:a05:6808:4487:b0:3c2:1881:f015 with SMTP id eq7-20020a056808448700b003c21881f015mr18122307oib.15.1710794556537; Mon, 18 Mar 2024 13:42:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710794556; cv=pass; d=google.com; s=arc-20160816; b=MR/xYx1J35yQshEreepXofROABzYtZgORhOw3eHmQSBrEPOV59Xpdl1qJ6tPv+8fwT Y47TxmUI32elukhU1VbSXGuLE9oshIRG5A+R3xfbpoF8tvAyalqMKruZX48cSwR8ptvy W7jhovSCG8CSyhYx/qAHJkjWz0aolR/Zruq50ElUXp3CDSFl0/vMQ+H30d0jcQRk/oI2 eS1s2PXQX7cQ4BClfEfi9PhWaRh29BUR9ZprQa5nVx+X6oq/jZqgidAavnRtqbMCO98H QNHnaz1SHas2Sk5Khr/lh2i+VpPKWoT/JhxS8yN5T7LyMehiURcTkDrFbd+CzKPIoLDq bUEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mOsqTDQ0hoCpx6NngOtwgMcIYvc2i1Le/r+OHK5eWY4=; fh=mV4vJXMHYw8d/eLzdLGiPH81iRDKS2qjzKBm7ckcyYc=; b=G8LqcCx/gvxXD2t/rouV/PhKwc/wvBD21IYT8IH6BPRGLuuIk0JJbmFSgu9FSz03Dx 9hF7eN8QA2wBYTV0qkFXZi1To/m30xsOo6eby36XNN1Gn98ztUb3hUKjZwMoh7lEmysW KhqtnrV2NRnIhhzkfQKzmAUx0wT64bOzYDDE/QL0/f39its4dqJ2zP3DAXigz5e9SQ0t 0nnUKMc63VmJUaKL3cm476tSupYn+TqrbtvNlUukx4lnd/KGAI0mLnfTVwviNrryzuDd qLu30E/MnTWW4HLziGoqNZ0JdsgNSLB8TB7ifrQg1Ae+w4L2DSAQhubmQz2/WFLcHhSJ 5iAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YAaOItsc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ee1-20020a05620a800100b00789e894bb12si8115253qkb.565.2024.03.18.13.42.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 13:42:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YAaOItsc; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106640-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2E5791C21785 for ; Mon, 18 Mar 2024 20:42:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E420058131; Mon, 18 Mar 2024 20:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YAaOItsc" Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) (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 BB8DE58101 for ; Mon, 18 Mar 2024 20:42:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710794550; cv=none; b=pTZRkahuzTUsPDAYBf+0hjRMf7/L9Vh0KvUd9wTDiLJr2foX9RcdWoOBaEwpzJRT0oIosLYoQJikoVzThNVQFj8hj/TntvX5hu/bA6K48Yve2O/0tPTX0zzd0caJTKthQJaEbVxR5IrNoKTVJxD0kOBnhcFLoyf2XXG+j5rj8XE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710794550; c=relaxed/simple; bh=0bBvFG2L1I0MqGSSWQyROx+p1tXb04MkJOQiiHHdpmo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gvSP/8lM5KP7g7Gqii60OIOy7kt103pFyCp54WEJv0ZrS2m3yPnzPtq3yD7NNbYhdwCuPfD3Nlfeq4UFXffk9WrDnmQe96s5jOUKipB0Zdn8zVtPbAM4o8cTB27UiQrRwto3kTuU5Xe6Unpq8rLwT09GLbO+ClHF2rW/ERkSTBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YAaOItsc; arc=none smtp.client-ip=209.85.214.170 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-pl1-f170.google.com with SMTP id d9443c01a7336-1dde26f7e1dso33918085ad.1 for ; Mon, 18 Mar 2024 13:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710794548; x=1711399348; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mOsqTDQ0hoCpx6NngOtwgMcIYvc2i1Le/r+OHK5eWY4=; b=YAaOItscB9IIniZQn8JEcqP9Mwwv3wLfn3laKtsB4LTVU4MmitvY/wnnhMmg2RDzVV /zSc7Hwy8HaS75NZEFguJ2NaF1Vcj41rjOkPAE7vsHra6toooiikcVr1ngfDivWBgSDs n/wflSU49yNhGHzyLnKN8oJFsi/8SSJzqc+HzFDXwuqlb9a059vdAxMwvjPj7sPTxbh1 hcI1cRGeG2GmgxOU1znrWI52DoZEU2DEpFvnvf3sgxr65l9WNL0fkG4AXsn9IStEIF6c LETdLuYRAeK6ObT3cYmJb0I0ePk5aRVIUOEYCwreooKccXFxkkrF9gQtGRZSrnlby6Q4 ZzQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710794548; x=1711399348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mOsqTDQ0hoCpx6NngOtwgMcIYvc2i1Le/r+OHK5eWY4=; b=MxuKtbivtc3vP2evG7ZLlavJHfW3G2yrSkDkRULcuufU01GVffQOeWycD1aP0ibHYr 62tuuT01BTiDiMIqlW8S4e4++FvlKLBZpPx5qhZ9HSm3cxWPTu7lHBOIy3IxUPHg2qZX akmgZ79tFARGQNZVbSQSAKefeok57Z+/Zlaef4cFb3CHu/t+YtywO1F48rARPzOk6kiK SPd/c6aw1U6Ad4yBJAY/DS+l8DhUF77iW8muAAMv3IqU64UFK6jB6iG36BKUk0thes8l XImCCy5geN19QmZ+zNscIUIMb9/FF0uLfeNmxDL+mp4vSZgRaNeqkzciNOfppA+Ng1gg 7IGQ== X-Forwarded-Encrypted: i=1; AJvYcCWRSsHpfZPTXlk+gLSwTkyjEArALA3GY6haiO4/ylJrhdJInYGiUeH+E6gL+C5CZvWRc7a0IY4mG2cIj5vzx8eI3og/HazGBeEQud2i X-Gm-Message-State: AOJu0YzGJAjYHLiLEQDrpZBC6z9MHZOoGXPX+R6lcHp6IyT4bS6ojywz M+pCNIUU0Sc9CRDmIVeYtsYLYsw/E1ZjTuU5uet6w4CCHsyC2QjN X-Received: by 2002:a17:902:ecc9:b0:1e0:3f65:f503 with SMTP id a9-20020a170902ecc900b001e03f65f503mr731769plh.39.1710794548027; Mon, 18 Mar 2024 13:42:28 -0700 (PDT) Received: from localhost.localdomain ([2407:7000:8942:5500:aaa1:59ff:fe57:eb97]) by smtp.gmail.com with ESMTPSA id e11-20020a170902784b00b001db579a146csm9927711pln.241.2024.03.18.13.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 13:42:27 -0700 (PDT) From: Barry Song <21cnbao@gmail.com> To: syzbot+adbc983a1588b7805de3@syzkaller.appspotmail.com Cc: akpm@linux-foundation.org, chengming.zhou@linux.dev, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, nphamcs@gmail.com, syzkaller-bugs@googlegroups.com, yosryahmed@google.com Subject: Re: [syzbot] [mm?] kernel BUG in sg_init_one Date: Tue, 19 Mar 2024 09:42:12 +1300 Message-Id: <20240318204212.36505-1-21cnbao@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <000000000000bbb3d80613f243a6@google.com> References: <000000000000bbb3d80613f243a6@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit > Hello, > > syzbot found the following issue on: > > HEAD commit: e5eb28f6d1af Merge tag 'mm-nonmm-stable-2024-03-14-09-36' .. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=13043abe180000 > kernel config: https://syzkaller.appspot.com/x/.config?x=19bb57c23dffc38e > dashboard link: https://syzkaller.appspot.com/bug?extid=adbc983a1588b7805de3 > compiler: arm-linux-gnueabi-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 > userspace arch: arm > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1706d231180000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ba7959180000 > > Downloadable assets: > disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/8ead8862021c/non_bootable_disk-e5eb28f6.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/0a7371c63ff2/vmlinux-e5eb28f6.xz > kernel image: https://storage.googleapis.com/syzbot-assets/7539441b4add/zImage-e5eb28f6.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+adbc983a1588b7805de3@syzkaller.appspotmail.com #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e5eb28f6d1afebed4bb7d740a797d0390bd3a357 diff --git a/mm/zswap.c b/mm/zswap.c index 9dec853647c8..47c0386caba2 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -1086,7 +1086,8 @@ static void zswap_decompress(struct zswap_entry *entry, struct page *page) zpool_unmap_handle(zpool, entry->handle); } - sg_init_one(&input, src, entry->length); + sg_init_table(&input, 1); + sg_set_page(&input, kmap_to_page(src), entry->length, offset_in_page(src)); sg_init_table(&output, 1); sg_set_page(&output, page, PAGE_SIZE, 0); acomp_request_set_params(acomp_ctx->req, &input, &output, entry->length, PAGE_SIZE);