Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5220885ybp; Mon, 14 Oct 2019 17:55:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaSzy93rfqHVXTW337fPmAMuxx2d4G3MNyd6YcoOMX+UGRnFL+B1RsXDSnyxOzNFfMEvhd X-Received: by 2002:a17:906:5388:: with SMTP id g8mr31319645ejo.278.1571100932364; Mon, 14 Oct 2019 17:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571100932; cv=none; d=google.com; s=arc-20160816; b=V/6puKBiy9AZ+IZYhAvP8a0Ee6SIjyCebH2NHP/6mQOJvrUhyny9dDf2mBpIrg/gIB e7U7Sl5FNhhtf8dJBusdor3OHrSv/SevbYeD8zH6oGlRl2aFJ6aFjk/YSVoA0f5QQXls 31VIVNydwF4HmuBJvMvjki60b2OK63Q7RC+aUauP9aHOkS+u/K9N9kiIjBqVota4Vdj6 dWqfZypxteY10U32lUmBuNDGIfWNznmmWyJkq59W+W0DBzgv7ijd2VM4sjybu569FvoB 29Hr0LjOHpuiHqz317BPx2gcVcU8bDZoBBylKV4FQqHQY8j12biReEbqemvKEvi+PORM dzYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wJ7ap/mJ4LnJlcvrkffAc0aZKRdl3/lTtd2w5VVgMTc=; b=K8nlrTQZoWhMikv+F5OuehevfDbVr4wPg9UlOE591oIPhxIDgZZj6FUfKVPwIlcRhJ g2g9c80hOTT7RBJoChsMtqR7r+SH7enk0c6fcfSdUbqlkASdzjQ08aoSl7NVPcnKYQml 7Ike0Up5h8KTLjZNlsZ2GCEQY/X67/YZ0Pzk/qpPXckW/OmdLRah2J4tW4beUnLfwY76 tFqbA7qBrsmcELVPQjS5wK8kjogFKNYuY5hygidKR7+WsVgqlQ1jYGeuAW5mYGQ7n4LD lZjG6L32AvluTXAWWFDiUbrPPq2qcxD8UP3XPEdYK+Gb7GFuESeqfnuRrydW51dyKnoy XRUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XvlM80LD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17si12108604ejz.148.2019.10.14.17.55.09; Mon, 14 Oct 2019 17:55:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XvlM80LD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730623AbfJNVZi (ORCPT + 99 others); Mon, 14 Oct 2019 17:25:38 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:36404 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729930AbfJNVZi (ORCPT ); Mon, 14 Oct 2019 17:25:38 -0400 Received: by mail-lj1-f195.google.com with SMTP id v24so18041645ljj.3 for ; Mon, 14 Oct 2019 14:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wJ7ap/mJ4LnJlcvrkffAc0aZKRdl3/lTtd2w5VVgMTc=; b=XvlM80LDSXmna1BJMSr5a/bmzis83k48RX5xlT4Z9K98g8V5GLTTt8PvAwFY5M687C PLBSSyOO5XIVomNz6DBKoWIwuu4cbQ2Nnq0ApENs0GgqowU/HaeG33u+lJOl56QUkUWX T8z4L6EcQT6iT+9nWO4ttuxmwCWZJioPwud8oVqdCrIaq4xHbrDmmtW3ceMiM0OKQ5c7 MnyIVoLoN/Dc8/SdqXiiuTAXx0AjFg3O7lT60uXtcnt1grLBjkn95fwsckLX27KEtyfo 9Bl1PkjY3WMRmrdu/bx2vA1Ix9fN955h0yXVUDq6tIv41l0/DY5c70ttDk03gvPkr4Qg eBIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wJ7ap/mJ4LnJlcvrkffAc0aZKRdl3/lTtd2w5VVgMTc=; b=LUOhFNtLX2h8EzBgHgIxwx4aMZ9BoauyIamd+rv5ybltIvgk0AdrVX67ky6cKYmBYP TnIaDgxevz5t3Fe5CnnDCiJFpLOiR/Cc+/kmyhEDrWS5zbYOj+WOuilmKXwdG7VvQebK Jtz0AQdWgVnsWafEHU6+U+B+m67zEKSZa4Q6r8atwNuANAi41fZEP/Apo7T0inMQaQwW x3Phv8QEJBlp5LYl00x4tEOtOYaVtkzbLfv3BQGj4ggpjUZJFkUdIfpAdMk04AtiFXmo nSKnKasfILarh2nvlVqHa2opDCwtNDvc3pmAP+eWaWEUKdGgaDX24tbVkCC5Nf5sZ3v6 vCHQ== X-Gm-Message-State: APjAAAVTf26fruyXltBb/xww7ch3KreM1MZftzywAMC5twNNToAnwnDJ USf8IlxzhXy9qSX0KclpHh4= X-Received: by 2002:a2e:9b8a:: with SMTP id z10mr20223163lji.80.1571088336158; Mon, 14 Oct 2019 14:25:36 -0700 (PDT) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id m15sm4429434ljh.50.2019.10.14.14.25.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 14:25:35 -0700 (PDT) From: Max Filippov To: linux-xtensa@linux-xtensa.org, Al Viro Cc: Chris Zankel , linux-kernel@vger.kernel.org, Max Filippov Subject: [PATCH v3 0/3] xtensa: fix {get,put}_user() for 64bit values Date: Mon, 14 Oct 2019 14:25:10 -0700 Message-Id: <20191014212513.17661-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, this series fixes return value, out-of-bound stack access and value truncation in xtensa implementation of {get,put}_user() for 64bit values. It also cleans up naming of assembly parameters in __{get,put}_user_asm and __check_align_{1,2,4}. Changes v2->v3: - fix assembly argument constraint for error code - rearrange result zero-initialization for error paths in __get_user_asm Changes v1->v2: - initialize result when access_ok check fails in __get_user_check - initialize result in __get_user_asm for unaligned access Al Viro (1): xtensa: fix {get,put}_user() for 64bit values Max Filippov (2): xtensa: clean up assembly arguments in uaccess macros xtensa: fix type conversion in __get_user_[no]check arch/xtensa/include/asm/uaccess.h | 94 +++++++++++++++++-------------- 1 file changed, 53 insertions(+), 41 deletions(-) -- 2.20.1