Message ID | 1398713302-29657-2-git-send-email-rth@twiddle.net |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBDH3N3F43IGRBRGY7KNAKGQEW4Z6R2Y@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 71437202FE for <linaro@patches.linaro.org>; Mon, 28 Apr 2014 19:30:13 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id at1sf10700908iec.6 for <linaro@patches.linaro.org>; Mon, 28 Apr 2014 12:30:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=dd81uf89a+TjzCzRDEQzzUO6buIX4H/sHflcCD9eHIw=; b=QSFpesS7WT0q4Yy5SnSIk+BCojkWLBaO3qfXDg9gY+zh5Bn9Y2Ygh2idn6dRah+PGY vHDUmmFOF36O+t7jfiJSg1Rf470pi+EBqqBHUVLiD7hjvQJXNJuxoVAzppnE9640RQh0 3E+hykm0qhdWvP+FucrSofzP//8mUlz+C2+gKwyJOpQ/7qZTUcMNMKgNsCd0BoGbi+YJ Lw4nu+gEDFS0qI2g2hORkuu3pPRqFoEOcJ11TIV1ZwTz1X99VfYzFLpv9I3XqNTvO/7F 122NinnfHZrqEIud0U3R6o5YsT6zJf0bOvENieesTduDKQDVQ1lnDa/yf3G4B7/j+yi0 e3MA== X-Gm-Message-State: ALoCoQkfx/a0lMh541hUvbZVXYrepcor7phjDjFdIZobC9srIkakav62jRWkRjbyiQCDdQZLqfI8 X-Received: by 10.183.1.7 with SMTP id bc7mr3743268obd.47.1398713412929; Mon, 28 Apr 2014 12:30:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.106 with SMTP id 97ls2882491qgo.34.gmail; Mon, 28 Apr 2014 12:30:12 -0700 (PDT) X-Received: by 10.220.163.3 with SMTP id y3mr25250534vcx.7.1398713412746; Mon, 28 Apr 2014 12:30:12 -0700 (PDT) Received: from mail-ve0-x22f.google.com (mail-ve0-x22f.google.com [2607:f8b0:400c:c01::22f]) by mx.google.com with ESMTPS id w15si3887820vcz.181.2014.04.28.12.30.12 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Apr 2014 12:30:12 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=2607:f8b0:400c:c01::22f; Received: by mail-ve0-f175.google.com with SMTP id oz11so8564568veb.20 for <patchwork-forward@linaro.org>; Mon, 28 Apr 2014 12:30:12 -0700 (PDT) X-Received: by 10.220.105.130 with SMTP id t2mr25235464vco.18.1398713412671; Mon, 28 Apr 2014 12:30:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp141351vcb; Mon, 28 Apr 2014 12:30:12 -0700 (PDT) X-Received: by 10.140.23.7 with SMTP id 7mr34709384qgo.0.1398713411662; Mon, 28 Apr 2014 12:30:11 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t10si8353294qci.39.2014.04.28.12.30.11 for <patch@linaro.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Apr 2014 12:30:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:45600 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1WerFi-0006Ms-OB for patch@linaro.org; Mon, 28 Apr 2014 15:30:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1WerEb-0005Ri-Dl for qemu-devel@nongnu.org; Mon, 28 Apr 2014 15:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1WerEW-0008Mj-An for qemu-devel@nongnu.org; Mon, 28 Apr 2014 15:29:01 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:37716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rth7680@gmail.com>) id 1WerEW-0008MY-6h for qemu-devel@nongnu.org; Mon, 28 Apr 2014 15:28:56 -0400 Received: by mail-qg0-f48.google.com with SMTP id q108so7406418qgd.7 for <qemu-devel@nongnu.org>; Mon, 28 Apr 2014 12:28:55 -0700 (PDT) X-Received: by 10.140.40.239 with SMTP id x102mr34400851qgx.16.1398713335812; Mon, 28 Apr 2014 12:28:55 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id v9sm34841261qav.28.2014.04.28.12.28.54 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Apr 2014 12:28:55 -0700 (PDT) From: Richard Henderson <rth@twiddle.net> To: qemu-devel@nongnu.org Date: Mon, 28 Apr 2014 12:28:07 -0700 Message-Id: <1398713302-29657-2-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1398713302-29657-1-git-send-email-rth@twiddle.net> References: <1398713302-29657-1-git-send-email-rth@twiddle.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::230 Cc: Peter Maydell <peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v3 01/16] exec-all.h: Use stl_p to avoid undefined behaviour patching x86 jumps X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Original-Sender: rth@twiddle.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=fail header.i=@gmail.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit |
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index f9ac332..1c49a21 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -229,7 +229,7 @@ void ppc_tb_set_jmp_target(unsigned long jmp_addr, unsigned long addr); static inline void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr) { /* patch the branch destination */ - *(uint32_t *)jmp_addr = addr - (jmp_addr + 4); + stl_p((void*)jmp_addr, addr - (jmp_addr + 4)); /* no need to flush icache explicitly */ } #elif defined(__aarch64__)