Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1054377pxu; Fri, 16 Oct 2020 02:39:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwApmoNNBnRJzXziI8OIVEkFak0cYYlMZTU2qehk3Z2lDaQjWfP8BpkM5MYfKYQFhgbeRpI X-Received: by 2002:a17:906:b091:: with SMTP id x17mr2761113ejy.178.1602841161603; Fri, 16 Oct 2020 02:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602841161; cv=none; d=google.com; s=arc-20160816; b=vkgj+craNImDx7j8kJWd8hgAsgRUU1XEp3UPPX3fzppAajA7nODWGXJhxBUnyrEmkC e7wTei/M/2coJD2RbkCTFeR0YGHb3DWN6E8i+2E6WHUKrOswUZ6aX0W1zPvEgGmc0WcE H4b8qNDYXHFq369KvRd59QP8nmLYIVk/31Mngy1a9872YQkKNWeIb7ebqgdE4NFwjXLO PufcbKWeT+hDK34hnuZwuebR1VQlFhrcpWlICAd9/MyvzRJHtFJsP/LjsKkC6zBhxIZm zQcb8KefVJ0WGKhnTcTZ6LX9JPhkgpfBmbFfBkR/0TlQ64kg7HqH2alZPUbk/32DQCNk FzvQ== 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=n4yntp56hTwz5NkrDIzMv3NkULA7PrzNmrNXwNVmCHo=; b=VAXSmXCAIFIkCY5zgA9BJsi2m6Lljwv8W/DCi8GZO1lu3jY//AWjfjdDj5CrYCHqkF AKMLecVJFaABPVEEEk0KUp+t5CcLFh8NM6DnB/msjMGn/zdJGJ8EvhwaxikHKR8dIS+i l8QqmSlHoCydBf9mqXhBU4lhfgn0goJsnj7vTUPO/qBr8zyf9gm8z5REXiNODMyKRLog 02MzS1WEWBt87aZybD/uJ0KU6ldTvfVzjKHC9dr822DOnukPIHdj2CA9PXZ34CXEodod /DJhPa91drfcHBIlS+QYZuEYoYzzvu9nkcuEbgNeG9eSh2gz7ZZqEic90b1HzRf87gwI BeQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=DIVMzKpK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt21si1440308ejb.368.2020.10.16.02.38.59; Fri, 16 Oct 2020 02:39:21 -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=@infradead.org header.s=merlin.20170209 header.b=DIVMzKpK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405775AbgJPJhh (ORCPT + 99 others); Fri, 16 Oct 2020 05:37:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394545AbgJPJhh (ORCPT ); Fri, 16 Oct 2020 05:37:37 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0BD6C061755 for ; Fri, 16 Oct 2020 02:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=n4yntp56hTwz5NkrDIzMv3NkULA7PrzNmrNXwNVmCHo=; b=DIVMzKpK3EpHN8VYg4/a77d4JI 24U8EBhKJHOfuX6bWSmnFHhqPQ+9YYaeiRRD9ofzAOro+O3NtpP5pe4vQlq5yr/HkoffBfZU4OBMp BxRMmYM+ZmhoIIqSHo8hQuHyfXxR6felXuB17LWtDez1f4bPAeciT19xSUr58v9WDrnw/Nn+6F+ZK duHUjNzluiCBibYo1WW3+0o2xepWKEIrJ74dZyUn21if2bPQbXHLI0xPv7uTDHdjCdyorzdlOeWLa h6rS0QdN9W+Sj6heQDzi+1bZgYh30K7aQDlaCAXZbN9GJ4CMIdL5d75EF6yUlk99lbmcIeKrKGvRr 08WL5FoA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kTMAw-0002rN-G8; Fri, 16 Oct 2020 09:37:26 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E209630015A; Fri, 16 Oct 2020 11:37:24 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C79422019D2CA; Fri, 16 Oct 2020 11:37:24 +0200 (CEST) Date: Fri, 16 Oct 2020 11:37:24 +0200 From: Peter Zijlstra To: hpa@zytor.com Cc: Ian Rogers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Masami Hiramatsu , Josh Poimboeuf , linux-kernel@vger.kernel.org, Adrian Hunter , Arnaldo Carvalho de Melo , Numfor Mbiziwo-Tiapo Subject: Re: [PATCH v2] x86/insn, tools/x86: Fix some potential undefined behavior. Message-ID: <20201016093724.GH2611@hirez.programming.kicks-ass.net> References: <20201015161216.1563600-1-irogers@google.com> <5E711F64-A9BF-48EC-83A3-3C644D80F848@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5E711F64-A9BF-48EC-83A3-3C644D80F848@zytor.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 15, 2020 at 02:34:57PM -0700, hpa@zytor.com wrote: > Wait, what? > > You are taking about x86-specific code, and on x86 unaligned memory > accesses are supported, well-defined, and ubiquitous. Objtool uses this x86 instruction decoder, people are cross-buildling objtool to cross-build x86 kernels. So it's entirely possible to run the x86 insn decode on BE RISC, which very much doesn't like unaligned loads.