Received: by 10.223.185.116 with SMTP id b49csp1362501wrg; Wed, 21 Feb 2018 17:36:19 -0800 (PST) X-Google-Smtp-Source: AH8x225mWDZdmPJGXQbCehxL25hsIEGxrSnWLuZz3W9TljR5nnpF6PY+IEtjweAaK/mpiwzwLCiZ X-Received: by 10.98.64.146 with SMTP id f18mr5219666pfd.30.1519263379762; Wed, 21 Feb 2018 17:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519263379; cv=none; d=google.com; s=arc-20160816; b=wIcj9eK9ezNkcz6fyqjslp1eNXR028+pFBftNtjWlUfzl9+MNMX7r+KzglrN993Q28 YfLXf+qbDFT4c7DiMbyMJ56C7YL8h++tZlzrsED4br64ucTlomZFNXH4KPzZkqsJ5U33 h5gAo2DN6T1uYOUAuT377nSNlbiuQQLeOqMcAQY/Fxj9Ebn6aZifTsT/Jsi7hAxm/LiJ +dly5J20NNIzeB++7x26Yt20hRDA1wSgPH5WR2dQjvPhnRFf3BwI/mzeYmEM2an9bu0U vgcYh/+5WmzYdrxs93Vf315Yurnc1fba2BWvVQUQ3xW2KJ8QR5CWRGTUiQ8c/gSZpNiE 6MEw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:arc-authentication-results; bh=RtLQ00sMRRLxLpl5Nx34qkWy28XwafRAvmlOVRbfe2E=; b=xcLFIFHJRV5PqLCwv1PetHO6WijnDenIVoyshMYTPCnfhaLFmoKjLqZlucDCZB2Mzn Qq2B5S26I8EEBHlThCfnG3UTK7XIl0dhuSMU5udR6XdB22swN3r6y5KhjmE+kZ2pUw6B bxa8ovyYLw3cXQNiRku5hUpQcQ9QYuVC856R6cNvDvARMfhPeI69hFdd+wpfGAvBQvdY /VLBi4Apu7ed5uA1NMn4N14OOHEomFtEZLLmCyXY54Vjpx/hva9sGsmON4RtUd+Uwmck +ZI0ah1QBnrQVqdNVsqmnlsDtOdHQqJiafUu/muEFzNDfOo9U/PlqmoJ23UsvWP4/SbY Orsw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si2714783pgd.298.2018.02.21.17.36.04; Wed, 21 Feb 2018 17:36:19 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751688AbeBVBf2 (ORCPT + 99 others); Wed, 21 Feb 2018 20:35:28 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:36921 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751413AbeBVBf1 (ORCPT ); Wed, 21 Feb 2018 20:35:27 -0500 Received: by mail-pf0-f170.google.com with SMTP id s24so1454793pfm.4 for ; Wed, 21 Feb 2018 17:35:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RtLQ00sMRRLxLpl5Nx34qkWy28XwafRAvmlOVRbfe2E=; b=VcbdyVGMB0/vaUFtCj1UuWkuXAuwUFFmTB73DT74L2QW4lkeEsntpj6O8s0zskm9FG jsaL3yyFs2iuYiiNA6a/lXYNjzD2UI/i3K+85VNFdJY4ZI8zewtZyON6oK+OFkE60NL5 x51GT52tdutfLtIcSol47sU+PiAazXepu9nEKB3f19UxD1hIa5m7iYiFmTKFHtPl5mcj yhFDCkCnVczmewkcmTIyAI0H5HvLMAK/E9Ot95V3cP9hGKMJI9vOgupiXjjIe4tJnsRC oPTSVnRrhbJTlW+i9FT04gzvOSk2J/NXwhuA+TksBtYuFc957j9g1EJBL+ioGJvj8yk5 en1Q== X-Gm-Message-State: APf1xPDGbQedbt7oA8qFv1W0kpTyjYt2I6M2nQbWYq/dJnJQc8w87G5G Iof5Sn97tNihcGWtSrKDPeMoLybdFjA= X-Received: by 10.99.54.196 with SMTP id d187mr4293195pga.154.1519263326159; Wed, 21 Feb 2018 17:35:26 -0800 (PST) Received: from localhost.localdomain ([2601:602:9802:a8dc::70a7]) by smtp.gmail.com with ESMTPSA id n81sm9736072pfk.152.2018.02.21.17.35.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 17:35:25 -0800 (PST) Subject: Re: [PATCH 2/2] arm64: Clear the stack From: Laura Abbott To: Mark Rutland Cc: Alexander Popov , Kees Cook , Ard Biesheuvel , kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20180221011303.20392-1-labbott@redhat.com> <20180221011303.20392-3-labbott@redhat.com> <20180221153850.ywpzsigfnz3etoun@salmiak> <3b76d238-e10a-9abf-c9cb-6d3738eb7896@redhat.com> Message-ID: <572af610-c20f-e826-f124-8df47680795b@redhat.com> Date: Wed, 21 Feb 2018 17:35:24 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <3b76d238-e10a-9abf-c9cb-6d3738eb7896@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/21/2018 03:53 PM, Laura Abbott wrote: >> I *think* this should happen in finish_ret_to_user a few lines down, since we >> can call C code if we branch to work_pending, dirtying the stack. >> > > I think you're right but this didn't immediately work when I tried it. > I'll have to dig into this some more. Okay I figured this out. Not corrupting registers works wonders.