Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2336721rwb; Sun, 4 Sep 2022 13:43:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR5urVA3WkcDIGPdCtV8OI4hYZTzlHUc4edUGs/+hahQkFG0KITEZFLMpH0QlwqF57SFfTRL X-Received: by 2002:a17:906:770d:b0:73c:a08f:593c with SMTP id q13-20020a170906770d00b0073ca08f593cmr35556083ejm.182.1662324202470; Sun, 04 Sep 2022 13:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662324202; cv=none; d=google.com; s=arc-20160816; b=rCRysIhYN7wyFvlqaWgle4F762rDK60aSpIWmVdvvNFREBF5pftptyI3EaX02zp1q7 z0J0+TOJNcNKOO8V7UnF78MunxOyd3T8NBpDDvLx60JlElEuz1v4pEMSsJYuMnop7xr/ D1jAFogaFjch4J7o3i5lNfj0pOjDCyO3N1zb7xbvn+ILuPiCXF+1aFhJDpD6eg2rn8ZF mb5NrcxuX1X2b8rhoOXwmSEmpaDKu+JZl/OxehFC0DrK38N8hVIHcfsTC3EL5UkEQavd 4nQOB7PA6E5100G73ukpkuQv9HKBq6n+ZmBFn3r6X932VmeGgRvhw2mBY0Vjvu1QTo81 xULw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=y3ABpshjkv87/QevZMgt/Jxr8eWoaETBvCY6qeXNguA=; b=bQKMA5Wy9LN+7mYSZ0FEM8w1BirpUWi5E37VCxTqI1f/VmQuDERU/vil4yPOydSa/K 2AVPZC1nbqhL9aZT5/KssF0A3VH/fnlfAIqDBURdC6+Bc1o3YqtrhfsOSamC60NnZFhh Fp7BwtBkSmPaHHlLoJobtffQ7BCSoMdHaE3kXwBXha7RUJGNuhZNjVqqT4uiuQGE281u zrAyIZCY7F7If4WZOOLDX18mz8UcRPFl69gZZBAQz60JU5/8FdaHpDpFSeNtvXdv3peN SIADxbF9M4wFV0dFhS7LDVlCUmwTP6/5A2shAOiF9KN6d1x9/mYkzaWr1WClhU94ROzQ vpfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W+rMuawP; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a05640235d100b0044612f19c98si6535496edc.512.2022.09.04.13.42.56; Sun, 04 Sep 2022 13:43: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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W+rMuawP; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234932AbiIDTi7 (ORCPT + 99 others); Sun, 4 Sep 2022 15:38:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234855AbiIDTi6 (ORCPT ); Sun, 4 Sep 2022 15:38:58 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F1D02FFD2 for ; Sun, 4 Sep 2022 12:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662320335; 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: in-reply-to:in-reply-to:references:references; bh=y3ABpshjkv87/QevZMgt/Jxr8eWoaETBvCY6qeXNguA=; b=W+rMuawP19AH4zfVeb3khRqyNpSLsDOGUllW2dCe++/Zw8tjYJLDQAyzLF5IR0RHSAXet6 yLdMpPTSbSUyd4A6tGgVrQ88IB0cHmuaCNiRy8Ug5FzAWzgmjgEg0iQwWPxDTlScD58WgQ /6QcQP8x5vH9ZWS3LZqjbMxLmS8na0o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-6vRjenz8Ng6psc4gk-hN4A-1; Sun, 04 Sep 2022 15:38:52 -0400 X-MC-Unique: 6vRjenz8Ng6psc4gk-hN4A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A9B880A0AE; Sun, 4 Sep 2022 19:38:51 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.40.192.67]) by smtp.corp.redhat.com (Postfix) with SMTP id 3367B40B40C9; Sun, 4 Sep 2022 19:38:45 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 4 Sep 2022 21:38:50 +0200 (CEST) Date: Sun, 4 Sep 2022 21:38:44 +0200 From: Oleg Nesterov To: Andrew Morton Cc: Oleksandr Natalenko , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jonathan Corbet , Alexander Viro , Huang Ying , "Jason A . Donenfeld" , Will Deacon , "Guilherme G . Piccoli" , Laurent Dufour , Stephen Kitt , Rob Herring , Joel Savitz , "Eric W . Biederman" , Kees Cook , Xiaoming Ni , Luis Chamberlain , Renaud =?iso-8859-1?Q?M=E9trich?= , Grzegorz Halat , Qi Guo Subject: Re: [PATCH] core_pattern: add CPU specifier Message-ID: <20220904193844.GA7953@redhat.com> References: <20220903064330.20772-1-oleksandr@redhat.com> <20220904112718.b7feead47012600ef255dfdf@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220904112718.b7feead47012600ef255dfdf@linux-foundation.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,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 09/04, Andrew Morton wrote: > > On Sat, 3 Sep 2022 08:43:30 +0200 Oleksandr Natalenko wrote: > > > @@ -535,6 +539,7 @@ void do_coredump(const kernel_siginfo_t *siginfo) > > */ > > .mm_flags = mm->flags, > > .vma_meta = NULL, > > + .cpu = raw_smp_processor_id(), > > }; > > Why use the "raw_" function here? To avoid check_preemption_disabled() from debug_smp_processor_id(). We do not disable preemption because this is pointless, this is the "racy snapshot" anyway. The coredumping task can migrate to another CPU even before get_signal/do_coredump, right after exit-to-user path enables irqs. Oleg.