Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2652534pxp; Tue, 22 Mar 2022 03:18:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYVZYWzPlsg78HY2jlzuPVYFjDCLR8hO3egNzrZRKlBHJkn0VDa9B59c175c9fEpEzuYeF X-Received: by 2002:a17:902:9a02:b0:14f:2d93:92f4 with SMTP id v2-20020a1709029a0200b0014f2d9392f4mr17969958plp.160.1647944311703; Tue, 22 Mar 2022 03:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647944311; cv=none; d=google.com; s=arc-20160816; b=mHSFOuRI8QvdpO26+Pqk1FCXQKf9e0dPEx1UVQZg556BDy0jGe5uuQ6lT08nBtuojE mRGFF+QPngNgHhLN1LYwGrzR8g9BBozOXK+TkDXyCpsn10MzTEbL+RWe8IPNq7oCgixZ LjlpIionyAFwCZu+1bOqsC51sXNMDTBTJBGTzXPZgwPxI0egAQkvClSKDKTi4mCP6bm2 Bp5qC1D1nLr3E3FLSlJPP57Zb46pAEOiPyTFmelIP2Q3bemZ452i47sBdgXuFSC2WkiS qGSB6CD7Ece1eq3L3Pa9pGyQIGPjyGS5BmSDyCRqIYba8e6jO/U2f2PZHFN66e+Jw2Ps l7AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=lTfGQWEnTz0n7sHn0/RnVcUouK9t/cedOIG6BsDT1BY=; b=OiEZ1xv76atQ9IivrZrYTbfCqrWCIJ7LBepfc5B890p4kz/BsQ//ttsQ+lBOyY05GF XDvl5QxwlDPpq+Xuma/R2A5+k5Tr9LoDudsk/B8+Zu0J1mksS4HQCCc/vQrcBrdiimYW uyuWZybu6vkaWI3kFoGWbFt/W64XGTLILdnUHCv8YKO4goi1nMCaeM465Y5kaxBZImwn MShtcQNr4OkmBn9F6CW+WBwbF2PneFQIsEJnVKVN3UyZyAeOgmkiCIwJAH3scjaa3h3g p+8VvDCAb27SOWr0HhU8FBtJiPa2tl7DFnRbJ+TNfbyo8v+27NI5fjtfRGXZda5X3+Rp z4hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="h/RXRssY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gg14-20020a17090b0a0e00b001befa3ba5ebsi1735141pjb.17.2022.03.22.03.18.16; Tue, 22 Mar 2022 03:18:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="h/RXRssY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232346AbiCVJQ3 (ORCPT + 99 others); Tue, 22 Mar 2022 05:16:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232324AbiCVJQ3 (ORCPT ); Tue, 22 Mar 2022 05:16:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB3C29CA2; Tue, 22 Mar 2022 02:15:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id ED727B81C59; Tue, 22 Mar 2022 09:15:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DAFAC340EC; Tue, 22 Mar 2022 09:14:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647940499; bh=WINthaWEckUg/sw0H371TWwDWslpgqf/pcyy3jLtdrQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=h/RXRssYXgvARgN2tqZnMmbKhZfNUhhZWVQKzU8xjhO87aHYUFM3tcIRPXZF8evcm 1mK/I8kWc0EAdCnLT3NiqCQJBfeFzQg11c8DfWEoCrH9FdSJi8HmBmzPar6XP/gTB2 hCw6V1Jm0XjMMaBMOPN/JxUTCbTxYPiYghuG+N2A73r7GHGk+5DIOAMCGjypmQLe77 qyTAuReggOQs4z4ROUD7dzuBzceoZ/0i0KFfrQ1dok37VXAObaZ9aZ47fkSYkE2ZKj vgCqXYTd7eZr+RMue4/vAhlduhz8Gb8ljm7eby0lrwjm4eDPBFbLnJG0AyNiZYoWDW cfVM15bijCA4A== Date: Tue, 22 Mar 2022 18:14:54 +0900 From: Masami Hiramatsu To: Peter Zijlstra Cc: Stephen Rothwell , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Linux Kernel Mailing List , Linux Next Mailing List , rostedt@goodmis.org, ast@kernel.org, hjl.tools@gmail.com, rick.p.edgecombe@intel.com, rppt@kernel.org, linux-toolchains@vger.kernel.org, Andrew.Cooper3@citrix.com, ndesaulniers@google.com Subject: Re: linux-next: build warnings after merge of the tip tree Message-Id: <20220322181454.659b15269d8c2e2348f19ba1@kernel.org> In-Reply-To: References: <20220321140327.777f9554@canb.auug.org.au> <20220322143136.0e78366c3521b54b7b9385b8@kernel.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Mar 2022 09:08:22 +0100 Peter Zijlstra wrote: > On Tue, Mar 22, 2022 at 02:31:36PM +0900, Masami Hiramatsu wrote: > > > > Also, I think both should fix regs->ss. > > > > I'm not sure this part. Since the return trampoline should run in the same > > context of the called function, isn't ss same there too? > > It creates pt_regs on the stack, so the trampolines do: > > push $arch_rethook_trampoline > push %rsp > pushf > sub $24, %rsp /* cs, ip, orig_ax */ > push %rdi > ... > push %r15 > > That means that if anybody looks at regs->ss, it'll find > $arch_rethook_trampoline, which isn't a valid segment descriptor, or am > I just really bad at counting today? Ah, got it. It seems that the ss was skipped from the beginning, and no one argued that. > I'm thinking you want a copy of __KERNEL_DS in that stack slot, not a > function pointer. The function pointer is for unwinding stack which involves the kretprobe. Anyway, I can add a slot for ss if it is neeeded. But if it always be __KERNEL_DS, is it worth to save it? Thank you, -- Masami Hiramatsu