Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp221630ybp; Thu, 10 Oct 2019 16:58:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJ6aZ4ZRZtcYO0EzuCg6VZNb16DE4GUEy3AToxnYPfbss6z9/s0JNdsuwgAFtucU52UbEf X-Received: by 2002:a17:906:bcdc:: with SMTP id lw28mr10845155ejb.183.1570751891876; Thu, 10 Oct 2019 16:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570751891; cv=none; d=google.com; s=arc-20160816; b=Rcxp77hx2Fmbjdc+aVdqxjaaU5R3vnibv4uP/FnSS73iScMDbXiYI7nrmseSba7bgY 5lbpa3jNNnk4za0oNk4ubmMCwYELDzknafVQhCfXrbvLOImY9SAbpc+ajo1vO6wWJ4d5 A6OrzCV0+pVYboLFejAHbUQGCvC21kzDMwBwG9zzRU5qu0N7N2QvCx0NekMTzIFCcC2A AJLBb6IUFamtc4XEWunio3XbRygxnSxUx5AXQ/nBPSEmDICprpgd1IVQyZqKy2JLSgGk y5fvBi3eTNJaKqsOSoj/+jEZN8zvsVJXwmnsi7iJfb2ZI+ct4StR58BLe7xrO6ZX11wV Xy2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JDPAnamTFIBp8EbgTewpJ7Tw/YLIi8XdRk99n5ihTZ0=; b=gUkXKyJGRVrXCiXr0v8RE4DRe2OD9emQW9cGiv28raMCB0pq8NUv/lxxl7aDp91mI2 jF8ivwMwNZZ3FgJNSWkFrNFxQX4xeFRf+OmDp5JsjVPXi5tPNgZmsqagp989epKY4jJP gQEglC2H8Ymsc5nIXl5RVvoL8QxMQikt7pB3rq3QrsmVh/M2/K9iCIRxL6ITxhaof/vE SR4PmkqQAUkSl1GuQPGS2AXtJY00FvOcRKXVNe2aN0HG9/K4HWQCAF93AYu/kyvm+pvj OAUejCzNtxRB73xQJ2WFuR5Sc4nA63DfCnU7QU2GGBdIHBD/tYuVuvLbX4BZhqXSgum1 jJZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Db/oz2S5"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si3898472edo.14.2019.10.10.16.57.47; Thu, 10 Oct 2019 16:58: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; dkim=pass header.i=@chromium.org header.s=google header.b="Db/oz2S5"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbfJJX5j (ORCPT + 99 others); Thu, 10 Oct 2019 19:57:39 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34582 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbfJJX5i (ORCPT ); Thu, 10 Oct 2019 19:57:38 -0400 Received: by mail-pg1-f195.google.com with SMTP id y35so4695731pgl.1 for ; Thu, 10 Oct 2019 16:57:38 -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=JDPAnamTFIBp8EbgTewpJ7Tw/YLIi8XdRk99n5ihTZ0=; b=Db/oz2S5lstBws+DqElygyxc81UBHBsr+H3aP9d7X1Exv8x5nrqyE8LlbCfAHNDI33 C0Lez0UyqONC9IaOea8gT8nPL1/x5uCEuR2jRaabo/Im85fb5YQ8dXKHBhHzlSwEU26t LMRAjaDuj9AVfrjyE4E00p9tS9qPnDSjC8rv8= 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=JDPAnamTFIBp8EbgTewpJ7Tw/YLIi8XdRk99n5ihTZ0=; b=ixJhXB9XU8LNqHasdX2q6dS/Yi9/HctBQAmlChUbSgKW/sHlCnRtuOptpPkHDjdqoJ Dr8PUa1GPUFK99hP9ArL69TxDFvascuC7OeBBvL0y4IYfax0/D8qeNdcdvWoscakSsyb 7MA8j+Brjy2wUrB1XQpBc9eSgPP1fEjvKMULn8qsIkxoD3/8gywyUZk8N1GG4TAxQz+I UpnXpZB/0azMHZVK4D4VhuKp/8yX8cXoBBqBwbJBhyHLXAKer9g12HhjukXt7tkDAqXr Xj2Vk+2pb35TQeqmcAynfTqREZ2VGugC1djEKEPlK+XkC1wML+gJ1V+2F8F4kh5FBdoq CCXQ== X-Gm-Message-State: APjAAAVkgsqL8qlSRSFZcCU2JZPgFj3EytOGUpTw4nFbBxPwzRLRZGTj AKkGtf8PQ70L4lESbVObm8Ij/w== X-Received: by 2002:a17:90a:cc12:: with SMTP id b18mr13644961pju.141.1570751858072; Thu, 10 Oct 2019 16:57:38 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b4sm5035339pju.16.2019.10.10.16.57.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 16:57:37 -0700 (PDT) Date: Thu, 10 Oct 2019 16:57:36 -0700 From: Kees Cook To: Borislav Petkov Cc: Thomas Gleixner , Rick Edgecombe , Ingo Molnar , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Arnd Bergmann , linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Michal Simek , linux-parisc@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/29] vmlinux.lds.h: Refactor EXCEPTION_TABLE and NOTES Message-ID: <201910101657.234CB71E53@keescook> References: <20190926175602.33098-1-keescook@chromium.org> <20191010180331.GI7658@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191010180331.GI7658@zn.tnic> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 10, 2019 at 08:03:31PM +0200, Borislav Petkov wrote: > On Thu, Sep 26, 2019 at 10:55:33AM -0700, Kees Cook wrote: > > This series works to move the linker sections for NOTES and > > EXCEPTION_TABLE into the RO_DATA area, where they belong on most > > (all?) architectures. The problem being addressed was the discovery > > by Rick Edgecombe that the exception table was accidentally marked > > executable while he was developing his execute-only-memory series. When > > permissions were flipped from readable-and-executable to only-executable, > > the exception table became unreadable, causing things to explode rather > > badly. :) > > > > Roughly speaking, the steps are: > > > > - regularize the linker names for PT_NOTE and PT_LOAD program headers > > (to "note" and "text" respectively) > > - regularize restoration of linker section to program header assignment > > (when PT_NOTE exists) > > - move NOTES into RO_DATA > > - finish macro naming conversions for RO_DATA and RW_DATA > > - move EXCEPTION_TABLE into RO_DATA on architectures where this is clear > > - clean up some x86-specific reporting of kernel memory resources > > - switch x86 linker fill byte from x90 (NOP) to 0xcc (INT3), just because > > I finally realized what that trailing ": 0x9090" meant -- and we should > > trap, not slide, if execution lands in section padding > > Yap, nice patchset overall. Thanks! > > Since these changes are treewide, I'd love to get architecture-maintainer > > Acks and either have this live in x86 -tip or in my own tree, however > > people think it should go. > > Sure, I don't mind taking v2 through tip once I get ACKs from the > respective arch maintainers. Okay, excellent. I've only had acks from arm64, but I'll call it out again in v2. Thanks for the review! -- Kees Cook