Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1059102pxu; Thu, 8 Oct 2020 02:06:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZjhBQHhW3YVN6plkdE9FFQ6OIWakRM3C6f5yzu6x2YNt+OhngdI+B/ptH1kFqAROGtl7G X-Received: by 2002:a17:906:1e15:: with SMTP id g21mr7341787ejj.131.1602147985145; Thu, 08 Oct 2020 02:06:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602147985; cv=none; d=google.com; s=arc-20160816; b=pU7H24wGWhpVthvBY2BRKWJX76J9Q+MAYvhZpf4r5IXGiCDYagQDh3tKQ5Mko7iUvz 8mAQJo0aCh1T0Xi3bQ1ZvLbInbqFL5IStX/bwEde0bJR1MfJvPqIweGJutB9KfIbAZwQ yprn7ThDHnWCrEgTHPn5m2WVoCet9ESKNh/J3YAvP38VnedD+JIgD2g1IP8SDAjd3vMY SfyV/dKusOU+N9ScVK7AORizgntp3u9P7DMci0dJ+2nrRmAoNmYOtLpBF6WCYLje8EO4 c0deGpOirTsTG1Pb2diklJ+Yi/XxnIMZCOQOz+g/JgDx1muyEFTAo4TAevkcSb9W0vUD X8KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6Y6JH/g0Gqe74G+bP+Xdmzy6988somUd2eVk1p9TGmY=; b=YpGhxNnObYC5UI5aQU5O/RSVa8J+ItkIN8nlwRQF37pN4ygJPD8Kf1ni0JPftCeSzF vjglQKmi2ZGtXCmWLkG4yicks3YfUdq5mHCbLMZiaot7HjWJDkarT4mIxXl5K5VWWW3H 9nYep31QztRPv5pOoXKt0KrRdo113ESJBGqR6JYFjinUJNjrZ0cy6XdKik2Lq8EnMwDR 5oGaH0ax0KHixKk5gJ/m6m3QjziE+QqbT8vSyPXPQcrKYdaGv2xQGJ5VOUbgcniM3VEO FUvfO13ZsfXDJfOd0LoRY3DzMfOa8xP9KlO4UP3HCK0leabwAL9u8Jsi1QWZjgCQZQgD ClQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si3496982edj.578.2020.10.08.02.06.01; Thu, 08 Oct 2020 02:06:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726754AbgJHImW (ORCPT + 99 others); Thu, 8 Oct 2020 04:42:22 -0400 Received: from mx2.suse.de ([195.135.220.15]:48872 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbgJHImW (ORCPT ); Thu, 8 Oct 2020 04:42:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 101C0AD32; Thu, 8 Oct 2020 08:42:21 +0000 (UTC) Date: Thu, 8 Oct 2020 10:42:19 +0200 From: Joerg Roedel To: Arvind Sankar Cc: x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/5] x86/head/64: Disable stack protection for head$(BITS).o Message-ID: <20201008084219.GC3209@suse.de> References: <20201007195351.776555-1-nivedita@alum.mit.edu> <20201007195351.776555-6-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201007195351.776555-6-nivedita@alum.mit.edu> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2020 at 03:53:51PM -0400, Arvind Sankar wrote: > On 64-bit, the startup_64_setup_env() function added in > 866b556efa12 ("x86/head/64: Install startup GDT") > has stack protection enabled because of set_bringup_idt_handler(). > > At this point, %gs is not yet initialized, and this doesn't cause a > crash only because the #PF handler from the decompressor stub is still > installed and handles the page fault. Hmm, that is weird. Can you please share your config with which this happens? I have a commit in my local branch which disables page-faulting in the pre-decompression code before jumping to the uncompressed kernel image, and it did not break anything here. Also, what compiler did you use to trigger this?