From patchwork Thu Mar 15 08:52:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Barcelo X-Patchwork-Id: 146856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 205D8B6EF4 for ; Thu, 15 Mar 2012 19:53:04 +1100 (EST) Received: from localhost ([::1]:51922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S86Qf-00039M-4z for incoming@patchwork.ozlabs.org; Thu, 15 Mar 2012 04:53:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S86QT-0002qU-GK for qemu-devel@nongnu.org; Thu, 15 Mar 2012 04:52:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S86Q6-0003AN-2Q for qemu-devel@nongnu.org; Thu, 15 Mar 2012 04:52:49 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:44013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S86Q5-00039x-Kf for qemu-devel@nongnu.org; Thu, 15 Mar 2012 04:52:25 -0400 Received: by wibhr17 with SMTP id hr17so3484632wib.10 for ; Thu, 15 Mar 2012 01:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=1pfvQ5Rk3KMLKDDz9kWxaFEMT+6pOqpQuaYlLT3H9uw=; b=0xkodJE/uNJkTAYMaFJEfKYNUY2cXuy+dYJSSXfFoRUYIjhpQsJINkVMTzLA98kvPT PYaJEMjUBx172tZyS3W+FZoOcYsSolpS8g/Hp4Q8gJgT28DN5XpyekYnzKUKSRIZ5B7s KV2ucwwls+nZ6Pe7xXe07H9kZkWbA022w3ikTfPQaUNQ6sW2ceMwGMqkb8p3BmqsO89P 1uY7B/vsxyTOXM2mcDtoQbicyQv5C/+ABgvf+JhhoznrUNbQy7FJOUHabkCxruH1uGit 8klgnF0EOWkIqd36s7r0+vnCAN8O7kD/3ncPvVF5uLgGiOX8kxhDOF2/TI1RgBDT9zQe JYSA== Received: by 10.216.135.206 with SMTP id u56mr3406114wei.29.1331801542651; Thu, 15 Mar 2012 01:52:22 -0700 (PDT) Received: from localhost.localdomain (62.57.1.36.dyn.user.ono.com. [62.57.1.36]) by mx.google.com with ESMTPS id d7sm5773721wiz.6.2012.03.15.01.52.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 15 Mar 2012 01:52:22 -0700 (PDT) From: Alex Barcelo To: Date: Thu, 15 Mar 2012 09:52:08 +0100 Message-Id: <1331801528-4646-3-git-send-email-abarcelo@ac.upc.edu> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1331801528-4646-1-git-send-email-abarcelo@ac.upc.edu> References: <1331801528-4646-1-git-send-email-abarcelo@ac.upc.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.181 Cc: Riku Voipio , Alex Barcelo Subject: [Qemu-devel] [PATCH 2/2] linux-user: Bug on a zero comparation with sas_ss_flags X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org All sas_ss_flags' 0 check is the same across every architecture. But in PPC there was a bug and it was checked the other way round. It seems a typo and is not architecture dependant, is a POSIX standard and the QEMU way of checking it. Now the signal.c and its sas_ss_flags check should be coherent and correct across archs. Signed-off-by: Alex Barcelo --- linux-user/signal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index d1a2671..d159ada 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -4122,7 +4122,7 @@ static target_ulong get_sigframe(struct target_sigaction *ka, oldsp = env->gpr[1]; if ((ka->sa_flags & TARGET_SA_ONSTACK) && - (sas_ss_flags(oldsp))) { + (sas_ss_flags(oldsp) == 0)) { oldsp = (target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size); }