Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2400104rdb; Thu, 17 Aug 2023 22:16:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5rHSISUVJrAZ64xuj7AsTEHLZlSIgiA1aXtCKma72wHBIHhwsPyZIldInX6BpHSLjQykn X-Received: by 2002:a17:906:53d8:b0:99d:b9d6:6014 with SMTP id p24-20020a17090653d800b0099db9d66014mr1050646ejo.4.1692335789911; Thu, 17 Aug 2023 22:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692335789; cv=none; d=google.com; s=arc-20160816; b=k2zZe49jTI+iFWTshhhiYJarQEIzpCm0KJEzv60xl8F05YuLnI2WoVZxVU7agjkp9x tp7bUg+QT8JjthXkZ5viptYBgZ5sJWeZjJ1p6ivc8Eyow9xGcHw+g+AKeNp4Uu42ZNCa y26r6JSTpKwxDGEzrF9KXYAP2fnJN6l14mKslp4qTg8+XtCc98ezUxw4PYpEfQbHQXIh QwcmX0JrjP0ExQfFIj6KUFTbzTSQRIc0ywyZIC5IA/at4tojmPGyz9ERyv/KWoqlMw/I r/D6bXCLvcG5TGq2XTiXDTWH908tneplU7uoT15nsPp9BwrqrKMp3nH+/jVYc3ywmFle D1PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=2so6cCZwdiqaJof2p9gFZGcHpYhJIEJth40rTbhEfxY=; fh=Qg7Eod8FjN06dERbE1bHl4TAMb3b3ZUVvAGinRSXYXA=; b=QuUbQU+/1hU5B7oP4fIFZNHDPtMoWeMRtlVwoUFtSWuLhkcuG51nOPQfqrA//7kDm3 gNqepTujWfyOOFZFlbH9Rzc+RGH659F7fImHwY4fz0zjI730XpXxg005/hUlo3y+g76s QpNI732BvSxBNfswXe2g8zOuhLMkz3wJDhOA+67XRKwu1i3QNevEUbUNEh2uQJVQygBs v1OU3FVse1QwCGH7KN0Wr2YdeB1i7oO2OFnMCaS04billfi1PhsaDZDxzYenoaUZA55+ 0zhcmhqkG9+L7vKhxt1hd+j1UtPyZD66XfPc2NNC3TE7BNyR0S8cCLYkRYYJtmtyVfjB KOuQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a17090625ca00b00992aaed9f81si760929ejb.356.2023.08.17.22.16.05; Thu, 17 Aug 2023 22:16:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357283AbjHRCkU (ORCPT + 99 others); Thu, 17 Aug 2023 22:40:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357290AbjHRCj6 (ORCPT ); Thu, 17 Aug 2023 22:39:58 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8349F273C; Thu, 17 Aug 2023 19:39:56 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 6B4D192009C; Fri, 18 Aug 2023 04:39:55 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 63E9392009B; Fri, 18 Aug 2023 03:39:55 +0100 (BST) Date: Fri, 18 Aug 2023 03:39:55 +0100 (BST) From: "Maciej W. Rozycki" To: Tiezhu Yang cc: Thomas Bogendoerfer , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Subject: Re: [PATCH v3 1/3] MIPS: Remove noreturn attribute for nmi_exception_handler() In-Reply-To: <1692005246-18399-2-git-send-email-yangtiezhu@loongson.cn> Message-ID: References: <1692005246-18399-1-git-send-email-yangtiezhu@loongson.cn> <1692005246-18399-2-git-send-email-yangtiezhu@loongson.cn> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 Mon, 14 Aug 2023, Tiezhu Yang wrote: > In the later patch, we will remove noreturn attribute for die(), in order > to make each patch can be built without errors and warnings, just remove > noreturn attribute for nmi_exception_handler() earlier because it calls > die(), otherwise there exists the following build error after the later > patch: I find the wording a bit odd here, but you'll have to rewrite the change description for the update requested below, so let's defer any style fixes to v4. > arch/mips/kernel/traps.c:2001:1: error: 'noreturn' function does return [-Werror] Now that I've looked into it in detail, this change is incomplete and will make the kernel go astray if `nmi_exception_handler' actually ever does return. See code in arch/mips/kernel/genex.S, which calls this function and doesn't expect it to return. It has to be fixed before 2/3 can be considered. I wonder how you didn't catch it: you did check how this code is used, didn't you? Before submitting an updated version can you actually arrange for the NOTIFY_STOP condition to happen in your lab and verify it is handled as expected? And what was the motivation for this code update, just a hypothetical scenario? Maciej