Bug 224639 - %kernel_module_package macro can overflow 8192 byte macro buffer
%kernel_module_package macro can overflow 8192 byte macro buffer
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: driver-update-program (Show other bugs)
5.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jon Masters
:
Depends On:
Blocks: 253733
  Show dependency treegraph
 
Reported: 2007-01-26 15:24 EST by Greg Edwards
Modified: 2007-11-30 17:07 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-21 22:33:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Greg Edwards 2007-01-26 15:24:13 EST
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
and
redhat-rpm-config-8.0.45-17.el5

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 18:27:18 EDT
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
release.
Comment 4 Marizol Martinez 2007-06-06 14:26:14 EDT
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-21 22:33:57 EDT
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.

Jon.

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