Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1615485ybp; Fri, 11 Oct 2019 17:37:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwwDxqrHa212lUEIaVxhVcHOhpwXbGdq7JbPObLdxFDJwYSJfXCeovRWztVv/u7FDhwKAMF X-Received: by 2002:aa7:d908:: with SMTP id a8mr16358354edr.49.1570840679066; Fri, 11 Oct 2019 17:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570840679; cv=none; d=google.com; s=arc-20160816; b=y52bNFVcbO8a6+hEl12AhUYHoQmqdASnsf96z7fF2pq9rQoiynFPe/PYVzKIHdq3f0 PGdz7XrX5Rv8pCkQCicBGU2yvSSiWPqpJ1ejrrgh8OcGieeoumgjaxZ7oHAyzRFIkufq mdzx2D2NvX5Wlmp+HJYjH3szZQKQs6FcZp6VzcRu/fIoISdw//8SNZ7TGTelaV993Aco mIFzkAFgUFiMF5lPkBjcXLrekXeWnm4+36pAskN/O5y+zrb9nlyyfLuGGSkasKgjtWYi 37t/6z7kucQ0/yKcQETiiz1rTpjwhNYMINcDrBM15nq2Qty/L8Q6NbE4l9/1YUDVf8Ue V7ng== 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=f4Ki0HjVKaflfmxJ2byTawmZD59wBPdISnRBsFf1+EE=; b=zDVVLBvrsckBgRZJZLSs/m9QF2dqpWVMLZkLcsZ8dgveYTGxkB1uaqG6ekFCXAQvmS C2yOwE5zwJesAYir4KtIlpXmhycL+QccYVEYiZT1CLyjVq1sPmhN7dH/On4pMzjpVUqr X/6T+dcHIg5zEEEhGW2CSuugJ/lVFW29tbNQHELQ7d7kiep2zXlMfWl54Y9QPld2yS4R 0ZPOhbTJ9ISi097nTYLyPJzOX5Cmq3wT3kOWclobTtpq1lY4HvvirtfmsvIj/rI2LpKC Qet01kpp8ywDdRwCz+ZqXKMCr9rEsxnnEly5fj2Xt6fl5MP3MWz/ncW7ZmV0QmGRQ3Ry 4q7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GwdKcecD; 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 ot41si6343715ejb.215.2019.10.11.17.37.35; Fri, 11 Oct 2019 17:37:59 -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=GwdKcecD; 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 S1727721AbfJLAh2 (ORCPT + 99 others); Fri, 11 Oct 2019 20:37:28 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46881 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726345AbfJLAh2 (ORCPT ); Fri, 11 Oct 2019 20:37:28 -0400 Received: by mail-lj1-f195.google.com with SMTP id d1so11391386ljl.13 for ; Fri, 11 Oct 2019 17:37:26 -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=f4Ki0HjVKaflfmxJ2byTawmZD59wBPdISnRBsFf1+EE=; b=GwdKcecDHoPtTKefPJDFPiTifnR2o2DiQsdu9eYxjZKHNGVh4M3eyOGTtSM4dIBG9w 2RD8MYbieejLw0IVF+lNSxv0IoF0Tg5WlyczNlhvVquO1YUWfqC+lsZsa+DTKHu9ThbS t+PHqCQqQFlR0W2nZ4ZSIuYfyJmz7hREKLdbJEofiuaDJXYcxJNbydcD0h0c8WqVUJl9 493ZoqzSV/+idkqjGDTon1NwD63dr4FCuieLRUOIjNQXWGJjMIBC2EOAfdD4LJ2YPLKp DXao1EjYBaRXqpKvw2MFhPr5LpYkb+twKkkUXKum9dBP/sPfT68zeszbwuqWLzIRsIQE MQ5A== 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=f4Ki0HjVKaflfmxJ2byTawmZD59wBPdISnRBsFf1+EE=; b=cZrZqU9vePX6/OU+9bMsvtkFY5QRXZdsqFHgHc5uT5VXWUa9huzcwP5TJlMT6sAfq/ 7igEovJXK9spZBNrsXivFgCtxQEWw6F4g4YolLqAy5iYGUinVqA4CHDloR0xeVh9jNuV Uq9sW2aaUz2a0rcu/OqzslQgVY2/ufWco1j1mZl5mgvEHOlD6zriGXDg4l+zStp/xug7 oH9PnaWawXK57g4OWu0nIGCflPz9NPKpAnDsJkq8H94CwTvpWNQGiAy6vXmv+NLcahSq NgNfz2lUmTO4qrrYePQf0OArQTzx+REhvbHMT6VmhGo6+8QSu+4KWm4GDnAAuouEadhL r8Lg== X-Gm-Message-State: APjAAAURSMpatZvWOesYtm5DZ9iYwMTxPr7hHOkCUmpmRjwBFGH2ZvMe UopsgWxHsyX4TIpW19sHoyg= X-Received: by 2002:a2e:858d:: with SMTP id b13mr9538774lji.71.1570840646279; Fri, 11 Oct 2019 17:37:26 -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 f22sm2346620lfa.41.2019.10.11.17.37.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 17:37:25 -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 v2 0/4] xtensa: fix {get,put}_user() for 64bit values Date: Fri, 11 Oct 2019 17:37:04 -0700 Message-Id: <20191012003708.22182-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 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 (3): xtensa: clean up assembly arguments in uaccess macros xtensa: fix type conversion in __get_user_[no]check xtensa: initialize result in __get_user_asm for unaligned access arch/xtensa/include/asm/uaccess.h | 105 +++++++++++++++++------------- 1 file changed, 60 insertions(+), 45 deletions(-) -- 2.20.1