Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6400540imm; Wed, 27 Jun 2018 07:10:11 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKp3OqVmlI1eS9YTq3JqZgHZAZ+08VkusMbnvvZKkKiggEBagi01brkOudxOfR5b7Kgdi0s X-Received: by 2002:a65:6699:: with SMTP id b25-v6mr5401629pgw.426.1530108611402; Wed, 27 Jun 2018 07:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530108611; cv=none; d=google.com; s=arc-20160816; b=gyCUlSfGl3shd7SsPQd9TK2Fy1dhkMNYwOHzmld67uqbvPyfFSqB83ZWPyKxWnEZhn 15sdkurvxMB26pdRo/7x/AdDZvnF6XCh5ZWpTJ+DAPeTVwndmWdlAxasCkglNfjpguh2 VbpMC9gabT8N3/G3c50yQgQTZVqIhNoV0oUZQyw+ECm+OBYsvYWEeDeWVDPEHpjtF4Sy pjU2Ae1foR4K9YMKNb9r5y2SoJwc25+Q50gjUtK2Uy6GIcP5uc9c7MHl+1JoW8haqVg8 K45+8jrGJEYj9Hen6JkhUsIChGW0n9baxnY9BkLd1ocuJrp0HdHW2NKRTcC0FjoKf5WB znKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=UnjNEbUuzaUyD9jPHr9EuYO8PI0yWFPzsJeFt53mwtY=; b=UkwtXq8CAZBVqElhzdvILvtzp35wZga/maSqJAfXSDLxvq++SfLxYeGxVshC5meD18 1cJfJFGQeZxcy+Q67BERJiLlJxzkDn1g7fXY1OQi2NYGqOXV40uO2cR8wMmGtIro713j h/bMUbwQ7tcBxyNJ74/fES+OTIQanv+A5BZpafR3nnH7RlsS5pxVTNUv8J4a5DN94GeM cVnrh/J3RvdOMhGI4DM3ZaXnyFCc342R24I6t9LrvNi0quusT7rdQoktGKVxogsDpuR2 df/6KZ4AIRSTiayU77Yfq49SomN3tT/dCTDOuDJNqJjbpRNn3L8ATt6gvIb9930AUM8u N4qA== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17-v6si3485595pgv.455.2018.06.27.07.09.56; Wed, 27 Jun 2018 07:10:11 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965089AbeF0NMv (ORCPT + 99 others); Wed, 27 Jun 2018 09:12:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:56183 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753493AbeF0NMu (ORCPT ); Wed, 27 Jun 2018 09:12:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3F50EB021; Wed, 27 Jun 2018 13:12:49 +0000 (UTC) Date: Wed, 27 Jun 2018 15:12:48 +0200 From: Michal Hocko To: Richard Weinberger Cc: Jefferson Carpenter , Linux Kernel Mailing List Subject: Re: Memory zeroed when made available to user process Message-ID: <20180627131248.GA3032@dhcp22.suse.cz> References: <71d13d76-4591-9206-ebbb-5e9599f10c7c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 27-06-18 13:29:05, Richard Weinberger wrote: > On Wed, Jun 27, 2018 at 11:34 AM, Jefferson Carpenter > wrote: > > Is there a way for a user process to mark memory as 'sensitive' or > > 'non-sensitive' when it is allocated? That could allow it not to have to be > > zeroed before being allocated to another process. > > Isn't this what we have Meltdown and Spectre for? ;-) > > No, memory from the kernel is always zeroed. > libc offers malloc() and calloc() for this purpose. Well, except for the weird MAP_UNINITIALIZED. Anyway agreed that this is a bad idea and the flag should have never been merged. I've just mentioned it for completness. -- Michal Hocko SUSE Labs