Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2369685rdg; Sun, 13 Aug 2023 23:22:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbP9VXPHpNm7LzGXN3AyhtaBus93rWszEB8goyyUdYN8ZHGpbnNwci8OgyqAkZ+ys2Zbh/ X-Received: by 2002:a17:907:2cd3:b0:998:de72:4c89 with SMTP id hg19-20020a1709072cd300b00998de724c89mr7961819ejc.50.1691994142907; Sun, 13 Aug 2023 23:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691994142; cv=none; d=google.com; s=arc-20160816; b=paE/4gi6bKMFRsO0dTwBczdYX3Isq1Z5yumQb/kpi9NNacuWXLCRkbGlMTEN3Ht1Df KpWK1czaPowhFIlWSDl36pbWIWUuSbxuy8MSY4edOfqJXu5VHefvZzR7c9quZTRnv9m9 XlbsawYQvoZpsBe2lJDLVI8tMgtsJObKlXFpKS96ZHZxNGzpiT+JcHjPfUodDNWFSRiK hMlbZzCYqq873yh0KMSJQxGLg2xJme3zm8STNtUfuhJF3n8qdv4Uu5EdG24tLz9GhtoP Xcqcx5SdO9inledVNC6yNPx8bRLhbIsTtZAzodAx6maUMCyJsjOeS8CjBXAxH9jYCWRz c+GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=zVlgO2sAqJkYGQcTXCZtVnGQe4DRTxB6BwAX3Ae4Wlo=; fh=On/hocGQcaDN8O+wk8hYcs0u18K0poFHF3Q0N6hQGpM=; b=HmmknfK9NnDk9Vlel/axajKHis3yXoNedddBFsdWyXROSbbw0PgYCn97YkIxPNMNxl E1o5mOhFU4MJcop5NStx+zIjDc0445DTdSKK0IGGWZgOQKNZHWOTCBtDmqNRaBdQA+yt o/OmCrBeMOG/tIIL5NhvmhtCFFjN9UjWHlG4l+45omahvs6nb82JtQWFij46SuXVSbEW /Rg3oK6gjwSZV1HOA4q2/ajCqUX8yEaWSynuegYNkts8wZUbT0gwJv6TUMfuE2anIIZy ts4jGZ7l+UyXhHx6+J6v5Ckvc9m67GRw69FkYlmb0GIscU2m7ErqXnDko0slHZCKGF7C TrFA== 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 li24-20020a170906f99800b00993150ed537si7260268ejb.189.2023.08.13.23.21.57; Sun, 13 Aug 2023 23:22:22 -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 S232387AbjHNDCw (ORCPT + 99 others); Sun, 13 Aug 2023 23:02:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232741AbjHNDBy (ORCPT ); Sun, 13 Aug 2023 23:01:54 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CE1EC10D7; Sun, 13 Aug 2023 20:01:33 -0700 (PDT) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8AxV_EMmdlk2t0XAA--.49753S3; Mon, 14 Aug 2023 11:01:32 +0800 (CST) Received: from [10.130.0.149] (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxjiMKmdlkNkNZAA--.48747S3; Mon, 14 Aug 2023 11:01:31 +0800 (CST) Subject: Re: [PATCH] MIPS: Remove noreturn attribute for die() To: "Maciej W. Rozycki" References: <1690887599-11442-1-git-send-email-yangtiezhu@loongson.cn> <13aaa917-e55d-f529-8b3f-cab285402808@loongson.cn> Cc: Thomas Bogendoerfer , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn From: Tiezhu Yang Message-ID: <17bc8aca-6590-02ac-cb03-95d4b5af1d40@loongson.cn> Date: Mon, 14 Aug 2023 11:01:30 +0800 User-Agent: Mozilla/5.0 (X11; Linux mips64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID: AQAAf8AxjiMKmdlkNkNZAA--.48747S3 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBj93XoW7tr1rZFy7JrWDWw13Ary5trc_yoW8CrWkpa 48Ca9YkanrJa4IkFs2yw4xJa42kF1rGry5Jr95K3ykur15Xr9IyFWxtw4F9Fn2grsagw4q qw4jqa4jqa4DAagCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUvFb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jrv_JF1lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCYjI0SjxkI62AI1c AE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8C rVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtw CIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x02 67AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr 0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxU7_Ma UUUUU X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 08/14/2023 05:30 AM, Maciej W. Rozycki wrote: > On Wed, 9 Aug 2023, Tiezhu Yang wrote: > >>> So you want to keep a task alive that has caused a kernel oops in the >>> process context in this case, right? What purpose would it be for and >>> what condition causes `notify_die' to return NOTIFY_STOP? IOW why is >>> there no need to call `make_task_dead' in this case? >> >> I did some research, hope it is useful. ... >> >> This requires making die() and die_if_kernel() return a value, >> and their callers to honor this (and be prepared that it returns). > > Thanks, that indeed helps, though indirectly. I think the most relevant, > though still terse explanation comes from commit 20c0d2d44029 ("[PATCH] > i386: pass proper trap numbers to die chain handlers"), which I believe is > the earliest of similar changes. The patch was originally submitted here: > and hardly > any discussion emerged, but I think the key statement is: > > "[...] honor the return value from the handler chain invocation in die() > as, through a debugger, the fault may have been fixed." > > Now it makes sense to me: even if ignoring the event will make the system > unstable, by allowing access through a debugger it has been compromised > already anyway. > > So I think your change will be good if you update the change description > to include the justification quoted above rather than just: "the others do > it too, so it must be good" (though you can of course mention that your > change also makes our port consistent with other ones). I suggest linking > to the original i386 submission too for future reference. Thank you very much. > > Also I note that you combine three independent changes into one, so > please split it into individual patches as per our requirements. > Will do it in v2. Thanks, Tiezhu