From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73480C388F7 for ; Fri, 13 Nov 2020 17:31:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C25C20A8B for ; Fri, 13 Nov 2020 17:31:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bX5GgH+v" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726805AbgKMRbO (ORCPT ); Fri, 13 Nov 2020 12:31:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23811 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgKMRbO (ORCPT ); Fri, 13 Nov 2020 12:31:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605288672; 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: in-reply-to:in-reply-to:references:references; bh=L/aAhx5VVqL4lk/Wfra0s2SdMK5jFFUCUk9GqwTX8PA=; b=bX5GgH+vizsTYr52dAdfkZU69TYCGDlmOeEJ8//T3Ml+FS/gLMoIS5yMgQeoJrXRlOBTS1 K3Z55WLw2+dorwPnZzxJoesn+SvCVRyho83+Mp/2Tb48w2nNXkrat0SYbDpKSeIpXFuK5s zwZCqO78a0QvHuKoGdA9iAY4arFe/UU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-72-c1MQ3t4KOeKw6d1TIhws9g-1; Fri, 13 Nov 2020 12:31:09 -0500 X-MC-Unique: c1MQ3t4KOeKw6d1TIhws9g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5FF011016CE7; Fri, 13 Nov 2020 17:31:07 +0000 (UTC) Received: from treble (ovpn-119-84.rdu2.redhat.com [10.10.119.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B9DC5D9F1; Fri, 13 Nov 2020 17:31:01 +0000 (UTC) Date: Fri, 13 Nov 2020 11:30:52 -0600 From: Josh Poimboeuf To: Vasily Gorbik Cc: Masami Hiramatsu , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Miroslav Benes , Alexandre Chartre , Julien Thierry , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/insn: Fix vector instructions decoding on big endian Message-ID: <20201113173052.vdy72pytmv6ztnbj@treble> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 13, 2020 at 05:09:54PM +0100, Vasily Gorbik wrote: > Running instruction decoder posttest on s390 with allyesconfig shows > errors. Instructions used in couple of kernel objects could not be > correctly decoded on big endian system. > > insn_decoder_test: warning: objdump says 6 bytes, but insn_get_length() says 5 > insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this. > insn_decoder_test: warning: ffffffff831eb4e1: 62 d1 fd 48 7f 04 24 vmovdqa64 %zmm0,(%r12) > insn_decoder_test: warning: objdump says 7 bytes, but insn_get_length() says 6 > insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this. > insn_decoder_test: warning: ffffffff831eb4e8: 62 51 fd 48 7f 44 24 01 vmovdqa64 %zmm8,0x40(%r12) > insn_decoder_test: warning: objdump says 8 bytes, but insn_get_length() says 6 > > This is because in few places instruction field bytes are set directly > with further usage of "value". To address that introduce and use > insn_set_byte() helper, which correctly updates "value" on big endian > systems. > > Signed-off-by: Vasily Gorbik > --- > Please let me know if this patch is good as it is or I should squash it > into the patch 2 of my patch series and resend it again. It all looks good to me, thanks! Masami, does this patch look good, and also patches 1-2 of the series? (I think you previously ACKed patch 2). -- Josh