From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4606C433F5 for ; Tue, 15 Mar 2022 13:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:CC:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=3R9jDv4/+4I4Cn1rROuH/uZhcWVJ1ZrjhnK8eLaBDyo=; b=CvdKkhhOXigzg6NZiEJdhry+AX E3ofSUNHB+6xCWdFWSdCbF+wvT7MWysq+sVI6HuAOcF8px3Q11pCB+pbhG5vEL/FBq99YTCyKVPBb JOWTaTgDOx+3QnYZTT1yllCZucbP9aMYpzIqnh6QoitVWiu3I67fr+4Ji5y+Z0wjV6IdCP1ZWIWp4 mq5v8SIwQEzUUQCra5qAagMYtONvJGh2s2K6SsU5hiP7RDHZGjqgciNHW28HgVarOl7E43rnfIHF2 thpXaQA49iIoJDvTErqHKHmEINoCcJEDKUbrfnPUBzbaPP4RIEntgLhHRpr9MbMa76UpGM9Y8wd54 8+BFfpvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU7Ht-009DpP-NP; Tue, 15 Mar 2022 13:32:34 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nU7Hc-009DiJ-DS; Tue, 15 Mar 2022 13:32:19 +0000 Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KHvRm5zvzzfZ0w; Tue, 15 Mar 2022 21:30:44 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 15 Mar 2022 21:32:12 +0800 Received: from [10.174.178.55] (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 15 Mar 2022 21:32:11 +0800 Subject: Re: [PATCH v21 1/5] kdump: return -ENOENT if required cmdline option does not exist To: Baoquan He CC: Thomas Gleixner , Ingo Molnar , Borislav Petkov , , "H . Peter Anvin" , , Dave Young , Vivek Goyal , Eric Biederman , , Catalin Marinas , Will Deacon , , Rob Herring , Frank Rowand , , "Jonathan Corbet" , , Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , "John Donnelly" , Dave Kleikamp References: <20220227030717.1464-1-thunder.leizhen@huawei.com> <20220227030717.1464-2-thunder.leizhen@huawei.com> From: "Leizhen (ThunderTown)" Message-ID: Date: Tue, 15 Mar 2022 21:32:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220315_063216_957193_620DD76E X-CRM114-Status: GOOD ( 20.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022/3/15 20:21, Baoquan He wrote: > On 03/15/22 at 07:57pm, Baoquan He wrote: >> On 02/27/22 at 11:07am, Zhen Lei wrote: >>> The crashkernel=Y,low is an optional command-line option. When it doesn't >>> exist, kernel will try to allocate minimum required memory below 4G >>> automatically. Give it a unique error code to distinguish it from other >>> error scenarios. >>> >>> Signed-off-by: Zhen Lei >>> --- >>> kernel/crash_core.c | 3 +-- >>> 1 file changed, 1 insertion(+), 2 deletions(-) >>> >>> diff --git a/kernel/crash_core.c b/kernel/crash_core.c >>> index 256cf6db573cd09..4d57c03714f4e13 100644 >>> --- a/kernel/crash_core.c >>> +++ b/kernel/crash_core.c >>> @@ -243,9 +243,8 @@ static int __init __parse_crashkernel(char *cmdline, >>> *crash_base = 0; >>> >>> ck_cmdline = get_last_crashkernel(cmdline, name, suffix); >>> - >>> if (!ck_cmdline) >>> - return -EINVAL; >>> + return -ENOENT; >> >> Firstly, I am not sure if '-ENOENT' is a right value to return. From the >> code comment of ENOENT, it's used for file or dir? >> #define ENOENT 2 /* No such file or directory */ This error code does not return to user mode, so there is no problem. There are a lot of places in the kernel that are used this way. For example: int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) { if (!cpu_stop_queue_work(cpu, &work)) return -ENOENT; >> >> Secondly, we ever discussed the case including >> - no crashkernel=,low is provided; >> - messy code is provied, e.g crashkernel=aaaaaabbbb,low > > Checking the 3rd pach, this is handled. Take back my below words, > continue reviewing. Yes. > >> >> The 2nd one is not handled in this patchset. How about taking the >> handling into another round of patches. This patchset just adds >> crashkernel=,high purely. >> >>> >>> ck_cmdline += strlen(name); >>> >>> -- >>> 2.25.1 >>> >> > > . > -- Regards, Zhen Lei _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel