Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1320079pxb; Fri, 13 Nov 2020 09:33:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyP2hB+yeeiidJMa679IVUeGW7FGKV49zTPGkS/s546VGmhF7/t2x0tjb2OS+ZGqpHEBvOV X-Received: by 2002:a17:906:903:: with SMTP id i3mr3250521ejd.218.1605288785550; Fri, 13 Nov 2020 09:33:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605288785; cv=none; d=google.com; s=arc-20160816; b=UxvmRYXm8mKgaxP9lJ+YIVhEcr9qEsp8/+VKW0hBW2f7SGpaVoraDxHeSAAwn/zDyv roMNVk1+cRfgVFcqOHPMZioyISaA40QuW1HwExhZAgq6lvb4Yuqk9QSElZ9PBu2SIo7O c/CEUx+1IIwbW7wr9oNBw9jiypFqJ3Tf5ctOcjpGlDJH3uAKOxi2EK/X5E7SMvI77dg1 RbXX1xzXZZaqTXqtTvTDCxrkgob9EjvdgJkC70xtTaFZi77wx+77TUBd70OW1rltnjCq zDb/Nqe/mMjVPQGtXkJk1fDcmnOevhZAGIhqzXd3nEMVT+xLaQH6bpOT/mQC0GXwdA4h cO7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=L/aAhx5VVqL4lk/Wfra0s2SdMK5jFFUCUk9GqwTX8PA=; b=CEx2GuBTYlmOAhaVqPouOwp7DRA3738DtT7Jfn9fn7/v5Ks6zRsY/jKU1gYmmJkQqo 2PKLMYOuPPCQvo1VYEFJSTuNVCYr6RzE/VPSys2lr7bxiPhxqC1lEP9/jgME4U/9qY1O qp1wdERt1mqKsIByz5MxSO/MAl2X1tpL8VgaLWXCQjagoeBRCXZLoMzQfVQsWWO/hLtJ YnZE8D6tMzd6CH0NN3ojYLVqzJ+4mAIqmezHE/E6MFFD4Dv0HL3DGPisxc6u77IS4evI vstOqNZiXE7zwCVSvcYrdsy5fCbYzJuWmigdI54NCEBwdiRUYaRWO+XJmAsyvvUOqPes g+Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bX5GgH+v; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn3si6239634ejc.25.2020.11.13.09.32.40; Fri, 13 Nov 2020 09:33:05 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=bX5GgH+v; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726787AbgKMRbO (ORCPT + 99 others); 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