From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8013C433E0 for ; Mon, 22 Jun 2020 21:26:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9606020732 for ; Mon, 22 Jun 2020 21:26:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="J00hIsrX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9606020732 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 02FBD6B0002; Mon, 22 Jun 2020 17:26:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F22DB6B0005; Mon, 22 Jun 2020 17:26:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E110C6B0006; Mon, 22 Jun 2020 17:26:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0050.hostedemail.com [216.40.44.50]) by kanga.kvack.org (Postfix) with ESMTP id C549B6B0002 for ; Mon, 22 Jun 2020 17:26:29 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 38054AD6F1 for ; Mon, 22 Jun 2020 21:26:29 +0000 (UTC) X-FDA: 76958131698.07.scene09_200615126e36 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 0D6721803F9D2 for ; Mon, 22 Jun 2020 21:26:29 +0000 (UTC) X-HE-Tag: scene09_200615126e36 X-Filterd-Recvd-Size: 4613 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Mon, 22 Jun 2020 21:26:28 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id x207so9000348pfc.5 for ; Mon, 22 Jun 2020 14:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+fGVHQGbJSfeZpDFh+8/BeMq0iFulsSXIRYour5Vm0w=; b=J00hIsrXU7lUbB9T6uH+6OCvgVWQVpgD3QI0ZPH4Hk8LTAUfUiRewvjxyBQzGiD1ve iFnCJBgzFqit6FhHqe5BM8n1JJmg8rHtVkq3RtopnM4OgUUVSs4z5vEKGujmdV8eaHzg QPi3H0BTKGLlJqCPNPE+nQs3/vQLHDYWXLkWY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+fGVHQGbJSfeZpDFh+8/BeMq0iFulsSXIRYour5Vm0w=; b=MMBUn7m3MNQPTFqLji85VRH2KDhC3D+wMT1PKo8y67DUI53vLsk7pvno1AcVdcw3W3 L2Zbaz0GZyvyrxUY2f89MCmfpfW++jkvQS9txiR6P1bJYiuvq06iU+y7gzKL3bTfDPHa X7oyF0XddapdGDITqJhwmzrB5uanyRyasRFdzcYtZuchOolPftuBLUB+C52fiTIOD75b fvbpDSwBs2/ut1sD6/28Nf3O6tlH9I2abdUExyvNba5vc20B0I83jMe1OcHowoxDOORl RGjyRaQq50nssPc4eI6ut68/XH2htnEP84cg6a9DtrQt2gACeSz8lgTjP+uWI98/3klJ e5XA== X-Gm-Message-State: AOAM5319MONsrNhEPpXOjsvvJpKIV507a8e50Njo2vNUFNmbcGlwRAk3 Px2AnnEy5YPan/dCAHUGeRx9BA== X-Google-Smtp-Source: ABdhPJz9FSwoUGnk0FK8dRtqojR7DRsccJU6Ok7KN9Xp0A18XOCuQ0Au72MfAI1gfeRNqQL2b31VvQ== X-Received: by 2002:aa7:8a4c:: with SMTP id n12mr22059315pfa.326.1592861187688; Mon, 22 Jun 2020 14:26:27 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id u35sm11783923pgm.48.2020.06.22.14.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 14:26:26 -0700 (PDT) Date: Mon, 22 Jun 2020 14:26:25 -0700 From: Kees Cook To: Randy Dunlap Cc: Thomas Gleixner , Elena Reshetova , x86@kernel.org, Andy Lutomirski , Peter Zijlstra , Catalin Marinas , Will Deacon , Mark Rutland , Alexander Potapenko , Alexander Popov , Ard Biesheuvel , Jann Horn , kernel-hardening@lists.openwall.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/5] stack: Optionally randomize kernel stack offset each syscall Message-ID: <202006221425.805E17B67@keescook> References: <20200622193146.2985288-1-keescook@chromium.org> <20200622193146.2985288-4-keescook@chromium.org> <87a7b943-ed15-8521-773e-c182a37ee61e@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a7b943-ed15-8521-773e-c182a37ee61e@infradead.org> X-Rspamd-Queue-Id: 0D6721803F9D2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 22, 2020 at 12:40:49PM -0700, Randy Dunlap wrote: > On 6/22/20 12:31 PM, Kees Cook wrote: > > This provides the ability for architectures to enable kernel stack base > > address offset randomization. This feature is controlled by the boot > > param "randomize_kstack_offset=on/off", with its default value set by > > CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT. > > > > Co-developed-by: Elena Reshetova > > Signed-off-by: Elena Reshetova > > Link: https://lore.kernel.org/r/20190415060918.3766-1-elena.reshetova@intel.com > > Signed-off-by: Kees Cook > > --- > > Makefile | 4 ++++ > > arch/Kconfig | 23 ++++++++++++++++++ > > include/linux/randomize_kstack.h | 40 ++++++++++++++++++++++++++++++++ > > init/main.c | 23 ++++++++++++++++++ > > 4 files changed, 90 insertions(+) > > create mode 100644 include/linux/randomize_kstack.h > > Please add documentation for the new kernel boot parameter to > Documentation/admin-guide/kernel-parameters.txt. Oops, yes. Thanks for the reminder! (I wonder if checkpatch can notice "+early_param" and suggest the Doc update hmmm) -- Kees Cook