From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 086303ABD8D for ; Thu, 14 May 2026 06:46:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778741175; cv=none; b=H/vdNRreQxgpPKny3kLDmmi/4FF6e3qqPJCdI4dMErImtdryCEsWBM8+wR03vE9n6mwaPW6UPCTooxPvnhCuycfUclXcOoghqlHkIdQuVB8NLqSXnvwShqPNItI4G3+1pjmua51kWWD46gI7XTd8e3X9PPpug2U8+q0sjAzNKRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778741175; c=relaxed/simple; bh=9WoMlXctnJX7VI6xy3gmdkzNlfWMOnxsDI0zmen0z7A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dz9pINpJ/NwGgmy9t8yEfwb57VHXf5GFXzBvHuHQvxLeJQOdW+O36lsWVZwysGsEKpE+qZjadU7e5XHWinPvcNrfPnIr4Y6BHe59Jbtwf5Q0+QvvTEC9OXYOwgsmieFBQMWmnSjZ+lJ7up455s/VlPF+zQIgVGpfQ1ZFQRoS++8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=IlZcLVwP; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="IlZcLVwP" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-48a563e4ef7so68730605e9.0 for ; Wed, 13 May 2026 23:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778741172; x=1779345972; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tLK4OFCAyAlL4axAHiV7SbqndCrWYl28zniYu6/O1QY=; b=IlZcLVwPk0RiNQPzap2NYz2eb9006clL6A1sg0iLk2XXRnOt7IHvIJQItGnw0NdE5V DYKejrcj/dmJVIbaS+HFJ+2Uz6v2/+IR1vFj0ThPr07+qGPUOWaNfBWUWgYOcqebVhol 66J3YZu2gMBaRUqgUZVYE5DyyqoFHGokpj2mfg86g6WdExVcqn+wx4RQT/8qKp6pLQ3y JvkcSA9r3tV6PWKBHTxA7v/CySiLTEkbnfLbsVO5XON/5zjUcWm9KVhuGAUhsMHHtnnx RlZE8ZWn6nHaOrunKBSAYGrFwJFPCE1mseqrBTTHMLWqslwbil0FAf+8M5Y4LLwXj8AO z1QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778741172; x=1779345972; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tLK4OFCAyAlL4axAHiV7SbqndCrWYl28zniYu6/O1QY=; b=dBffjQQnQl5ov7hW+GeexjWOL5nhWwz0bDxuT5YGcwQAhzcpANEyVDylHYP0OTYPWT mSQHOfBd1zGZFahx4s2jL49JZ/evMMS6JlyM9V3U3DlF2UHvNXH2BTT/UuQHt1rK6/Et gAvUy8iMTzFXNjfPWzygO+sBwuW8F5Q5l+sqYixzZ06+FWmshnGol6uHUxyo9Gtl0zRE WWsSRpUA1NIz2AXYaXQTc/GOiEZUwnV5GrJvaAnf264GsOMxDGnw9LUaHY7n3vMYFo+f Yiv+kr4/UC9Z6hQ5QVez8O9HuihkSlpNtMOgSQ/C3X1Y+lAUCc2YYq/KHbsjh5wvyo6j BI4g== X-Forwarded-Encrypted: i=1; AFNElJ8kzQdosfhsdG5gdgXsWveuBNXhC+LC6xS+e6ASsjijHISUBLVoQtRI4PfN7WazIvzaxgbzQYqy4VrVGl0=@vger.kernel.org X-Gm-Message-State: AOJu0YzWFbU611JJBC979NSEVBnxFKBPSDVQ0a3lN5VutdR5b8+embxP 3gV3A/pnAm64GVJvq+OzBNkRZIZZSHKctS94kv0AIYyEgYPnvV46i1bfqC1R/MzI5hA= X-Gm-Gg: Acq92OGW9/bfaKrHCd8Ri4PTiCIThUyluxiP97aLrT7uabPTrktjElBw1KHIolirFZW /zz4pWLVa96JJ5Mas0ETVmyA7WgLi33vBPm9r51dsTaztBwnpIZnLLFfsqeT61ermvVYLBtVd/4 OIIuZOxd45/jEXA9foHBwrBBB+Be0MSp7ejPH4/uK8vXuz3OowpH0A0I8zisyBcL/vW/9Knt8eT yq7xcU/QFIOpKzY8JXDOM2EYaxJOrpFkj4GKqjOLt8+A9Jb3ndEbP+dUFwaI8DYXaExKbJhKUlq 0NxV4qvofqoBlu7jRm/nD1cMcEKD5S6bPBVgctbMPvuplOSaN/02J6UUSojoziDgxrt90h0SA0D m573uzUWAvoJ8yDB+MVJuUhqhG8xgfiBehpfO2ZmM4VD/jSihadBaNjnX+UkwbNbhiO3xZ+aRbt sh1yPGx6FuwWX5GmOAFnHgIMmCcHOtgcMu+cyyzTJIc8m3 X-Received: by 2002:a05:600c:4ed1:b0:489:a4:e555 with SMTP id 5b1f17b1804b1-48fc9a41e96mr88986265e9.21.1778741172397; Wed, 13 May 2026 23:46:12 -0700 (PDT) Received: from [192.168.42.79] (nat2.prg.suse.com. [195.250.132.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da15a6454sm4465330f8f.34.2026.05.13.23.46.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2026 23:46:11 -0700 (PDT) Message-ID: <29fa0ff2-4477-4b42-824f-c99d862786ce@suse.com> Date: Thu, 14 May 2026 08:46:11 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/5] dyndbg.lds.S: fix lost dyndbg sections in modules To: Jim Cromie Cc: Arnd Bergmann , Jason Baron , Luis Chamberlain , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org References: <20260507-asm-generic-1-v2-0-47c52759d268@gmail.com> <20260507-asm-generic-1-v2-5-47c52759d268@gmail.com> Content-Language: en-US From: Petr Pavlu In-Reply-To: <20260507-asm-generic-1-v2-5-47c52759d268@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/7/26 10:40 PM, Jim Cromie wrote: > With CONFIG_DRM_USE_DYNAMIC_DEBUG=y, several build configs had > problems with __dyndbg* sections getting lost in drm drivers. Fix > this by following the model demonstrated in codetag.lds.h. > > Introduce include/asm-generic/dyndbg.lds.h, to bundle dynamic-debug's > multiple sections together, into 2 macros: > > vmlinux.lds.h DATA_DATA: move the 2 BOUNDED_SECTION_BY(__dyndbg*) > calls into dyndbg.lds.h DYNDBG_SECTIONS(). vmlinux.lds.h now includes > the new file and calls the new macro. > > MOD_DYNDBG_SECTIONS declares the 2 BOUNDED_SECTION_BY calls, but wraps > them with output section syntax to keep them as known and separate ELF > sections in the module.ko. The KEEP fixes the lost section. > > dyndbg.lds.h includes (reuses) bounded-section.lds.h > > scripts/module.lds.S: now calls MOD_DYNDBG_SECTIONS right before the > CODETAG macro (consistent with their placements in vmlinux.lds.h), and > also includes dyndbg.lds.h > > This isolates vmlinux.lds.h from further __dyndbg section additions. > > CC: Arnd Bergmann > Signed-off-by: Jim Cromie > --- > [...] > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h > index d9d2eb708355..54897d742c6c 100644 > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -332,6 +332,7 @@ > /* > * .data section > */ > +#include > #define DATA_DATA \ > *(.xiptext) \ > *(DATA_MAIN) Nit: I suggest placing the dyndbg.lds.h include at the top of the file, as is usual, together with the codetag.lds.h include. Otherwise, this looks ok to me. Feel free to add: Reviewed-by: Petr Pavlu -- Thanks, Petr