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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C984BC433E0 for ; Wed, 13 Jan 2021 18:29:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73AFB233EA for ; Wed, 13 Jan 2021 18:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728404AbhAMS31 (ORCPT ); Wed, 13 Jan 2021 13:29:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728311AbhAMS30 (ORCPT ); Wed, 13 Jan 2021 13:29:26 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48D2EC061794 for ; Wed, 13 Jan 2021 10:28:46 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id m4so3163274wrx.9 for ; Wed, 13 Jan 2021 10:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oCAeIb7ECFW6QlWgtdlZyS84pPretLI5vdf+tM6RJD4=; b=Uibh+vbAZVnETjtRBAkiqx6q2IIG4VTxEpRIY6uh618odCokYJk2Rp/NUw7U3mbcW1 c0tPK4C6kRxMB8tg7NnAbADmglLr3wrGuVJd15fHX2E3d3aBfjULp3XBytVT9QuCf3ZD 9uMv+jG3r8lckQp7NEWv/Xv/fjoE1O1qB+K7aiudPgD1EWs9VA+Z5xvZyn5VUhOyei99 NezwTAoysxwKeO53Xew9XxWLRzfG30JNyCBZSVGL/z25EOMeB38vLAo0STXqBorTf20H 9+vSMtKPiCN2/fiXYM8SJ0jdTxSZS70B1MQr5SlM5E8Ly8x3Vyk36MYman3txbdX/h4N xQWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oCAeIb7ECFW6QlWgtdlZyS84pPretLI5vdf+tM6RJD4=; b=X5nLiH3b4RS9CQ8SAa0JLtekt98OzHV25XMEevJ6QxfMbssi6taPKZt+4kA05TIa5C T2VqxodzjZ5AXfMfUBlCYirdtvxHK0kUuKjGM5TLo6r3Aft220QeuW0x3qxXJBj8PP0r fB3/6y4l5PmOugKHVaW4S2ynsEKjTPB2RTqr8KIO05NuhmgG1mKQ04r/a8BtNw6BC016 qyHFOYWnjL+yxID6qs+Ul/znsH0zxt9SHnuPaZpUy0W03R5mrWlScBckHtEiarE4UUnD 4yyHiFLoT/Ixcs7Gyewzj4lGGpYkoyCcFBlgm4nH8ZEg0rUX6cZvLIpINfUmZ3SEc1yn it1Q== X-Gm-Message-State: AOAM533QyyniQUWANzYrnEJZhKrFh25HOKHWRMVEnd8QXsTbJQOJcwg4 sXv23qHhhg196rKwc1rQt4P7Xg== X-Google-Smtp-Source: ABdhPJw07pkMlp/wa7hOyU26GePo2LXD56vW96vj5Sk6xZIiiPoUrxPmL1/QeYsYtlYpnqzeZtt8VA== X-Received: by 2002:adf:97d2:: with SMTP id t18mr3944967wrb.228.1610562524885; Wed, 13 Jan 2021 10:28:44 -0800 (PST) Received: from google.com (230.69.233.35.bc.googleusercontent.com. [35.233.69.230]) by smtp.gmail.com with ESMTPSA id b14sm4485354wrx.77.2021.01.13.10.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 10:28:44 -0800 (PST) Date: Wed, 13 Jan 2021 18:28:41 +0000 From: Quentin Perret To: Marc Zyngier Cc: Catalin Marinas , Will Deacon , James Morse , Julien Thierry , Suzuki K Poulose , Rob Herring , Frank Rowand , devicetree@vger.kernel.org, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Fuad Tabba , Mark Rutland , David Brazdil Subject: Re: [RFC PATCH v2 13/26] KVM: arm64: Enable access to sanitized CPU features at EL2 Message-ID: References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-14-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 13 Jan 2021 at 17:27:49 (+0000), Marc Zyngier wrote: > On 2021-01-13 14:35, Quentin Perret wrote: > > On Wednesday 13 Jan 2021 at 14:23:03 (+0000), Quentin Perret wrote: > > > Good point, that would be nice indeed. Can I use that from outside an > > > __init function? > > > > Just gave it a go, and the answer to this appears to be yes, > > surprisingly -- I was expecting a compile-time warning similar to what > > we get when non-__init code calls into __init, but that doesn't seem to > > trigger here. Anyways, I'll add the annotation in v3. > > That's surprising. I'd definitely expect something to explode... > Do you have CONFIG_DEBUG_SECTION_MISMATCH=y? Yes I do, so, that doesn't seem to be it. Now, the plot thickens: I _do_ get a warning if I remove the 'const' qualifier. But interestingly, in both cases hyp_ftr_regs is placed in .init.data: $ objdump -t vmlinux | grep hyp_ftr_regs ffff8000116c17b0 g O .init.data 0000000000000030 hyp_ftr_regs The warning is silenced only if I mark hyp_ftr_regs as const. modpost bug? I'll double check my findings and follow up in a separate series. Thanks, Quentin 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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B899CC433DB for ; Wed, 13 Jan 2021 18:28:50 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 0AB5B2343E for ; Wed, 13 Jan 2021 18:28:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AB5B2343E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3B8854B12E; Wed, 13 Jan 2021 13:28:49 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qgB2miJyAz4m; Wed, 13 Jan 2021 13:28:48 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 480494B1CB; Wed, 13 Jan 2021 13:28:48 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 309834B1B9 for ; Wed, 13 Jan 2021 13:28:47 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cmDuVRaLre87 for ; Wed, 13 Jan 2021 13:28:46 -0500 (EST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id F25114B184 for ; Wed, 13 Jan 2021 13:28:45 -0500 (EST) Received: by mail-wr1-f43.google.com with SMTP id t30so3206498wrb.0 for ; Wed, 13 Jan 2021 10:28:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oCAeIb7ECFW6QlWgtdlZyS84pPretLI5vdf+tM6RJD4=; b=Uibh+vbAZVnETjtRBAkiqx6q2IIG4VTxEpRIY6uh618odCokYJk2Rp/NUw7U3mbcW1 c0tPK4C6kRxMB8tg7NnAbADmglLr3wrGuVJd15fHX2E3d3aBfjULp3XBytVT9QuCf3ZD 9uMv+jG3r8lckQp7NEWv/Xv/fjoE1O1qB+K7aiudPgD1EWs9VA+Z5xvZyn5VUhOyei99 NezwTAoysxwKeO53Xew9XxWLRzfG30JNyCBZSVGL/z25EOMeB38vLAo0STXqBorTf20H 9+vSMtKPiCN2/fiXYM8SJ0jdTxSZS70B1MQr5SlM5E8Ly8x3Vyk36MYman3txbdX/h4N xQWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oCAeIb7ECFW6QlWgtdlZyS84pPretLI5vdf+tM6RJD4=; b=cWjgWGRQRAzYZY+oBecHFj/PNlNqq8o5zOLOja01Y443pG8E1aQtsi2KS95/5fCFpE inDCNLxgQDgX6qVNwCxGWwIbV1lda4Y1drzYcJFWN63F68cks+RtuofCzzDMdau4vM1x t3mZzYgDjKR6yzx2aGUjqROnYZeQnCLqLEyXIw8VeCVjLkYgVScWJjOxl7PVxz4YW3IZ OA2ijdxFtalEkSmmRO/uNFLI1QiXD9n9WgDK2SEzc6mnmq639GYcaozaa3XnS91pgEyM SbUQUbvebyB7jRX8EtkkYaF8LRKwqR/TlgGbTKcdIHunYiY0uQFUXc4igG1C7yTZpNwG PQdw== X-Gm-Message-State: AOAM533BW3fWN5ysH+XsbUdzm6pMWX1p87vA1TfCxayoC/yUgQCK1g4p bRKufW+B0sE/hjsJtUXyY41fQQ== X-Google-Smtp-Source: ABdhPJw07pkMlp/wa7hOyU26GePo2LXD56vW96vj5Sk6xZIiiPoUrxPmL1/QeYsYtlYpnqzeZtt8VA== X-Received: by 2002:adf:97d2:: with SMTP id t18mr3944967wrb.228.1610562524885; Wed, 13 Jan 2021 10:28:44 -0800 (PST) Received: from google.com (230.69.233.35.bc.googleusercontent.com. [35.233.69.230]) by smtp.gmail.com with ESMTPSA id b14sm4485354wrx.77.2021.01.13.10.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 10:28:44 -0800 (PST) Date: Wed, 13 Jan 2021 18:28:41 +0000 From: Quentin Perret To: Marc Zyngier Subject: Re: [RFC PATCH v2 13/26] KVM: arm64: Enable access to sanitized CPU features at EL2 Message-ID: References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-14-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: devicetree@vger.kernel.org, kernel-team@android.com, Frank Rowand , android-kvm@google.com, Catalin Marinas , Fuad Tabba , linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Will Deacon , kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Wednesday 13 Jan 2021 at 17:27:49 (+0000), Marc Zyngier wrote: > On 2021-01-13 14:35, Quentin Perret wrote: > > On Wednesday 13 Jan 2021 at 14:23:03 (+0000), Quentin Perret wrote: > > > Good point, that would be nice indeed. Can I use that from outside an > > > __init function? > > > > Just gave it a go, and the answer to this appears to be yes, > > surprisingly -- I was expecting a compile-time warning similar to what > > we get when non-__init code calls into __init, but that doesn't seem to > > trigger here. Anyways, I'll add the annotation in v3. > > That's surprising. I'd definitely expect something to explode... > Do you have CONFIG_DEBUG_SECTION_MISMATCH=y? Yes I do, so, that doesn't seem to be it. Now, the plot thickens: I _do_ get a warning if I remove the 'const' qualifier. But interestingly, in both cases hyp_ftr_regs is placed in .init.data: $ objdump -t vmlinux | grep hyp_ftr_regs ffff8000116c17b0 g O .init.data 0000000000000030 hyp_ftr_regs The warning is silenced only if I mark hyp_ftr_regs as const. modpost bug? I'll double check my findings and follow up in a separate series. Thanks, Quentin _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A127C4332B for ; Wed, 13 Jan 2021 18:31:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 35E9723432 for ; Wed, 13 Jan 2021 18:31:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35E9723432 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Nt8DyQTnLdDbqRQ0qmPVNWlPccZrMi2I9FGdqavKa/U=; b=U4ZlAeDkUbS4KTtmSXCAht7H6 Qa7DOF48fA0cFNmb/VE3Fy9g8q+g/qLWMvXP9bxPWTA01mhYwqvuZPFshGtZ0Ah9r+AtNrEPQtTSR dttoab1/VStXR6qEguFCRZaRLEvkZoPHWdCc4/UQyUZdLAqgaD6iINEvBZrVmYDWBhlIXJhE9jBP3 mouoU8THCFtV+Fa51F/Kbz7pwnKxc/euClmHliYwWRhrmzWdITb7wsd6aVi6y0N4rcvkINyyjhMZB +l3/o42CEU3xs/ClCUhENrVhF8XcIhl+GIULymgvfDO825+tlZ7sgewBu7gi0nUVj6YqiTAIEsoHQ PI4HORLLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzksy-0001GC-Gq; Wed, 13 Jan 2021 18:28:49 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzksw-0001FM-Ez for linux-arm-kernel@lists.infradead.org; Wed, 13 Jan 2021 18:28:47 +0000 Received: by mail-wr1-x433.google.com with SMTP id 91so3181756wrj.7 for ; Wed, 13 Jan 2021 10:28:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=oCAeIb7ECFW6QlWgtdlZyS84pPretLI5vdf+tM6RJD4=; b=Uibh+vbAZVnETjtRBAkiqx6q2IIG4VTxEpRIY6uh618odCokYJk2Rp/NUw7U3mbcW1 c0tPK4C6kRxMB8tg7NnAbADmglLr3wrGuVJd15fHX2E3d3aBfjULp3XBytVT9QuCf3ZD 9uMv+jG3r8lckQp7NEWv/Xv/fjoE1O1qB+K7aiudPgD1EWs9VA+Z5xvZyn5VUhOyei99 NezwTAoysxwKeO53Xew9XxWLRzfG30JNyCBZSVGL/z25EOMeB38vLAo0STXqBorTf20H 9+vSMtKPiCN2/fiXYM8SJ0jdTxSZS70B1MQr5SlM5E8Ly8x3Vyk36MYman3txbdX/h4N xQWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=oCAeIb7ECFW6QlWgtdlZyS84pPretLI5vdf+tM6RJD4=; b=DPDAy8YWXt2hlV9fuXzPwNX4lP2bXfNS1a+T6PfwtgMkRtusplrQddwOKybsDVNTS9 4z5BO9Q7ShkHdXEFP5x8hgzo6pPtNX2AoUzXK6reN1XYrMHcia5UqurPyPNXhLc+8IdY rGW6NXAuJ5i32hHNFKGWm+xZB+sg4EZIOCUlMXXOcHcRr+tilggqiFQWeZROUdN/9rMK 0GgQ8asIGBdOr/qu1h+cvWSjvE6vVFpd7HqaZpGSI4cU/zkIcdro/ARTtJf1B5gTo8VN 7tmIFlwwSM/J7HBvh2FEkdcehR6D1lwewWhzJSnj0NG0yGNlCLFkz8O74989Qfd1WHww o09A== X-Gm-Message-State: AOAM531x1XCvNjr19Ls+FJ5r5meo3JunW5BtxiqUzHX+e6spBpRIMf88 pIeoIxfdeeUCxkSReLnml5o27Q== X-Google-Smtp-Source: ABdhPJw07pkMlp/wa7hOyU26GePo2LXD56vW96vj5Sk6xZIiiPoUrxPmL1/QeYsYtlYpnqzeZtt8VA== X-Received: by 2002:adf:97d2:: with SMTP id t18mr3944967wrb.228.1610562524885; Wed, 13 Jan 2021 10:28:44 -0800 (PST) Received: from google.com (230.69.233.35.bc.googleusercontent.com. [35.233.69.230]) by smtp.gmail.com with ESMTPSA id b14sm4485354wrx.77.2021.01.13.10.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 10:28:44 -0800 (PST) Date: Wed, 13 Jan 2021 18:28:41 +0000 From: Quentin Perret To: Marc Zyngier Subject: Re: [RFC PATCH v2 13/26] KVM: arm64: Enable access to sanitized CPU features at EL2 Message-ID: References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-14-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210113_132846_561078_F4B3D5ED X-CRM114-Status: GOOD ( 17.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, kernel-team@android.com, Frank Rowand , Suzuki K Poulose , android-kvm@google.com, Catalin Marinas , Fuad Tabba , linux-kernel@vger.kernel.org, Rob Herring , James Morse , linux-arm-kernel@lists.infradead.org, David Brazdil , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry 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 Wednesday 13 Jan 2021 at 17:27:49 (+0000), Marc Zyngier wrote: > On 2021-01-13 14:35, Quentin Perret wrote: > > On Wednesday 13 Jan 2021 at 14:23:03 (+0000), Quentin Perret wrote: > > > Good point, that would be nice indeed. Can I use that from outside an > > > __init function? > > > > Just gave it a go, and the answer to this appears to be yes, > > surprisingly -- I was expecting a compile-time warning similar to what > > we get when non-__init code calls into __init, but that doesn't seem to > > trigger here. Anyways, I'll add the annotation in v3. > > That's surprising. I'd definitely expect something to explode... > Do you have CONFIG_DEBUG_SECTION_MISMATCH=y? Yes I do, so, that doesn't seem to be it. Now, the plot thickens: I _do_ get a warning if I remove the 'const' qualifier. But interestingly, in both cases hyp_ftr_regs is placed in .init.data: $ objdump -t vmlinux | grep hyp_ftr_regs ffff8000116c17b0 g O .init.data 0000000000000030 hyp_ftr_regs The warning is silenced only if I mark hyp_ftr_regs as const. modpost bug? I'll double check my findings and follow up in a separate series. Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel