Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3409102ybd; Tue, 25 Jun 2019 02:00:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwH7QHPRr/im4aT2UGYliuOrROi6deZ0kswWD0OBZJhvf1+dHc3GzU6dH9F5sBYmuzcVSMu X-Received: by 2002:a63:e156:: with SMTP id h22mr7367999pgk.370.1561453248095; Tue, 25 Jun 2019 02:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561453248; cv=none; d=google.com; s=arc-20160816; b=Tkw+6lpj+LRrFqmGOFt4jUvp/2iVOgo091jYy7CdXjf6ZAK2ungiAvwmLsgShFdJoW 1s2lHWWUwRUHKOrUKNQtXSx/Paidh7u9PLZFkVNlRIoYqNZEEUU4u0GDkvx/bIU7qgOf DPMMWf+HmCNjSHQlATPAadDDadYvvbunyiPnkhbCGciUDrVqItKxGhb4zYNIkWgpCVFi LEiOMI4pEbULSE7vHUASMtQ2zO3cGRSEdSWiBBxK/gUVgO5+yYKX3FqKpurk4eZ0lpWQ OkWdj5tyBg+xB7Wej8crVgxfoJGNUlgyfeKy9WSUrObbzhpv5jOc5ndlcuBiRzVYzVuX +6OA== 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:subject:cc :to:from; bh=HTlCF/qlFEZF2exeF4k7jSPardKGNa/zGfXOliZY/+M=; b=U1MtEXlxTAJhGC3BIFs273qdYEN576pABQyevxpvuHHi1EujiDGPkYTPZVenbIRA7R sSw1Ex5DzzQKu8gij9Mmvsn8eLMV6tK/SiMuoeoB/kaDddovFb9PcqPldb4c3HTN056H NvsWD0G0ci2iWQThasLsZELc7KoBt3WTHY4JUcVSSmZ/BsZl8E0qV6NapG7wcIuhoP/F JpU4sAKs8ua1h0LZbHuZzubUetNKkJ7Nfra4Z6qZlpYuzN+irPzGgyu9rv9FUSzOB823 uuiW7QhsQxzwJR04xWUhQaEfK1wogkES8mTT2HjOwQR0q8ogwaXG5qckRFcWbzuUbXaF i7dg== 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 c2si12474138pgq.110.2019.06.25.02.00.31; Tue, 25 Jun 2019 02:00:48 -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 S1731138AbfFYJAS (ORCPT + 99 others); Tue, 25 Jun 2019 05:00:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44224 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726543AbfFYJAQ (ORCPT ); Tue, 25 Jun 2019 05:00:16 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A6E281DEB; Tue, 25 Jun 2019 09:00:16 +0000 (UTC) Received: from astarta.redhat.com (ovpn-116-223.ams2.redhat.com [10.36.116.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 217925D71A; Tue, 25 Jun 2019 09:00:10 +0000 (UTC) From: Yauheni Kaliuta To: Jiong Wang Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Jiri Benc Subject: ebpf: BPF_ALU32 | BPF_ARSH on BE arches Date: Tue, 25 Jun 2019 12:00:10 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 25 Jun 2019 09:00:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! Looks like the code: ALU_ARSH_X: DST = (u64) (u32) ((*(s32 *) &DST) >> SRC); CONT; ALU_ARSH_K: DST = (u64) (u32) ((*(s32 *) &DST) >> IMM); CONT; works incorrectly on BE arches since it must operate on lower parts of 64bit registers. See failure of test_verifier test 'arsh32 on imm 2' (#23 on 5.2-rc6). -- WBR, Yauheni Kaliuta