Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp671721pxk; Thu, 17 Sep 2020 12:58:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIRVpIjk4+sYdJt1/mgTG+omf0ea4cfNTpZyI5H84l+x8gVXnCe8GBmfPrw/j6aciu90DD X-Received: by 2002:aa7:cb8f:: with SMTP id r15mr35555689edt.356.1600372732930; Thu, 17 Sep 2020 12:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600372732; cv=none; d=google.com; s=arc-20160816; b=giAEWOm4FxtqQc2LYuPCw6NJuDNgyHxUpUxYrmRzMq4Jdb+b9H8VREWIWlampvY0/A yW67QtS89kWYzOD7XrBKJIzRlWtEqj9wDpmFjmB/rSmzWLmYOemQiq9lOkNJGU8VjWFq urviZjs/TmqB0yUO6vTPDXKh3Hldh3p6HL73nIXgVmZ5g2Lnqig+xmHc8MMZSGKHx4g3 lS8g/a8wMaTOslg8dnEk6gLuYT7QdK3WYXK/lP5ZowVKFbiXqwt0NxKFtUY/btO9+Rm6 Nd5MeQq81goBK672zu+/iLrulQQOH+W79JqWlgmcbhtkepU51oler40UFT0qK30oxQBA 3Y1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kTdpctjr26+hadEPAalxUdZ4IHHCvTX0roS3TMkt6bQ=; b=DjSrW4epkyqyCb0VHO/at/sMTYZNKL86M/ETDkcn8e1i/a32EWrhzmExaQqPdf8pHl UbJg6GpToH91vQvBFaOZa/hZqR+vFlLCz1rLS1KlTIWwIDGl0Def/g7Oyn6Z7BXxj1BN N2REHG09w1GkFEC4DBGkurzWfMkAEKI16fOh7fy05k1TJIwDIcaLFt2grNDLydgehIFw t/z9M0IcdsTetnEiiRjHvGNXawJGA6fUL9uzvFJiZoAw0FCdqRrx+oPrYF+81zDkr56c iPp+Yu36GF93dzml2LK4fUgYXUPgYXHeQHfSQaTRRlP8hR5ucOBi3vlevcGRlLx8AWOK m88Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=fnDxZUej; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si534179edy.380.2020.09.17.12.58.29; Thu, 17 Sep 2020 12:58:52 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=fnDxZUej; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727740AbgIQOo5 (ORCPT + 99 others); Thu, 17 Sep 2020 10:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727239AbgIQOlB (ORCPT ); Thu, 17 Sep 2020 10:41:01 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A9AFC0612F2; Thu, 17 Sep 2020 07:41:00 -0700 (PDT) Received: from zn.tnic (p200300ec2f1053001db76021617d6ec9.dip0.t-ipconnect.de [IPv6:2003:ec:2f10:5300:1db7:6021:617d:6ec9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C42331EC0260; Thu, 17 Sep 2020 16:39:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1600353567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=kTdpctjr26+hadEPAalxUdZ4IHHCvTX0roS3TMkt6bQ=; b=fnDxZUejBlcEL1dJreJ2gTSVjd0tdD7ozJi6uNPbe2/LV10xJTqaOiO1WGzuHHpWUivcPV IKKnRdQgbsK5HGvs2ZhPrKT6U7h/I5hkHmOkYIsHo7n6TBB5agBEEkgBGYqFsrYYRkFvOk mimTMJp1UL0YcNXTEOOT5K/ct5ozFgM= Date: Thu, 17 Sep 2020 16:39:20 +0200 From: Borislav Petkov To: David Laight Cc: Andrew Cooper , Andy Lutomirski , Nick Desaulniers , Andy Lutomirski , Bill Wendling , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , Greg Thelen , John Sperbeck , "# 3.4.x" , clang-built-linux Subject: Re: [PATCH] x86/smap: Fix the smap_save() asm Message-ID: <20200917143920.GJ31960@zn.tnic> References: <441AA771-A859-4145-9425-E9D041580FE4@amacapital.net> <7233f4cf-5b1d-0fca-0880-f1cf2e6e765b@citrix.com> <20200916082621.GB2643@zn.tnic> <20200917060432.GA31960@zn.tnic> <20200917115733.GH31960@zn.tnic> <823af5fadd464c48ade635498d07ba4e@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <823af5fadd464c48ade635498d07ba4e@AcuMS.aculab.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2020 at 02:25:50PM +0000, David Laight wrote: > I actually wonder if there is any code that really benefits from > the red-zone. The kernel has been without a red zone since 2002 at least: commit 47f16da277d10ef9494f3e9da2a9113bb22bcd75 Author: Andi Kleen Date: Tue Feb 12 20:17:35 2002 -0800 [PATCH] x86_64 merge: arch + asm This adds the x86_64 arch and asm directories and a Documentation/x86_64. ... +CFLAGS += $(shell if $(CC) -mno-red-zone -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mno-red-zone"; fi ) Also, from the ABI doc: "A.2.2 Stack Layout The Linux kernel may align the end of the input argument area to a 8, instead of 16, byte boundary. It does not honor the red zone (see section 3.2.2) and therefore this area is not allowed to be used by kernel code. Kernel code should be compiled by GCC with the option -mno-red-zone." so forget the red zone. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette