Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 224639 - %kernel_module_package macro can overflow 8192 byte macro buffer
Summary: %kernel_module_package macro can overflow 8192 byte macro buffer
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: driver-update-program
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Jon Masters
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-01-26 20:24 UTC by Greg Edwards
Modified: 2007-11-30 22:07 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-10-22 02:33:57 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Greg Edwards 2007-01-26 20:24:13 UTC
Description of problem:

A single rpm macro expansion is confined to an 8192 byte buffer (see comments
in /usr/lib/rpm/macros).  The %kernel_module_package macro in snap7 expands
for all kernels in a single macro expansion.  This is problematic when
building modules for several kernels, as the macro expansion can overflow the
8192 byte buffer, resulting in a truncated expansion and an rpm failure.

For instance, we're building for three kernels (default + xen + an internal
development one) with a modified kmodtool script passed in via the -s option.

So the line in our spec file looks like:

%kernel_module_package -s %{SOURCE1} default xen sgidev

With the extra content in our modified template, it pushes the expansion
for the three kernels beyond 8192 bytes.

Novell did their kernel module package macro differently, in that they
looped through flavors and expanded a macro for each flavor they built.
In this method, each got its own 8192 byte buffer, and we never hit the
problem there.

Version-Release number of selected component (if applicable):

RHEL5 RC Snapshot7

How reproducible:

Every time, give the test scenario outlined above.

Steps to Reproduce:
See above.
Actual results:

rpm build failures, at different locations, depending on where the
spec expansion was trunctated.

Expected results:

Should be able to build for an arbitrary number of kernels with a modified
template passed in (-s option).

Additional info:

Comment 2 RHEL Product and Program Management 2007-03-21 22:27:18 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update

Comment 4 Marizol Martinez 2007-06-06 18:26:14 UTC
Red Hat Engineering has evaluated this request and due to development and QA
resource limitations will not able to address it in the upcoming Red Hat
Enterprise Linux minor release. It will, however, be tracked for
consideration/inclusion in a later minor release.

Comment 6 Jon Masters 2007-10-22 02:33:57 UTC
This bug isn't currently affecting any of the modules that we ship - it will be
considered as part of reconciling implementations between us an Novell on this.
For now, I'm closing this bug as WONTFIX, but it will likely go away once we
harmonize the macro.


Note You need to log in before you can comment on or make changes to this bug.