Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp612203pxb; Wed, 3 Nov 2021 09:26:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygWWm9R/JwTAldRTwKIAUv5Oca/hDgTJp0Pl46/xRACwRYxjrUijYAeqORGRSi3W7rPtNL X-Received: by 2002:a50:ec98:: with SMTP id e24mr30904655edr.41.1635956786937; Wed, 03 Nov 2021 09:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635956786; cv=none; d=google.com; s=arc-20160816; b=OhS2wmvIqsH4qfUOGakwfkqOofCp5C0l2qonPbzTGq0qhLhX6We2QNmi9KHueGnJAZ OC2Ms3M6WntH38hcoWuhr5RII0u1EM2t7fBgqORNzk+DVCykQw44RnWtGt9C67PE+93V GWGGXRMKoz9cC5OE+9fhsfXCQ35oBr9nVvqi1sJrwjKACxxbvcp7l2IwvhlHUWWqBUKI 2yk+g4FY2/YfKsks2xHZ53xsNwwWHe8t1+C02JwI3abtICY38xvkVcOhB2am/G8dh8Z1 mF3xU59fVzzbI7MoHdiyxNRW6Pc81Fu0xlkkXyd7dtrnMEJlhb934sTO54LbrFkM4Zxt ufMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cacIkAFs+72Yhz0c8MHvVrEE2bJVJOQ7A5GEEKjRHzE=; b=u+euxmUC3ITszgI6vbCPANAHDtk4ndAxW+ZGEgjvfdEgUftkeHlA15758NWDA3B1AG /yDG4cAM5jtW9gsCviTR87zCORRJssUdgKNEB4sapG061fldB7KxuFPoRlbZe6GW7oGs 4oxUvo1x9H+LWdBBNPUpxivadJUN0tC+OlsVBklrKHy6L+q/JCjJLyD5nwkKkejIODt0 KuNt2dor6v865xVqME95IuOj4uNR1QnkdF3vJZOS58BpI9bslh35FBDU/rox4t1T6QGZ 84VWY+Zdl6NVW8aq8451+PoIE+lz/++9UblNZ2rdy5JzBKEX+TXt2SkFS5o2IsYb18m7 iO1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=JWCw98yo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si4495250ejo.92.2021.11.03.09.26.00; Wed, 03 Nov 2021 09:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=JWCw98yo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232770AbhKCQ0J (ORCPT + 99 others); Wed, 3 Nov 2021 12:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231876AbhKCQZ4 (ORCPT ); Wed, 3 Nov 2021 12:25:56 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F95DC061714 for ; Wed, 3 Nov 2021 09:23:19 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id d12so2733459lfv.6 for ; Wed, 03 Nov 2021 09:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cacIkAFs+72Yhz0c8MHvVrEE2bJVJOQ7A5GEEKjRHzE=; b=JWCw98yoanqwDlL1uh0r5J0vyhG3dKr9z3OzkhdwhpsePnB67z7eMRNdBfRtxuQEek bvlvwzlk25fR30S5NwUTMhz0Ofzex4aSIiRCgOzj/fy4DLQU4w/PE87iQUqhRWcxrhND 0CtZu32Xb0O1uHKkbmwPKlnwobyhw1KDDa7oo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cacIkAFs+72Yhz0c8MHvVrEE2bJVJOQ7A5GEEKjRHzE=; b=GXwfMM5ql3vlbtxtUPI+D9mrVz5Z/xvUriJeOLeusO5ooW9SC2gVtvW09tG0uVZWVg 2/X5Bo8ZIm80tgKm94NGY7AuEdXFe/9t79Wz9Cspos4JAbf4jbPYjqTZ0clTIfs5VPne OAVubczEvy05bYiYrrfqyeUNfqRNNbPtvUgDRSkHfM9hoCMbFheg2x72lYxhBXnSFv/S DRo/4UggOqtrKfW5wDuzRf+d56+LToLKE73zK1lwJ7pdHgCRKmNeXHTO3D8Gq1Ow6AY3 l+jXQS/ajckvl2YSGrvHm482++8KhFdIXZjgz2QJaB8IXxy76+snpfigN0Ia3yGVcAaJ MP6w== X-Gm-Message-State: AOAM532fwPlN55jDXnI2FVEJ9nRveIRhAMEzUFu+X7qOCTCSubxdldhF hSLdPNzPp9c68EbkneqLnyNpJQt9J0X/sZcV X-Received: by 2002:ac2:430d:: with SMTP id l13mr40449353lfh.656.1635956597331; Wed, 03 Nov 2021 09:23:17 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id u13sm240451ljg.121.2021.11.03.09.23.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Nov 2021 09:23:16 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id bq11so6238661lfb.10 for ; Wed, 03 Nov 2021 09:23:16 -0700 (PDT) X-Received: by 2002:ac2:4e15:: with SMTP id e21mr43505927lfr.655.1635956596237; Wed, 03 Nov 2021 09:23:16 -0700 (PDT) MIME-Version: 1.0 References: <163572864256.3357115.931779940195622047.tglx@xen13> <163572864855.3357115.17938524897008353101.tglx@xen13> In-Reply-To: From: Linus Torvalds Date: Wed, 3 Nov 2021 09:23:00 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT pull] sched/core for v5.16-rc1 To: Peter Zijlstra Cc: Thomas Gleixner , Kees Cook , Linux Kernel Mailing List , "the arch/x86 maintainers" , Mark Rutland Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 2, 2021 at 1:41 AM Peter Zijlstra wrote: > > > It could be a user process doing bad things to the user stack frame > > from another thread when profiling is enabled. > > Most of the unwinders seem to only care about the kernel stack. Not the > user stack. Note that it very much happens for a kernel stack too. There the reason isn't some active attack, but simply stack corruption, or - not uncommonly - missing or incomplete debug notes that the unwinder crazily depends on. If an unwinder isn't robust enough to deal with stack corruption, it damn well should be deleted immediately - it will only cause even *more* problems when some nasty bug happens, and suddenly the unwinder means that you don';t get a proper oops report. And yes, I feel strongly about this, because we very much used to have that situation on x86 too a long time ago. I spent a year fighting buggy unwinders, and then removed the unbelievable garbage in the end because the maintainer of said thing refused to admit that there was a problem. So I really think that the solution to "unwinder is not robust" is absolutely not to take more locks. Because that's literally just hiding the much bigger and serious problem. The fact that the lock in question is a fairly critical one (and needs to use "raw_spin_lock()" and friends) is just another argument against it. I've obviously pulled this on Monday already, and I'm not going to start reverting those commits unless they cause problems, but I do think they were seriously misguided. Linus