Bug 3537 - OpenSSH build failed
Summary: OpenSSH build failed
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: amd64 Linux
: P5 major
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_9_3
  Show dependency treegraph
 
Reported: 2023-02-09 23:31 AEDT by John
Modified: 2023-03-17 13:38 AEDT (History)
2 users (show)

See Also:


Attachments
the output (2.68 KB, text/plain)
2023-02-09 23:31 AEDT, John
no flags Details
Check if each arg to madvise is defined before attempting to use them (763 bytes, patch)
2023-02-09 23:50 AEDT, Darren Tucker
djm: ok+
Details | Diff
still failed (1.90 KB, text/plain)
2023-02-10 01:37 AEDT, John
no flags Details
compatibility for mmap flags (846 bytes, patch)
2023-02-10 10:35 AEDT, Damien Miller
djm: ok? (dtucker)
Details | Diff
This patch worked. (1.48 KB, patch)
2023-02-10 23:27 AEDT, John
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John 2023-02-09 23:31:20 AEDT
Created attachment 3659 [details]
the output

Fail to build OpenSSH since this commit 195313dfe10a23c82e9d56d5fdd2f59beee1bdcf (harden Linux seccomp sandbox)

OS: RHEL 7 / CentOS 7

Please check the attachment.
Comment 1 Darren Tucker 2023-02-09 23:48:09 AEDT
Are MADV_FREE or MADV_WIPEONFORK declared in any header or are they just not present on this platform?
Comment 2 Darren Tucker 2023-02-09 23:50:26 AEDT
Created attachment 3660 [details]
Check if each arg to madvise is defined before attempting to use them

If they're not defined then please try this patch.
Comment 3 John 2023-02-10 01:27:14 AEDT
(In reply to Darren Tucker from comment #1)
> Are MADV_FREE or MADV_WIPEONFORK declared in any header or are they
> just not present on this platform?

I found MADV_FREE and MADV_WIPEONFORK in /usr/include/asm-generic/mman.h , which included by /usr/include/asm/mman.h .
And these 2 files are provided by kernel-headers-5.15.92-1.el7.x86_64 .
Comment 4 John 2023-02-10 01:37:59 AEDT
Created attachment 3661 [details]
still failed
Comment 5 John 2023-02-10 01:39:33 AEDT
I have tried the patch, still failed.
Comment 6 Damien Miller 2023-02-10 09:56:50 AEDT
Comment on attachment 3660 [details]
Check if each arg to madvise is defined before attempting to use them

We might need to do something similar for the futex flags if people are building on older linux too
Comment 7 Damien Miller 2023-02-10 10:35:37 AEDT
Created attachment 3662 [details]
compatibility for mmap flags

Please try this patch in addition to Darren's
Comment 8 John 2023-02-10 23:27:54 AEDT
Created attachment 3668 [details]
This patch worked.
Comment 9 Darren Tucker 2023-02-11 12:36:08 AEDT
Thanks for the report and confirming the fix.  Patch applied and will be in the 9.3p1 release.
Comment 10 Damien Miller 2023-03-17 13:38:34 AEDT
OpenSSH 9.3 has been released. Close resolved bugs