Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6357386imm; Wed, 27 Jun 2018 06:32:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKInp12py7pGwdMnJAM454SPli/6n5CAmpaZFgMjUEL6wGZ7WPW5Sl41Gq1vNx1XMbm4OIFA X-Received: by 2002:a63:714e:: with SMTP id b14-v6mr5025036pgn.73.1530106354359; Wed, 27 Jun 2018 06:32:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530106354; cv=none; d=google.com; s=arc-20160816; b=ouDIRXGxebZayPszb9VJB3C9yoDa+JicEu/hQ/rDtAzOcQE1GHo6no7ozlGpXX1A2E YC1oMv9wkECOHK9Yykp4MMeBdt7/lFT0RIRUTbjVusJHEkklPVee7zwP2BNi4N5gqk5O E7MvTC2DE3B9L/p/IKFc4QZxXi7SNdPCFcwmy4T3GYXRGTXZPdhtbvG73wYc5/qIE6v5 wvzAgWxeio9GoFc/bIQXY3rXpsSwvU+N4IO9tSFIHaJcc/+43hvyxEy/uJXBRIjAZ2bN EFKc64kFYwMGttm+8WNvlf8vfXzAbIlQEM8iXTb9VCGawoZmFCUXWTEf+Tw47JgXmZVa 1uhQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/9zvCTOGosz6vTIrBUyk9rT2jfoejHst+odXm0xlnSg=; b=eZdklspZBfv7j2L7TVu3WJkIP6rG0Ud6W8yQpz0gfkJ7cpz3o1WHMoHkG1aD5jQdb4 +/5lbjT20keGOiT1G0ULXvJmv28YNqF0DRMwMh66sM03e7BZxM2SeyhtiP5W6ShcLrgd d9L/1LpxPM/wCdk3le54g88xb/VLwGonGFfRtm09dBQeQw/MR5jqbHl0vz+Sgzm/7Zja +OoFYFikzMzlkP8uohvqj3QQZ/GjSoo90sJLT7u9+hfxyf3EjlTdjwbtZ4FuriQ+te+y OY4qlvH4Uq0TcwUikndUFafgUrwWG698Wop2+BJM/qP0KOP5B3PbC7hpy43ZptlIs6GI FwIw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3-v6si2490006pgn.586.2018.06.27.06.32.18; Wed, 27 Jun 2018 06:32:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965347AbeF0NTC (ORCPT + 99 others); Wed, 27 Jun 2018 09:19:02 -0400 Received: from lilium.sigma-star.at ([109.75.188.150]:48600 "EHLO lilium.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965216AbeF0NTB (ORCPT ); Wed, 27 Jun 2018 09:19:01 -0400 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id 7757E18198DEB; Wed, 27 Jun 2018 15:19:00 +0200 (CEST) From: Richard Weinberger To: Michal Hocko Cc: Richard Weinberger , Jefferson Carpenter , Linux Kernel Mailing List Subject: Re: Memory zeroed when made available to user process Date: Wed, 27 Jun 2018 15:18:52 +0200 Message-ID: <2634793.Cb5OrAPIO5@blindfold> In-Reply-To: <20180627131248.GA3032@dhcp22.suse.cz> References: <71d13d76-4591-9206-ebbb-5e9599f10c7c@gmail.com> <20180627131248.GA3032@dhcp22.suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mittwoch, 27. Juni 2018, 15:12:48 CEST schrieb Michal Hocko: > 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. Oh, I forgot about the crazy nommu world. :-) Thanks, //richard -- sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria ATU66964118 - FN 374287y