Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3577428lfo; Mon, 23 May 2022 08:19:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBnaouvanMJ0xAOKPcd2lU2TIePDl2vZxVhjwGcrw8RWNCNJnd2zOhVFqOdvws4F8U7h9u X-Received: by 2002:a17:903:1211:b0:15e:8208:8cc0 with SMTP id l17-20020a170903121100b0015e82088cc0mr23703617plh.52.1653319163850; Mon, 23 May 2022 08:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653319163; cv=none; d=google.com; s=arc-20160816; b=KRGwWDRtf+JLUcH7IqZ7ChmxxAfqW7j5bOGAgp+YbJFMLqySXg67ZvzKhU7EdBCl/Y WToFmknjtkUoM8m53QVAMIQmCCt39MhSpNzyZEohuOgqbtzQu8aDAHHfAH3NSv1wo1a3 V/lGVq4XPAIEKPSiuoenBGRX991NCzIYWvn6VN4BPGyajHRlquHC4tKTb51BeMvD7/j/ kNXQmhzebcfrwh1nCXnaC2LKuuI3xSbZg83JNE7PqK3w2PJeilSMj/cNV7NE6PWFMRKk RdF8LvoGXVvvx3nvkRrI8idrcmudu84QZfjLE7/2JNlEzxpZv528zMtdMDUCsam6muSs NTLQ== 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=ouiQ+bLEckFHclbWx0ZtdD2hAP5SyY8iLieSyBq1a/0=; b=k6UnE3OSWi4bmL8QpWsFNUgvHeE/cH7/w4X0bDAtn6QC+k9kC/HFO7cx1KxQWYmFLo gs57Q4xuWI5SSgc4NGjFvpCqAHudoLwvQ3l6AG0VF/3wRKJ/nZr7fJXero+xi+Fg5tQv 1mBKoGptcEbQJHxmpsVPxVNVjlSLxXeAdf6CDG4bDjJYVfUsC/dC94tyGNSwjyS6d/UF PrFgX8OVpc5obAqKiqZvY5sLdAhMzfLbRvoT4rX6t8Lgsuh13L92TEIDoDR9RAN+gfBU 052Y/J7bCT4ejiLRHA4mKKEjIfOqt3repsh0LZGYqUGKm39zxk/rTDN+eXK97UyPQ8GL wHCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i9oyXJLf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h3-20020a170902b94300b00161888ee6fesi9367933pls.474.2022.05.23.08.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 08:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i9oyXJLf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 694505DA37; Mon, 23 May 2022 08:19:21 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237686AbiEWPTL (ORCPT + 99 others); Mon, 23 May 2022 11:19:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237564AbiEWPTI (ORCPT ); Mon, 23 May 2022 11:19:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96F534704A; Mon, 23 May 2022 08:19:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 330F761291; Mon, 23 May 2022 15:19:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97A49C34116; Mon, 23 May 2022 15:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653319144; bh=4fHAe4j+ojBMcjH5GhxAYVhFuKYrezHCFPgRSz6rx+w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=i9oyXJLfyAFAPe8qWXJl7MAvnMXZcCcjmuACUabG9bdEnboEwJq2vTsc2PZsoP9wQ wAYzS6o2zLlGbtGZTIf1b5BzN6tqR559SEa6+fH4IqOGCL8aY5v5UiMnLcQiJvScd8 8oDgjWbWvNHK6U0x4TtPQ5FPqtLwnrptY8q3I0uxMhgScUmIZWIXFOVUj5ZJsT/x87 C70+RGdRWyQGDDWkc6Lan9HUKhIlG7ixnK95isN/Yy+McxnQq+8+XqiOuYkgyTIkHV Z6uNCJfP4QaVVPwTDlWMj+NvFXuq0K/8wB4Hyc5nPiiFqzMXuVjpAgWSkcmHSuT2zF MYlIRpAZ1RoZQ== Received: by mail-vs1-f44.google.com with SMTP id h4so4319685vsr.13; Mon, 23 May 2022 08:19:04 -0700 (PDT) X-Gm-Message-State: AOAM5326FF47dFvgoE6lRr7ksWZb/jPb0Xx6P1dz2TpmiEPF7fd0ySrS 171JQqiTD9DnMxR4O0IV4Nk/HD0IHWi3zo638WM= X-Received: by 2002:a05:6102:390b:b0:32d:5fc3:bd2c with SMTP id e11-20020a056102390b00b0032d5fc3bd2cmr8220616vsu.51.1653319143526; Mon, 23 May 2022 08:19:03 -0700 (PDT) MIME-Version: 1.0 References: <20220322144003.2357128-1-guoren@kernel.org> <20220322144003.2357128-21-guoren@kernel.org> <20220523054550.GA1511899@roeck-us.net> In-Reply-To: <20220523054550.GA1511899@roeck-us.net> From: Guo Ren Date: Mon, 23 May 2022 23:18:52 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V9 20/20] riscv: compat: Add COMPAT Kbuild skeletal support To: Guenter Roeck Cc: Palmer Dabbelt , Arnd Bergmann , Greg Kroah-Hartman , Christoph Hellwig , linux-arch , Linux Kernel Mailing List , linux-riscv , linux-csky@vger.kernel.org, linux-s390 , sparclinux , linuxppc-dev , Parisc List , "open list:BROADCOM NVRAM DRIVER" , Linux ARM , "the arch/x86 maintainers" , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Guo Ren Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no 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 I tested Palmer's branch, it's okay: 8810d7feee5a (HEAD -> for-next, palmer/for-next) riscv: Don't output a bogus mmu-type on a no MMU kernel I also tested linux-next, it's okay: rv64_rootfs: # uname -a Linux buildroot 5.18.0-next-20220523 #7 SMP Mon May 23 11:15:17 EDT 2022 riscv64 GNU/Linux # # # # ls /lib ld-uClibc-1.0.39.so libatomic.so.1 libgcc_s.so ld-uClibc.so.0 libatomic.so.1.2.0 libgcc_s.so.1 ld-uClibc.so.1 libc.so.0 libuClibc-1.0.39.so libatomic.so libc.so.1 modules rv32_rootfs: buildroot login: root # uname -a Linux buildroot 5.18.0-next-20220523 #7 SMP Mon May 23 11:15:17 EDT 2022 riscv64 GNU/Linux # ls /lib ld-linux-riscv32-ilp32d.so.1 libm.so.6 libanl.so.1 libnss_dns.so.2 libatomic.so libnss_files.so.2 libatomic.so.1 libpthread.so.0 libatomic.so.1.2.0 libresolv.so.2 libc.so.6 librt.so.1 libcrypt.so.1 libthread_db.so.1 libdl.so.2 libutil.so.1 libgcc_s.so modules libgcc_s.so.1 Here is my qemu version: commit 19f13a92cef8405052e0f73d5289f9e15474dad3 (HEAD -> riscv-to-apply.next, alistair/riscv-to-apply.next) Author: Tsukasa OI Date: Sun May 15 11:56:11 2022 +0900 target/riscv: Move/refactor ISA extension checks We should separate "check" and "configure" steps as possible. This commit separates both steps except vector/Zfinx-related checks. Signed-off-by: Tsukasa OI Reviewed-by: Alistair Francis Message-Id: Signed-off-by: Alistair Francis On Mon, May 23, 2022 at 1:45 PM Guenter Roeck wrote: > > On Tue, Mar 22, 2022 at 10:40:03PM +0800, guoren@kernel.org wrote: > > From: Guo Ren > > > > Adds initial skeletal COMPAT Kbuild (Running 32bit U-mode on > > 64bit S-mode) support. > > - Setup kconfig & dummy functions for compiling. > > - Implement compat_start_thread by the way. > > > > Signed-off-by: Guo Ren > > Signed-off-by: Guo Ren > > Reviewed-by: Arnd Bergmann > > Tested-by: Heiko Stuebner > > Cc: Palmer Dabbelt > > With this patch in linux-next, all my riscv64 emulations crash. > > [ 11.600082] Run /sbin/init as init process > [ 11.628561] init[1]: unhandled signal 11 code 0x1 at 0x0000000000000000 in libc.so[ffffff8ad39000+a4000] > [ 11.629398] CPU: 0 PID: 1 Comm: init Not tainted 5.18.0-rc7-next-20220520 #1 > [ 11.629462] Hardware name: riscv-virtio,qemu (DT) > [ 11.629546] epc : 00ffffff8ada1100 ra : 00ffffff8ada13c8 sp : 00ffffffc58199f0 > [ 11.629586] gp : 00ffffff8ad39000 tp : 00ffffff8ade0998 t0 : ffffffffffffffff > [ 11.629598] t1 : 00ffffffc5819fd0 t2 : 0000000000000000 s0 : 00ffffff8ade0cc0 > [ 11.629610] s1 : 00ffffff8ade0cc0 a0 : 0000000000000000 a1 : 00ffffffc5819a00 > [ 11.629622] a2 : 0000000000000001 a3 : 000000000000001e a4 : 00ffffffc5819b00 > [ 11.629634] a5 : 00ffffffc5819b00 a6 : 0000000000000000 a7 : 0000000000000000 > [ 11.629645] s2 : 00ffffff8ade0ac8 s3 : 00ffffff8ade0ec8 s4 : 00ffffff8ade0728 > [ 11.629656] s5 : 00ffffff8ade0a90 s6 : 0000000000000000 s7 : 00ffffffc5819e40 > [ 11.629667] s8 : 00ffffff8ade0ca0 s9 : 00ffffff8addba50 s10: 0000000000000000 > [ 11.629678] s11: 0000000000000000 t3 : 0000000000000002 t4 : 0000000000000001 > [ 11.629688] t5 : 0000000000020000 t6 : ffffffffffffffff > [ 11.629699] status: 0000000000004020 badaddr: 0000000000000000 cause: 000000000000000d > [ 11.633421] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b > [ 11.633664] CPU: 0 PID: 1 Comm: init Not tainted 5.18.0-rc7-next-20220520 #1 > [ 11.633784] Hardware name: riscv-virtio,qemu (DT) > [ 11.633881] Call Trace: > [ 11.633960] [] dump_backtrace+0x1c/0x24 > [ 11.634162] [] show_stack+0x2c/0x38 > [ 11.634274] [] dump_stack_lvl+0x60/0x8e > [ 11.634386] [] dump_stack+0x14/0x1c > [ 11.634491] [] panic+0x116/0x2e2 > [ 11.634596] [] do_exit+0x7ce/0x7d4 > [ 11.634707] [] do_group_exit+0x24/0x7c > [ 11.634817] [] get_signal+0x7ee/0x830 > [ 11.634924] [] do_notify_resume+0x6c/0x41c > [ 11.635037] [] ret_from_exception+0x0/0x10 > > Guenter > > --- > # bad: [18ecd30af1a8402c162cca1bd58771c0e5be7815] Add linux-next specific files for 20220520 > # good: [42226c989789d8da4af1de0c31070c96726d990c] Linux 5.18-rc7 > git bisect start 'HEAD' 'v5.18-rc7' > # bad: [f9b63740b666dd9887eb0282d21b5f65bb0cadd0] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > git bisect bad f9b63740b666dd9887eb0282d21b5f65bb0cadd0 > # bad: [7db97132097c5973ff77466d0ee681650af653de] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux > git bisect bad 7db97132097c5973ff77466d0ee681650af653de > # good: [2b7d17d4b7c1ff40f58b0d32be40fc0bb6c582fb] soc: document merges > git bisect good 2b7d17d4b7c1ff40f58b0d32be40fc0bb6c582fb > # good: [69c9668f853fdd409bb8abbb37d615785510b29a] Merge branch 'clk-next' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git > git bisect good 69c9668f853fdd409bb8abbb37d615785510b29a > # bad: [1577f290aa0d4c5b29c03c46ef52e4952a21bfbb] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git > git bisect bad 1577f290aa0d4c5b29c03c46ef52e4952a21bfbb > # good: [34f0971f8ca73d7e5502b4cf299788a9402120f7] powerpc/powernv/flash: Check OPAL flash calls exist before using > git bisect good 34f0971f8ca73d7e5502b4cf299788a9402120f7 > # good: [0349d7dfc70a26b3facd8ca97de34980d4b60954] Merge branch 'mips-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git > git bisect good 0349d7dfc70a26b3facd8ca97de34980d4b60954 > # bad: [20bfb54d3b121699674c17a854c5ebc7a8f97d81] Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git > git bisect bad 20bfb54d3b121699674c17a854c5ebc7a8f97d81 > # bad: [9be8459298eadb39b9fe9974b890239e9c123107] riscv: compat: Add COMPAT Kbuild skeletal support > git bisect bad 9be8459298eadb39b9fe9974b890239e9c123107 > # good: [01abdfeac81b5f56062d0a78f2cdc805db937a75] riscv: compat: Support TASK_SIZE for compat mode > git bisect good 01abdfeac81b5f56062d0a78f2cdc805db937a75 > # good: [f4b395e6f1a588ed6c9a30474e58cf6b27b65783] riscv: compat: Add hw capability check for elf > git bisect good f4b395e6f1a588ed6c9a30474e58cf6b27b65783 > # good: [3092eb45637573c5e435fbf5eaf9516316e5f9c6] riscv: compat: vdso: Add setup additional pages implementation > git bisect good 3092eb45637573c5e435fbf5eaf9516316e5f9c6 > # good: [4608c159594fb40a5101357d4f614fdde9ce1fdb] riscv: compat: ptrace: Add compat_arch_ptrace implement > git bisect good 4608c159594fb40a5101357d4f614fdde9ce1fdb > # first bad commit: [9be8459298eadb39b9fe9974b890239e9c123107] riscv: compat: Add COMPAT Kbuild skeletal support -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/