Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3038598ybe; Sun, 8 Sep 2019 05:58:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEYIB2XsT3l/XD0J1ib4ISkGxJGjjJRgm+ahBfl2dvCSPebInfoYgdJRVVwQeXC0KZGNoz X-Received: by 2002:a63:ff66:: with SMTP id s38mr17224609pgk.363.1567947511279; Sun, 08 Sep 2019 05:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947511; cv=none; d=google.com; s=arc-20160816; b=GCEfOwMD1sSERypHLx0WRrcFcb4yNzlI6jlwJ/I0lUOF+36KvExccsA9VK3mgi8Q9G sqTOORlWZ/G3vvjx5b8Xtw6N9yhZ5Cx6IYtcETDbqS8gCRAtOjrolgABP+wqLxUaU8wJ zGpOPrwIE+s9+7XgsV3LNIjMinoJJ6M5uSAe5mZzNSXHEbkyd2T8xoan9VQCNlXJ6Z1L KNkwV5L/upLPrReRTL4g22dBH8/UwICfSXx2rYnwN+XhVDNX0JVOG4RzcDHMk43qKP1O ecGfXFMgrOTpOW5xd2CBW+3UYuUyely1BZiNFuR+ubFRC7mx3euf4pSmEqHmmG3vJRCO truQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=eYFTiHf/XJXqQbMZlPea3bsAkOt7XEdKyhE6qPAWNsg=; b=SxqqxdfCeO+Q2at1lH1QT3Vet3fts40w+3+8JFelbLO8tcKBUjTC9RImJ2TcrYaW3m J5IcCj78Lr32pthSbi3BILC8O95Fo7ngfHhbjX+6Ycho4zB9R8yAfdO47LOeFyvbZYze ShvhH7wkXdctSLdJmq+rky9stypoasI3hLGjXt1X8gcdh3PhgbVNFP4QwCglDOzwo3Sw CMNMAqNapeidBCTIJ5PyGzhOrikwZYKy+SMFh2Fm0c0cSjWfhyHlvvhsFth1uOQjrG1E 8KScOacAU7eKAZu3q4JnMb/BTT/QtH5ohzS8bWU+FjBKC36hVyJx6AfPATRA701EOHUu zmdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si9990020ply.218.2019.09.08.05.58.16; Sun, 08 Sep 2019 05:58:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726876AbfIHIJl (ORCPT + 99 others); Sun, 8 Sep 2019 04:09:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36164 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbfIHIJl (ORCPT ); Sun, 8 Sep 2019 04:09:41 -0400 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B2399CA377 for ; Sun, 8 Sep 2019 08:09:40 +0000 (UTC) Received: by mail-ed1-f72.google.com with SMTP id ba12so1845359edb.17 for ; Sun, 08 Sep 2019 01:09:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=eYFTiHf/XJXqQbMZlPea3bsAkOt7XEdKyhE6qPAWNsg=; b=oP929dkZVw2Crq4rY8DTbEUCTiuhFLI2AFSfZmWohYY3BVvUm2qLbk28BFyWEmE4ji zwpTkwUMgNJ6Ajs9QFYrFUmowbirCu06iJLemDGSoYRG3/iD60vzT+JifGvQZMttwKdp Xonur42i4hSZzGpQ/m72kK2YpcnNYSHzPvAbJ9bcDIOOGeFxY2HSCdXyqqpduWife1xd 5uL4S6fCcYPDWe1/mKx1+mA8rexzLmbcaXlkNw5qQyZVe4lwepU8oKdxSxJPmtVa0UYH tT9sh1eSt0sGs9XyIP0Tq9+cGMqi7jaUtL7W3NGRg8rfB25acyuqWzGnY8oY6HDopG90 yUTw== X-Gm-Message-State: APjAAAVyZ4a5LfReXuLUC1sDfi/8QRNi2dmCsI+9j5biNbYMbVlwzAI1 AU/5U93KgxXF7/AssAevALJwF/F36TKR12CORkOAKSE1YKM2fXkw+tVEUszmpwfQ6Valzhp2X/e UK3VYR9HtGLGQnTntu5Ax4qkR X-Received: by 2002:a17:906:76c2:: with SMTP id q2mr1658968ejn.202.1567930179443; Sun, 08 Sep 2019 01:09:39 -0700 (PDT) X-Received: by 2002:a17:906:76c2:: with SMTP id q2mr1658943ejn.202.1567930179213; Sun, 08 Sep 2019 01:09:39 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id t22sm2339811edd.79.2019.09.08.01.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2019 01:09:38 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id C1050180615; Sun, 8 Sep 2019 09:09:36 +0100 (WEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Hillf Danton , syzbot Cc: alexei.starovoitov@gmail.com, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, davem@davemloft.net, hawk@kernel.org, jakub.kicinski@netronome.com, jbrouer@redhat.com, john.fastabend@gmail.com, kafai@fb.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, songliubraving@fb.com, syzkaller-bugs@googlegroups.com, yhs@fb.com Subject: Re: general protection fault in dev_map_hash_update_elem In-Reply-To: <20190908030726.7520-1-hdanton@sina.com> References: <20190908030726.7520-1-hdanton@sina.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Sun, 08 Sep 2019 09:09:36 +0100 Message-ID: <87v9u3w6nz.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hillf Danton writes: >> syzbot has found a reproducer for the following crash on Sat, 07 Sep 2019 18:59:06 -0700 >> >> HEAD commit: a2c11b03 kcm: use BPF_PROG_RUN >> git tree: bpf-next >> console output: https://syzkaller.appspot.com/x/log.txt?x=13d46ec1600000 >> kernel config: https://syzkaller.appspot.com/x/.config?x=cf0c85d15c20ade3 >> dashboard link: https://syzkaller.appspot.com/bug?extid=4e7a85b1432052e8d6f8 >> compiler: gcc (GCC) 9.0.0 20181231 (experimental) >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1220b2d1600000 >> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1360b26e600000 >> >> general protection fault: 0000 [#1] PREEMPT SMP KASAN >> CPU: 1 PID: 10210 Comm: syz-executor910 Not tainted 5.3.0-rc7+ #0 >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >> Google 01/01/2011 >> RIP: 0010:__write_once_size include/linux/compiler.h:226 [inline] >> RIP: 0010:__hlist_del include/linux/list.h:762 [inline] >> RIP: 0010:hlist_del_rcu include/linux/rculist.h:455 [inline] >> RIP: 0010:__dev_map_hash_update_elem kernel/bpf/devmap.c:668 [inline] >> RIP: 0010:dev_map_hash_update_elem+0x3c8/0x6e0 kernel/bpf/devmap.c:691 > > Fix commit 6f9d451ab1a3 ("xdp: Add devmap_hash map type for looking > up devices by hashed index") While this minimal patch does fix the bug (as Jesper already noted), I prefer to rework the logic instead of just repeating the lookup; a patch is on its way :) -Toke