Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4823837pxj; Wed, 9 Jun 2021 02:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxBNO37+/Id4NwO8evj/3HeullDMLfujpi9gE4+JHDBw3Fj+avGwwvhG51300V2E7HGcKH X-Received: by 2002:a6b:f618:: with SMTP id n24mr22789169ioh.174.1623231942641; Wed, 09 Jun 2021 02:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623231942; cv=none; d=google.com; s=arc-20160816; b=G6E0FcNzojqkO3Wagf45NH9HlptmaIckNIxoaVWbUzc+TPRUYlcdLzg4Fco/E8mX1J yjF3WvFdN51rZDrLn9CFnAEPKv3d4iuuMCOra22AjdFjYL8kHEWfOeSUAwQF0+XhNe/q 9wbKy4sZXfS8TTZwR4W7Vg8DHucJd4RuEK83bgHl7gobcISJQtuzH84IdlpMjQeHKnWM l/sidfJqjgkozQFFvnA0EHLD8qm/2qu003mmHME+qX62Nh5u3PHJAF7aU121NCYshyJ9 2gT7bEGV8PioKcpabWO2zKvn7t5Up13z37Sxmg6XboRxBTudRupGUDbwyx+hybLclixJ F5Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0RuZi+hY/taOHOfDzIX2juzxF/gHaBBTDJn7vUxyYiQ=; b=N50+JvmJCs3vFew4iEFU+tOm31h6wRCvSgB7kcGIYf4E91aXm/B0v+x+jdVfQm95RG SRzeRswxH5r0kGDcvVGxT8zPKUOFMwImyG851eOlO0XooN7pGL+zEsHw/pwjGws6Mbpg iWRH83Vwp6+xaH2wEExWu8GItJkBwhke1FhImN6tIBXD3uRQpBNEY45BI26tUlgYY1Ih z47Cj43QVkIsv1WV5X7LlziNjepYogjBBKBR9zvK7P3MjEtJgaOEXsX/2x6plcVq1swL 6+C1mShkzR1iankREuJO500TopVQnIRwIK6W6JZI4a+BEMCECqlEGykYwMLAtWNEaNBh Mm5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jfwcagGp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z69si1790689iof.91.2021.06.09.02.45.30; Wed, 09 Jun 2021 02:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jfwcagGp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235826AbhFHSpL (ORCPT + 99 others); Tue, 8 Jun 2021 14:45:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:36728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235043AbhFHSlI (ORCPT ); Tue, 8 Jun 2021 14:41:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C072B61438; Tue, 8 Jun 2021 18:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177309; bh=D3uiFNGSp8hXAmUSZZcMPtlbeCo4G5JIXuUd4UoHDBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jfwcagGpO3KLu+eBYAUDZ3C09TU724wQDkMZm2hQTX2u0IFUpzhy6DvhVFrKX0rbA UCtXgM4Jh46mUUJzepuoGoFPFt7RfWzVtEZrR64cDEIxj55GiU4s9qkLbtc5Ok89ry dBHOsRD81hsk5rJzeexyGUhxwrztS1am9yd2hvd4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Daniel Borkmann , Tiezhu Yang Subject: [PATCH 4.19 47/58] selftests/bpf: add "any alignment" annotation for some tests Date: Tue, 8 Jun 2021 20:27:28 +0200 Message-Id: <20210608175933.826274506@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175932.263480586@linuxfoundation.org> References: <20210608175932.263480586@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Björn Töpel commit e2c6f50e48849298bed694de03cceb537d95cdc4 upstream RISC-V does, in-general, not have "efficient unaligned access". When testing the RISC-V BPF JIT, some selftests failed in the verification due to misaligned access. Annotate these tests with the F_NEEDS_EFFICIENT_UNALIGNED_ACCESS flag. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Signed-off-by: Tiezhu Yang Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/bpf/test_verifier.c | 3 +++ 1 file changed, 3 insertions(+) --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c @@ -963,6 +963,7 @@ static struct bpf_test tests[] = { .errstr_unpriv = "attempt to corrupt spilled", .errstr = "corrupted spill", .result = REJECT, + .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, }, { "invalid src register in STX", @@ -1777,6 +1778,7 @@ static struct bpf_test tests[] = { .errstr = "invalid bpf_context access", .result = REJECT, .prog_type = BPF_PROG_TYPE_SK_MSG, + .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, }, { "invalid read past end of SK_MSG", @@ -2176,6 +2178,7 @@ static struct bpf_test tests[] = { }, .errstr = "invalid bpf_context access", .result = REJECT, + .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS, }, { "check skb->hash half load not permitted, unaligned 3",