From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF04D43BCD; Sat, 2 Mar 2024 21:56:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 902A043391; Sat, 2 Mar 2024 21:56:52 +0100 (CET) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by mails.dpdk.org (Postfix) with ESMTP id 8F70840271 for ; Sat, 2 Mar 2024 21:56:51 +0100 (CET) Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3c1e7a92a8eso212204b6e.1 for ; Sat, 02 Mar 2024 12:56:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709413011; x=1710017811; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=5oZHLjSMHS/ZkSh5VwtzVPFYccDMqZ4KBQMK966+KWE=; b=E8sYwUwQkzcMkpIp/InxyaWIIVxx6gFEta1eK4nWhO7bTPeF9IQv0Rq2G89CEc81pK cGQqjnZsL24G9wWQ0ELx1CJRWGjS5Jt+mIv9dYLLJ0G0EQ0sWM8DaCo8YlF/z3c2yVLm WMtTfbohctMrAD4c1a7Xr8Yeh7LO8nLy3tL2Cbt2LSD+yqVzZPBssPSRAftXikGbzxXp 2Fs9cnc3uiMRSN4B0G1LfQw6Q6wV/UOv8E7ZUkDIXK1Buh/zZF0de6nS/596wBJnVFuR ZgCb1yXPIGuVq2sT/4kZXjFfsGn1JUc8jwVCeck6d79LBxrYYYoxo/NsLrUNin6o1vOH L+ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709413011; x=1710017811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5oZHLjSMHS/ZkSh5VwtzVPFYccDMqZ4KBQMK966+KWE=; b=axLZxPHR3gvap1M12+BwIm9LZfcA+NZgjheZoGxa8A8YPzjP6lBE4Agib8dwZ2MHpf +3VbyyCjmKUZPdLrRUGSCG/13EpDt3+8i5lJVvWUkR6aUhDXVKNr7flGhCaovD9MstX3 4XuhWlaptwRAi96KNdKZUbOauKbDs8ORefWji6gmbN/o3g0ADpIQ+Cls0LBEOj9J4AH9 wETGPaz8tFIrojKRVwbs+TrOBsffw4IKq630+j+G0Jy+DkS3n8P40RFcHmoWeMFmeAPA 5b4HVi04VCbJpXLGN9TQAzgJnDIhfPpg4Eh5wGYpClwwQkNJJwFX/exm9rAICEWVSWrp mRww== X-Gm-Message-State: AOJu0YyrjDfSDTOJlLpQyGYM8USrvirTAx1fpcCnSVzuK3G5VcTeu8PK YNxApCST6/o0b+vgRDq+DQtPi7Vmt5jsA1BqkBvqWyByslPJA0nepztAyhk8KB20qn8OP1ttdQW M X-Google-Smtp-Source: AGHT+IGuUKgo/9qKy6j1ty2nlhnJ5PGicIuMBpiJuoClrxpwJOrdAaeYqnZ5LalIvyytpm3o/p3b/g== X-Received: by 2002:a05:6808:222a:b0:3c1:ac76:8848 with SMTP id bd42-20020a056808222a00b003c1ac768848mr6553395oib.17.1709413010827; Sat, 02 Mar 2024 12:56:50 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id rj10-20020a17090b3e8a00b0029996fd70e2sm5194375pjb.45.2024.03.02.12.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 12:56:50 -0800 (PST) Date: Sat, 2 Mar 2024 12:56:47 -0800 From: Stephen Hemminger To: dev@dpdk.org Cc: Morten =?UTF-8?B?QnLDuHJ1cA==?= , Bruce Richardson , Konstantin Ananyev , Zhihong Wang , Yuanhan Liu , Xiaoyun Li Subject: Re: [PATCH] rte_memcpy: fix off by one for size 16 and 32 Message-ID: <20240302125647.63ef6aec@hermes.local> In-Reply-To: <20240302204923.227105-1-stephen@networkplumber.org> References: <20240302204923.227105-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Sat, 2 Mar 2024 12:49:23 -0800 Stephen Hemminger wrote: > The rte_memcpy code would do extra instructions for size 16 > and 32 which potentially could reference past end of data. >=20 > For size of 16, only single mov16 is needed. > same for size of 32, only single mov32. >=20 > Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86") > Fixes: d35cc1fe6a7a ("eal/x86: revert select optimized memcpy at run-time= ") >=20 > Suggested-by: Morten Br=C3=B8rup > Signed-off-by: Stephen Hemminger Self-NAK, more is needed here. The code has lots of pre-existing bugs where it will reference past the end of the data in some cases.