From patchwork Fri Jun 9 10:02:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Righi X-Patchwork-Id: 1792845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=nme9+7qC; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QcxT85DFXz20Ty for ; Fri, 9 Jun 2023 20:02:19 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1q7YwW-0002mZ-Ez; Fri, 09 Jun 2023 10:02:04 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1q7YwU-0002mS-AM for kernel-team@lists.ubuntu.com; Fri, 09 Jun 2023 10:02:02 +0000 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id E74F13F14A for ; Fri, 9 Jun 2023 10:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686304921; bh=AAE+8/y/T1h0hpK8+oswvEnYy5pwmlLgyiyALWdwE50=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=nme9+7qCpCPa+Ab4N/xq4Lp9Tj7SHZss2msyuqw7sWeoa/OVMxU2kK9ztcnSo3+ZY u4jwpVdFjpeJni2EBFijYTixYwZBG/KTiZVcQPbc54ljpTQV9QYVarhbEcqX9Eyn4l HyVOueOEJPkS0k7yEcM8Gsw7TAhKcoiZLnxZbSACzcVnqm9IumD2T7lFTLJECQnKYM Sz9/5YjI/Bo+L7hj9Zgh2Jg3rWwz5pLwg4UkjnUWKHqh3CFvTi4qiaCG87hY3E99HR ZRLSkvMo03awIEF2vFA41Bqj9lmCZlNNGAcAtTwgOmdi/biym1LPrv9N1Y5eiGVjRm oRAeATPbRgavQ== Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-9715654ab36so154675366b.0 for ; Fri, 09 Jun 2023 03:02:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686304921; x=1688896921; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AAE+8/y/T1h0hpK8+oswvEnYy5pwmlLgyiyALWdwE50=; b=hBSAE9OLrJoLzTAUgbfd2qwgbC3M9UDSXlQr360F9Zptm4aD0CwHxigEy4hg/d3ZCD /E3bn0B8xQkWvyhDsJm2ehBRwiFl8YivVm3pks7hnk6GqzT2L7E0vkJmjorNeUJu4z8z +VTXkTSYDtHPY+0E8qNelZMUN4jybB4ZeW08bS5Lau/2/1em/tZK1O2z6emsO/hgnVOa zt8entX8uSXrhRVW+bugZ5seqJA+jiNfn5MmcjdSjwMNjuPv5kJ3aElLunYho/PwMWIU AqBl3QYRZ3N6EtYiHGKs8O7cAC41HMy0+jnB2ceRKGliGPAFivoLduiqzBtFoI1PpOH6 jiBQ== X-Gm-Message-State: AC+VfDw608bQPO3hmI22mLKus0+dbidfLPYenTECXSd984yggo6Uz80Y ZyfJtEukkDwUqbJMAhbDVIatQmtupdYz53f9cXJVFJByASs4F/QrMZDCuBLQ3yL1qgUAoPOSmbx nAJFxd9EZwIfXhTxdXRj8pGkdafAnbZgJo8wRA6LE/FnLUBkkBQ== X-Received: by 2002:a17:907:72cf:b0:96f:4ee4:10d4 with SMTP id du15-20020a17090772cf00b0096f4ee410d4mr1114987ejc.43.1686304921621; Fri, 09 Jun 2023 03:02:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5FesP5HpGIM5GAfWd1UVdmANlQX84tTNurkMP3TWFJVso/df/Q2EUOO8JKMDMHn35RoFVuNA== X-Received: by 2002:a17:907:72cf:b0:96f:4ee4:10d4 with SMTP id du15-20020a17090772cf00b0096f4ee410d4mr1114973ejc.43.1686304921247; Fri, 09 Jun 2023 03:02:01 -0700 (PDT) Received: from localhost (host-87-3-121-235.retail.telecomitalia.it. [87.3.121.235]) by smtp.gmail.com with ESMTPSA id sd2-20020a170906ce2200b009749b769c95sm1071644ejb.158.2023.06.09.03.02.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 03:02:01 -0700 (PDT) Date: Fri, 9 Jun 2023 12:02:00 +0200 From: Andrea Righi To: kernel-team@lists.ubuntu.com Subject: [ANNOUNCE] annotations v4 and how to deal with kernel .config Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" As many of you may have noticed already, some of our kernels already migrated to the new annotations model (v4), removing any .config chunk from their git repository. What is annotations? ==================== Annotations is a JSON-like file (one for each kernel) that is used to store all the kernel config options (with optional notes) for all the kernel's supported architectures and flavours. Starting with 22.04 (Jammy Jellyfish), Ubuntu kernels are now using only annotations to generate their corresponding .config. Why don't we simply use .config? ================================ Ubuntu provides a wide variety of kernels for many different architectures and flavours, such as generic, lowlatency, cloud kernels, kvm, etc. Maintaining a separate .config for each of these kernels would be extremely challenging. Moreover, we need to make sure that certain .config options do not change across kernel updates and rebases, in order to have a kernel functional for the scope that it was designed for. The main goal of annotations is to make the maintenance of multiple kernel .config easier and more reliable. How do I change a particular .config then? ========================================== You have two options: 1) change all the kernel configs that you want, produce a standard .config and import it in annotations, specifying the appropriate architecture and flavour, for example: $ ./debian/scripts/misc/annotations --arch amd64 --flavour generic \ --import .config 2) modify `debian./config/annotations` directly or using the annotations script, for example, enable X86_KERNEL_IBT on amd64, flavour generic: $ ./debian/scripts/misc/annotations --arch amd64 --flavour generic \ --config CONFIG_X86_KERNEL_IBT --write y \ --note "Enable Intel Indirect Branch Tracking (IBT) as a test" Then run a `git diff` to show you the actual change(s). For example, the following could be submitted as a valid patch to this mailing list: $ git diff How to generate the .config for a specific kernel? ================================================== To generate a standard .config for a specific architecture and flavour run the following command (i.e., amd64, flavour generic): $ ./debian/scripts/misc/annotations --arch amd64 --flavour generic > .config The generated .config will have all the config options for amd64, flavour generic used by this particular kernel. See also ======== - Kernel configuration in Ubuntu (https://discourse.ubuntu.com/t/kernel-configuration-in-ubuntu/35857) -Andrea diff --git a/debian.master/config/annotations b/debian.master/config/annotations index 24cec55b1b20b..cfb2dc5eb3757 100644 --- a/debian.master/config/annotations +++ b/debian.master/config/annotations @@ -732,8 +732,8 @@ CONFIG_X509_CERTIFICATE_PARSER note<'module signing'> CONFIG_X86_ACPI_CPUFREQ policy<{'amd64': 'y'}> CONFIG_X86_ACPI_CPUFREQ note<'not autoloadable'> -CONFIG_X86_KERNEL_IBT policy<{'amd64': 'n'}> -CONFIG_X86_KERNEL_IBT note<'LP: #1980484'> +CONFIG_X86_KERNEL_IBT policy<{'amd64': 'y'}> +CONFIG_X86_KERNEL_IBT note<'Enable Intel Indirect Branch Tracking (IBT) as a test'> CONFIG_X86_PCC_CPUFREQ policy<{'amd64': 'y'}> CONFIG_X86_PCC_CPUFREQ note<'not autoloadable'>