From nobody Wed Nov 19 08:22:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615314468; cv=none; d=zohomail.com; s=zohoarc; b=gSXjYchL1YA14J6p4zFKiKFhftXK7jL1TEzH9vpkJ8v8P+nkBkb+BW72UA7XkPDl4zVakhGylRcFkcCk6jARq60WbwB/8djx6VvaqpYrrsn2k2c0909LUeNwnSNTJ95aE8V/scjbnyHMud6565pGvguuGgC2Wh9UnnmVVyTbM34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615314468; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=6Q1w6fXMkJ/+WaYRHjG7T+TBBkT12mVGuAnMjp1JEOk=; b=nLjurFGL7KpCrFTfQjlR2nVwB+kKHgoRSpbHn7sPNgX3UDKJIao9k5IKxNLcsbDyHDmYHdZr8XpQ+84jhRTaLymy74XYDx9OP5qeodcoFhBdPSvs3QCB10rgUytITHMe8kMWotBkCkTCGq9N92W8OJkzLb9Vnmpu4R9d71QBY1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1615314468626132.60057510337185; Tue, 9 Mar 2021 10:27:48 -0800 (PST) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-11-M3u7etteOHCs9Xj1xi75Tw-1; Tue, 09 Mar 2021 13:27:46 -0500 Received: by mail-ej1-f70.google.com with SMTP id li22so1511487ejb.18 for ; Tue, 09 Mar 2021 10:27:45 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id bx24sm9035103ejc.88.2021.03.09.10.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 10:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615314467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6Q1w6fXMkJ/+WaYRHjG7T+TBBkT12mVGuAnMjp1JEOk=; b=fOtKtDyKPvMH4maA7/DcVJO60og+qNKlm9Su8HwSlNXp4h0dkuss4O9kGMScGCGX+hNSnX WGCBTSZG9W3h8ZJlTnR2VXbH5pbShV4TiBgCp5tzzwL0xsSKFqqTxtMFiba7KCUgjBgfzg UIlJaXmGwNWiqXKgRLjQfz/fVgfx6M8= X-MC-Unique: M3u7etteOHCs9Xj1xi75Tw-1 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6Q1w6fXMkJ/+WaYRHjG7T+TBBkT12mVGuAnMjp1JEOk=; b=KccdMDNuckZ6N0ps+gBiASN77Q8F77g1h6MgvrZTejPZNTUc/9w8HdHGosZ/ASlvrV iS5FczLvo4K3XnWpc4aMIvKCnNVTAygL7ZoQsgfe7sDIMvga2mfBoAKls3CfKhF1Zz7h ZmzlyyIkVp3UmV70ffe9YUR0MpSX5JjkRlxCjSyItnIvFnypEfvDVftMSZzFJUSaV7aw PhcayUc2/UdhaMtv1HZmNSM0nNWGEtDVnuQqUqJ1pWyEVgdBromDUoZUWkXF4U95G1IQ 67kAP3S5byH7YPDTze07aYlBUTgsb/nXvPffMnG60t89eJtXKiQ18TuB8OpJi97NtPa2 YpeA== X-Gm-Message-State: AOAM533qpKeYI1CvBm4KE5No3rTBUUhBbtj6XHKMSf4675AAU0hcQv/g 5iUSPbv/TiRA0hfPxPrqKf65KH7Dg7H2mFTAuhkrfNXPEw/iBrqudd6v3iGIkNDS8dY4hpP5ooI y33Ni0TOR6eooGw== X-Received: by 2002:a17:906:c081:: with SMTP id f1mr21920802ejz.97.1615314464764; Tue, 09 Mar 2021 10:27:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwT1UTXtzRJxP4PcxxMs61k9mYR2n7eXb2zmrVAYDGW155JhoUC3xQdUt4/pJ8e1T+PYvp7qw== X-Received: by 2002:a17:906:c081:: with SMTP id f1mr21920775ejz.97.1615314464574; Tue, 09 Mar 2021 10:27:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Dmitry Fleytman , Miroslav Rezanina , Li Qiang , Paolo Bonzini , Jason Wang , Thomas Huth , Alexander Bulekov , Stefano Garzarella , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v4 5/6] net/eth: Remove now useless size check Date: Tue, 9 Mar 2021 19:27:08 +0100 Message-Id: <20210309182709.810955-6-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210309182709.810955-1-philmd@redhat.com> References: <20210309182709.810955-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) In the previous commit we checked there is enough room for a ip6_ext_hdr_routing in the buffer. The ip6_ext_hdr_routing structure starts with a ip6_ext_hdr, so we already checked that input_size is big enough for a ip6_ext_hdr :) Remove that now useless check. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- net/eth.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/eth.c b/net/eth.c index f0c8dfe8df7..e984edcfb0b 100644 --- a/net/eth.c +++ b/net/eth.c @@ -416,10 +416,6 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int = pkt_frags, if ((rthdr->rtype =3D=3D 2) && (rthdr->segleft =3D=3D 1)) { size_t bytes_read; =20 - if (input_size < ext_hdr_offset + sizeof(*ext_hdr)) { - return false; - } - bytes_read =3D iov_to_buf(pkt, pkt_frags, ext_hdr_offset + sizeof(*ext_hdr), dst_addr, sizeof(*dst_addr)); --=20 2.26.2