Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733AbcLLWTF (ORCPT ); Mon, 12 Dec 2016 17:19:05 -0500 Received: from mail-sn1nam01on0078.outbound.protection.outlook.com ([104.47.32.78]:59840 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752409AbcLLWTD (ORCPT ); Mon, 12 Dec 2016 17:19:03 -0500 X-Greylist: delayed 11872 seconds by postgrey-1.27 at vger.kernel.org; Mon, 12 Dec 2016 17:19:03 EST Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Subject: Re: Remaining crypto API regressions with CONFIG_VMAP_STACK To: Andy Lutomirski , Eric Biggers References: <20161209230851.GB64048@google.com> CC: , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "kernel-hardening@lists.openwall.com" , Herbert Xu , Andrew Lutomirski , Stephan Mueller From: Gary R Hook Message-ID: <1747e6e9-35dc-48cc-7345-4f0412ba2521@amd.com> Date: Mon, 12 Dec 2016 12:45:18 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BLUPR0401CA0002.namprd04.prod.outlook.com (10.162.114.140) To DM5PR12MB1404.namprd12.prod.outlook.com (10.168.238.143) X-MS-Office365-Filtering-Correlation-Id: c88d7339-ce85-45f1-e261-08d422bf1229 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR12MB1404; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1404;3:eQj+0NW/x6s7X7mOFQ5VfiyAyZWR4Nj6o9WRHQ/5C49ka9MqxIO+09eCDptt+frUrx5QNz3p1ScJtpv3YA9EeNM7t+MMqITBAyPsuV4J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mcucsm/rdNBKE/vdvjfgK4Lsj30+PKpwHSXQXCNCwLppsVv9sTULw8zL6u6xFn1prWi2pXlUqmWPLwUBNxWmoRJT24T8z9ohxwGjPo9B2UEPaC3MU9frFAUNpo0LchUIU09+QbgyGT6GLWIRj0q1oaJXhliHuZ738o8upgVrWm+TJfIUbwPim+P3d0d1U+mKIk7gKcCD5yvwpkgfEYlqrqls6vyNlsCm67KV6w75D6xmc7cbjUFematiDwWczm8vex0Dv6irX1/Dl2b93WoqIPHYHgIHyFDATKYuF509ppzAYiJRYK85+vQutXyAhffkFIIi6hpNb9IC74MZJCI0F/f8FSSPLjqedCvulFRQfBTzuJRnFpfDNUrC1p9Bf58VDqBQECxKH1EBaVRlMLvQJcdTuRHgnedBlwCEaX/YLXamj2Pev X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(148322886591682)(81227570615382); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148);SRVR:DM5PR12MB1404;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1404; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1404;4:Xe3vjyJysrEJYVgB8mRFiW4peFGSNWSKsUKxHyX9tBAFQj+Mbbsfmu0i5xe4ne619ZFMDfPfeZgWIwzD+JjKrbwoI5PFVkgJ+vku0PMD6Z0EdZqXsd0fSEVz2JzQjCA/Kv46fIRNKbHd2mFYiQoxO1oVzUyqfNAlcswzT+PkNG6PQeaPL0sveG5eZK2dt1a76UH0he5xjyoO16FVOlXN33/Ip9pRtXgrUGUEnw1gL5SpF+AoyjjiyT+TfdOnu59oqViW4xpf5KYo59cgPgxcUUopfhX+mkgBYHjlvWCtfv+g6MgF8l7zmT+3azxdIk0cOn9fu+TsWPn02J0jhjHFDoJwjttb0oeUU7VJqBXF2pXEMbsnkSBow0YooF4AGDpQpYrdT8bVwT5DUoD6OhsrWPkV5PYYg7TzmbgHtww3FUpI1WA4fP9jlYM5EQNrH5pGBGP/IRvVQrIugQZWx1ryQK9zL0FnLIZ9+q+fUqcIX8nOaStxA3VYcU0yQ/k7pXbmJOct74TvCrVfnt8ADAtygSxjh1hiIuSOEVTUlqZPkaV7oa5UsPOxn4SvnjeF42d7Z1ZbdtJ5N4CvnkAUCAhrL9kru0Mo2WI8kPErLkAU+ve/nGqFSvjlpzN8yYg1fWPUt4+l8p7qjKcu8yHxJY1RyvVZrjyMpvguKPnmtY1BcjQ= X-Forefront-PRVS: 0154C61618 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(39850400002)(39860400002)(39410400002)(39450400003)(39840400002)(199003)(24454002)(189002)(377454003)(6116002)(2950100002)(50466002)(6666003)(229853002)(68736007)(64126003)(2906002)(81166006)(23676002)(230700001)(101416001)(83506001)(33646002)(3846002)(4326007)(92566002)(31696002)(8676002)(7736002)(105586002)(5001770100001)(305945005)(106356001)(5660300001)(76176999)(54356999)(47776003)(31686004)(77096006)(50986999)(42186005)(66066001)(6486002)(90366009)(81156014)(65956001)(38730400001)(4001350100001)(65806001)(39060400001)(36756003)(97736004)(65826007)(189998001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1404;H:[10.236.19.127];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxNDA0OzIzOnIzcEtGbkQvbE1CMjRFSHFBakN2MHhQWkFN?= =?utf-8?B?L1k0RUpxbURkZk5uTkdQaWxSTS9xYU5uWE5lQWlBQmo3VUZCbUVydFN5UUhC?= =?utf-8?B?MG5IN2lmbk1wM3QwRG1GU25HMmttbExSTUcrV0VXUFhtZ2pXWlVHUy9udSt2?= =?utf-8?B?OVlOdUdDZzkwQS9iSXNzNVR2OE56ME9pM1p1dXRzVHVhS2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FTYfvfQJbiep/7C/DjO0Esl+w4qEPElTTb3HAE1JWWHxb17+A1kczslyYrmdwa2n06ELwL7a9UkfaQenTnu6wFn0hE+umioRtJ11LebK/TSl7wuCKTvPsRxIbnM8NjJf0+TAAD9vuuhN0MMhsXgCj4x8CLM31TkA==;20:KmPnBQMzvNs+L5oy+w16o02V2xvfuNQL1tI7mHYpANLuF6y1Sg5FUe4IVTYm/Hs4LREmJHftQ8jlG4qGrhWGxqFCpxesWA/WJrdslx/hQee2tSkCkATM31EdihPzwE2KfUytUTt8V1iAjUt4SJo0+eJ6GH/7S/kFEP1q+yWnyZofyRbWnKKXmx5+1wbUhibTYn1fcM5+YUo9m/Z8qAfwEt3JPnWp7N/aShIApSLngAvc+579EEeN3qRc0QXBbCl2 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2016 18:45:39.6408 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1404 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 32 On 12/12/2016 12:34 PM, Andy Lutomirski wrote: <...snip...> > > I have a patch to make these depend on !VMAP_STACK. > >> drivers/crypto/ccp/ccp-crypto-aes-cmac.c:105,119,142 >> drivers/crypto/ccp/ccp-crypto-sha.c:95,109,124 >> drivers/crypto/ccp/ccp-crypto-aes-xts.c:162 >> drivers/crypto/ccp/ccp-crypto-aes.c:94 > > According to Herbert, these are fine. I'm personally less convinced > since I'm very confused as to what "async" means in the crypto code, > but I'm going to leave these alone. I went back through the code, and AFAICT every argument to sg_init_one() in the above-cited files is a buffer that is part of the request context. Which is allocated by the crypto framework, and therefore will never be on the stack. Right? I don't (as yet) see a need for any patch to these. Someone correct me if I'm missing something. <...snip...> -- This is my day job. Follow me at: IG/Twitter/Facebook: @grhookphoto IG/Twitter/Facebook: @grhphotographer