From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-f196.google.com (mail-vk1-f196.google.com [209.85.221.196]) by dpdk.org (Postfix) with ESMTP id 35CD41DBD for ; Sun, 24 Mar 2019 19:01:40 +0100 (CET) Received: by mail-vk1-f196.google.com with SMTP id j195so1473416vkj.9 for ; Sun, 24 Mar 2019 11:01: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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f5J/cuSS4T9B481kgPUFNcVMf71DWQn0nqfHvDFMNPE=; b=a5UDHwsZgwPGwOrU8G80Upwq4JualgfR/QeNbEHGXJj55alHDv1PaEN9d4gZbQKK5P PpVybx2v6d4t3H8KhaPHfQHe3gE/dBpi48IwWCoGkjC6iUqdgtPeg+JPhq7V2i6bWXm4 XKoK0z0Yb9pJGg2vGACVQRk8x2qfbt2l1OxV0W3rP8Jw43n/KEfXP6WSR2x7V2tnz9Pb W7qMAHX3fdULDUVA24jaKO5Ynhiktzh0mQ3Ge77MCX2XNZrjCGnB3p1RzikPhcsvzYsm bjIRzm/4SvvzqGSfpRDcaxp2Qb3s6A5JyxoasSgiQ8DmtfrItwD7tCa6gtH9QvCh88aD RlYw== X-Gm-Message-State: APjAAAWDkcTg/zt2rm5QOZkDbRlJhYJ6hDz5tGKattRR18Qdmvu/QWEf YOWfeNXbgkxIb2OL8HP10Pgp9GL6p7UPn0Zq31tHFA== X-Google-Smtp-Source: APXvYqzlmJIAs4hdsHA7pYplH4s3GJ7hsEv5q3Uw7BccFspyWFyM6hDKjygvoWJsCFNV+a+80QsfxRgHJd9PnF0Wr5k= X-Received: by 2002:a1f:c06:: with SMTP id 6mr4428689vkm.52.1553450499463; Sun, 24 Mar 2019 11:01:39 -0700 (PDT) MIME-Version: 1.0 References: <1553200094-5487-1-git-send-email-david.marchand@redhat.com> <1553200094-5487-2-git-send-email-david.marchand@redhat.com> <615b76a3-ea73-19b7-c1b2-9ee1862473a6@gmail.com> <8eb07dc9-0640-66bd-22aa-e8518d449e97@gmail.com> In-Reply-To: <8eb07dc9-0640-66bd-22aa-e8518d449e97@gmail.com> From: David Marchand Date: Sun, 24 Mar 2019 19:01:28 +0100 Message-ID: To: Chas Williams <3chas3@gmail.com> Cc: dev , "Yigit, Ferruh" , chas3@att.com, "Zhaohui (zhaohui, Polestar)" , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 2/2] net/bonding: fix oob access in "other" aggregator modes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 18:01:40 -0000 On Sun, Mar 24, 2019 at 6:24 PM Chas Williams <3chas3@gmail.com> wrote: > On 3/24/19 1:11 PM, David Marchand wrote: > > On Sun, Mar 24, 2019 at 2:35 PM Chas Williams <3chas3@gmail.com > > > wrote: > > > > Have you ever experienced this problem in practice? I ask because I > am > > considering some fixes that would limit the number of slaves to a > more > > reasonable number (and reduce the over stack usage of the bonding > > driver > > in general). > > > > > > Not too hard to reproduce, the problem is not the number of slaves. > > With a default RTE_MAX_ETHPORTS at 32, any slave whose portid >= 8 would > > trigger an oob access. > Err... Well I have a lot of questions then about this whole thing. What > is max_index() doing? > > mode_count_id = max_index(agg_count, slaves_count); > > It's indexing up to slaves_count, which is likely to be somewhere around > 2. agg_count() is indexed by the port id. It's likely agg_count was > intended to be indexed by the slave index and not the port id. > Good point, it is likely that this whole code is not working at all... I did not go far enough to test/verify this part functionally. -- David Marchand From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 8989DA05D3 for ; Sun, 24 Mar 2019 19:01:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71A441DBD; Sun, 24 Mar 2019 19:01:41 +0100 (CET) Received: from mail-vk1-f196.google.com (mail-vk1-f196.google.com [209.85.221.196]) by dpdk.org (Postfix) with ESMTP id 35CD41DBD for ; Sun, 24 Mar 2019 19:01:40 +0100 (CET) Received: by mail-vk1-f196.google.com with SMTP id j195so1473416vkj.9 for ; Sun, 24 Mar 2019 11:01: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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f5J/cuSS4T9B481kgPUFNcVMf71DWQn0nqfHvDFMNPE=; b=a5UDHwsZgwPGwOrU8G80Upwq4JualgfR/QeNbEHGXJj55alHDv1PaEN9d4gZbQKK5P PpVybx2v6d4t3H8KhaPHfQHe3gE/dBpi48IwWCoGkjC6iUqdgtPeg+JPhq7V2i6bWXm4 XKoK0z0Yb9pJGg2vGACVQRk8x2qfbt2l1OxV0W3rP8Jw43n/KEfXP6WSR2x7V2tnz9Pb W7qMAHX3fdULDUVA24jaKO5Ynhiktzh0mQ3Ge77MCX2XNZrjCGnB3p1RzikPhcsvzYsm bjIRzm/4SvvzqGSfpRDcaxp2Qb3s6A5JyxoasSgiQ8DmtfrItwD7tCa6gtH9QvCh88aD RlYw== X-Gm-Message-State: APjAAAWDkcTg/zt2rm5QOZkDbRlJhYJ6hDz5tGKattRR18Qdmvu/QWEf YOWfeNXbgkxIb2OL8HP10Pgp9GL6p7UPn0Zq31tHFA== X-Google-Smtp-Source: APXvYqzlmJIAs4hdsHA7pYplH4s3GJ7hsEv5q3Uw7BccFspyWFyM6hDKjygvoWJsCFNV+a+80QsfxRgHJd9PnF0Wr5k= X-Received: by 2002:a1f:c06:: with SMTP id 6mr4428689vkm.52.1553450499463; Sun, 24 Mar 2019 11:01:39 -0700 (PDT) MIME-Version: 1.0 References: <1553200094-5487-1-git-send-email-david.marchand@redhat.com> <1553200094-5487-2-git-send-email-david.marchand@redhat.com> <615b76a3-ea73-19b7-c1b2-9ee1862473a6@gmail.com> <8eb07dc9-0640-66bd-22aa-e8518d449e97@gmail.com> In-Reply-To: <8eb07dc9-0640-66bd-22aa-e8518d449e97@gmail.com> From: David Marchand Date: Sun, 24 Mar 2019 19:01:28 +0100 Message-ID: To: Chas Williams <3chas3@gmail.com> Cc: dev , "Yigit, Ferruh" , chas3@att.com, "Zhaohui (zhaohui, Polestar)" , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 2/2] net/bonding: fix oob access in "other" aggregator modes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190324180128.wOy3Nuu-ARwmUQVfAdUrJM6mgaiRMctvi-PokzgdNms@z> On Sun, Mar 24, 2019 at 6:24 PM Chas Williams <3chas3@gmail.com> wrote: > On 3/24/19 1:11 PM, David Marchand wrote: > > On Sun, Mar 24, 2019 at 2:35 PM Chas Williams <3chas3@gmail.com > > > wrote: > > > > Have you ever experienced this problem in practice? I ask because I > am > > considering some fixes that would limit the number of slaves to a > more > > reasonable number (and reduce the over stack usage of the bonding > > driver > > in general). > > > > > > Not too hard to reproduce, the problem is not the number of slaves. > > With a default RTE_MAX_ETHPORTS at 32, any slave whose portid >= 8 would > > trigger an oob access. > Err... Well I have a lot of questions then about this whole thing. What > is max_index() doing? > > mode_count_id = max_index(agg_count, slaves_count); > > It's indexing up to slaves_count, which is likely to be somewhere around > 2. agg_count() is indexed by the port id. It's likely agg_count was > intended to be indexed by the slave index and not the port id. > Good point, it is likely that this whole code is not working at all... I did not go far enough to test/verify this part functionally. -- David Marchand