Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp108303rwb; Sun, 25 Sep 2022 16:29:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7f8l7tETZOz0PgdOnLRLIIU+ucWd08OVQ2NwSEiBku1f01VjlPyoBDBEO8/5NLhFV3EEgr X-Received: by 2002:a17:90a:fe0a:b0:203:467b:9e64 with SMTP id ck10-20020a17090afe0a00b00203467b9e64mr22638093pjb.146.1664148577018; Sun, 25 Sep 2022 16:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664148577; cv=none; d=google.com; s=arc-20160816; b=DrWXF1BAM8o6iZ72rZsAFI2GJf7M933wk1OBdwTUjpBs0m869VZxCim+/oOaQ6vTgY 10/nkCEzqylevDlhi20R4aVlgh4vCvN72Se5KKk00PczKDJSB6cMJYVEMB49hPmyZM8X rAocTtC2uPwZ62JvT+d1shjAYAJoPSNa9ZAXTinp8ToybDCR9SujLP7L9ZZwWBYYba2+ 64EGDx24D/IrR6aYKpELFePp4tdGZF1D0HxQDZOgPN2fcIAdBkGaVcYkMe5BO3E1RxjX ttzSbFCF8tT5PfJpSividpg+T7tiLlWfSflR5e0WJnKGtEdHJnaj4GU+GTNRQF7mhC1n QozA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=VoMnbl/yC4fSqlCopgwm/mqk4gIbOdlbbIcobHH1MtA=; b=CRb0q3vxyoikdmeLRSGKg9Q/6DUfrn8Z2cf67QUqwYK7/garB2GIsAYC4iC1uWXW0O TlAc8qMhOLKFJd2+31okoCjcQsLNvUD35Xjz413Fo7kwGHqDizPZ70zl0DaNGX+RD4+a ZKKbUHKTSXeUtA9X+Iqr8LnzZmUIR5kx0lQaMNm96XdbGCZZ9qnbl3JKEhskRCwD2eaO fjoX7wYwXJgFmH6Gbtxg6yHGtBEFvq7RESygsn2fbNPSoHwXDUBov+OI58hDh1pN2d9p SOtlrtBK7qTWig8C1MBfVZv+DayB6DQW/c6/kTzbqD0rjR62aZRxsHHxMGZlFpQbTELK rmww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xGL0aD11; 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 s10-20020a170902ea0a00b00176e85e5ceasi11416157plg.405.2022.09.25.16.29.25; Sun, 25 Sep 2022 16:29:37 -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=@infradead.org header.s=bombadil.20210309 header.b=xGL0aD11; 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 S232705AbiIYXVh (ORCPT + 99 others); Sun, 25 Sep 2022 19:21:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232425AbiIYXVf (ORCPT ); Sun, 25 Sep 2022 19:21:35 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8146D2982C; Sun, 25 Sep 2022 16:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=VoMnbl/yC4fSqlCopgwm/mqk4gIbOdlbbIcobHH1MtA=; b=xGL0aD11N9pHmMy8pRruqzl71G fuT4BeLghdRGsbgxfFNtgPKgw1MSOn6acIDZ4eMfWSWUuj8uhRBT/6X8wCgAReXLOnyjx3pv1LZCs sN8kAiidG/EcKRv9V6IP9ZS1JgUYYxFeyPZc5wkaRm0+1CK9qhx5fC7MHOYBvuX9lAZdSqfYEGxSi mIADaiZILR8P95o62DGJyEcSB27POeLq/QX9ef1FuOpj3UPoHavQOAYgFZr+OEA84qFAktEYA0Bhs asfsUwlnF+vtN6xmgkCxmKdqL5Y6W8uhoma1X4N5wAXdstaEkBeN86Ar5vh00H3ecDaAT4IVTxxqh ZoJqY65Q==; Received: from [2601:1c2:d80:3110::a2e7] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocavt-000BGy-3B; Sun, 25 Sep 2022 23:21:09 +0000 Message-ID: Date: Sun, 25 Sep 2022 16:21:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [syzbot] WARNING in __change_page_attr_set_clr Content-Language: en-US To: Alexei Starovoitov , Dave Hansen , Linus Torvalds , tech-board@lists.linuxfoundation.org, Song Liu , Kernel Team Cc: Borislav Petkov , brijesh.singh@amd.com, Dan Williams , Dave Hansen , "H. Peter Anvin" , jane.chu@oracle.com, "Kirill A. Shutemov" , LKML , Andy Lutomirski , Ingo Molnar , Peter Zijlstra , seanjc@google.com, syzkaller-bugs , Thomas Gleixner , Tom Lendacky , X86 ML , Alexei Starovoitov , Daniel Borkmann , John Fastabend , "open list:BPF (Safe dynamic programs and tools)" References: <00000000000076f3a305e97e9229@google.com> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, 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 9/25/22 14:55, Alexei Starovoitov wrote: > On Sun, Sep 25, 2022 at 9:44 AM Dave Hansen wrote: >> >> On 9/25/22 04:18, syzbot wrote: >>> ------------[ cut here ]------------ >>> CPA refuse W^X violation: 8000000000000163 -> 0000000000000163 range: 0xffffffffa0401000 - 0xffffffffa0401fff PFN 7d8d5 >>> WARNING: CPU: 0 PID: 3607 at arch/x86/mm/pat/set_memory.c:600 verify_rwx arch/x86/mm/pat/set_memory.c:600 [inline] >>> WARNING: CPU: 0 PID: 3607 at arch/x86/mm/pat/set_memory.c:600 __change_page_attr arch/x86/mm/pat/set_memory.c:1569 [inline] >>> WARNING: CPU: 0 PID: 3607 at arch/x86/mm/pat/set_memory.c:600 __change_page_attr_set_clr+0x1f40/0x2020 arch/x86/mm/pat/set_memory.c:1691 >>> Modules linked in: >> >> Yay, one of these that isn't due to wonky 32-bit kernels! >> >> This one looks to be naughty intentionally: >> >>> void *bpf_jit_alloc_exec_page(void) >>> { >> ... >>> /* Keep image as writeable. The alternative is to keep flipping ro/rw >>> * every time new program is attached or detached. >>> */ >>> set_memory_x((long)image, 1); >>> return image; >>> } >> >> For STRICT_KERNEL_RWX kernels, I think we would really rather that this >> code *did* flip ro/rw every time a new BPF program is attached or detached. > > Steven Rostedt noticed that comment around the middle of August > and told you and Peter about it. > Then Peter added a WARN_ONCE in commit > https://lore.kernel.org/all/YwySW3ROc21hN7g9@hirez.programming.kicks-ass.net/ > to explicitly trigger that known issue. > Sure enough the fedora fails to boot on linux-next since then, > because systemd is loading bpf programs that use bpf trampoline. > The boot issue was was reported 3 days ago: > https://lore.kernel.org/bpf/c84cc27c1a5031a003039748c3c099732a718aec.camel@kernel.org/T/#u > Now we're trying to urgently address it with: > https://lore.kernel.org/bpf/20220923211837.3044723-1-song@kernel.org/ > > So instead of pinging us with your w^x concern you've decided > to fail hard in -next to force the issue and > now acting like this is something surprising to you?! > > This is Code of Conduct "worthy" behavior demonstrated > by a newly elected member of the Technical Advisory Board. > Please consider resigning. > A TAB member should be better than this. If it is (and I don't see it), just file a complaint. Don't try to be the enforcer. -- ~Randy