• Red Hat Enterprise Linux 7.8

    • starting with kernel version 3.10.0-1127.el7.x86_64
  • Red Hat Enterprise Linux 8.1

    • starting with kernel version 4.18.0-147.el8_1.x86_64
  • On RHEL 7.8 and 8.1 servers, setting the value of semaphore parameter SEMMNI beyond 32768 fails with the error message sysctl: setting key "kernel.sem": Numerical result out of range .
# sysctl -w kernel.sem="4096 2048000 32 32769"
sysctl: setting key "kernel.sem": Numerical result out of range
kernel.sem = 4096 2048000 32 32769
  • Anything up to and including 32768 succeeds :
# sysctl -w kernel.sem="4096 2048000 32 32768"
kernel.sem = 4096 2048000 32 32768
  • This also applies to kernel.msgmni and kernel.shmmni
  • The change in SEMMNI behaviour is a recent change and expected behaviour that has been backported to the RHEL kernel.

  • Now, the maximum limit of SEMMNI has been set to 32768.

  • It is still possible to go beyond this limit by booting the server with the kernel command line parameter ipcmni_extend.

For RHEL 7:

  • Add this parameter ipcmni_extend in kernel commandline and reboot for changes to get reflected.

  • Below are the steps:

  • At the end of "GRUB_CMDLINE_LINUX" in "/etc/default/grub" and then save and exit the file.

# cat /etc/default/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap console=tty0 console=ttyS0,115200 ipcmni_extend"<--
GRUB_DISABLE_RECOVERY="true"
  • Rebuild the grub.
for BIOS:
# grub2-mkconfig -o /boot/grub2/grub.cfg 
for UEFI:
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
  • Reboot the system for changes to get reflected.

  • Once the changes are done, it will be possible to set the value to greater than 32768.

# sysctl -w kernel.sem="4096 2048000 32 32769"
kernel.sem = 4096 2048000 32 32769

For RHEL 8:

  • Use grub2-editenv to edit the grub :
# grub2-editenv - set "kernelopts=root=UUID=XXXX [........] ipcmni_extend"
  • Reboot the server for changes to get reflected.

  • Note: There is no need to rebuild the grub on RHEL 8.

  • The upstream commits that introduced the change are 6730e658017 and 8c81ddd2acd.

  • These commits have been backported to RHEL in commits 5523711052c and e3ea54f485a.

  • The commit states :

        ipc: IPCMNI limit check for msgmni and shmmni
        Patch series "ipc: IPCMNI limit check for *mni & increase that limit", v9.
        The sysctl parameters msgmni, shmmni and semmni have an inherent limit of
        IPC_MNI (32k).  However, users may not be aware of that because they can
        write a value much higher than that without getting any error or
        notification.  Reading the parameters back will show the newly written
        values which are not real.
        The real IPCMNI limit is now enforced to make sure that users won't put in
        an unrealistic value.  The first 2 patches enforce the limits.
        There are also users out there requesting increase in the IPCMNI value.
        The last 2 patches attempt to do that by using a boot kernel parameter
        "ipcmni_extend" to increase the IPCMNI limit from 32k to 8M if the users
        really want the extended value.

Additional Notes :

  • When a server with RHEL-8.0 / RHEL-7.7 or below kernel having the configured value of SHMMNI greater than 32768 will be updated
    to RHEL-8.1 / RHEL-7.8 kernel, then the value of SHMMNI will fall back to default 4096.
  • Similarly when a server with RHEL-8.0 / RHEL-7.7 or below kernel having the configured value of MSGMNI greater than 32768 will be updated
    to RHEL-8.1 / RHEL-7.8 kernel, then the value of MSGMNI will fall back to default 32000.
  • Likewise when a server with RHEL-8.0 / RHEL-7.7 or below kernel having the configured value of SEMMNI greater than 32768 will be updated
    to RHEL-8.1 / RHEL-7.8 kernel, then the value of SEMMNI will fall back to default 128.
  • Update the RHEL 7 kernel to the 3.10.0-1127.el7.x86_64 or RHEL 8 kernel to 4.18.0-147.el8_1.x86_64. Then set the parameter value as shown below which will fail :
# sysctl -w kernel.sem="4096 2048000 32 32769"
sysctl: setting key "kernel.sem": Numerical result out of range
kernel.sem = 4096 2048000 32 32769
  • Anything up to and including 32768 will succeed :
# sysctl -w kernel.sem="4096 2048000 32 32768"
kernel.sem = 4096 2048000 32 32768
  • Boot the server with the kernel command line parameter ipcmni_extend and again set the value to 32769 which will succeed :
# sysctl -w kernel.sem="4096 2048000 32 32769"
kernel.sem = 4096 2048000 32 32769

转载至https://access.redhat.com/solutions/4968021

On RHEL servers, changing the semaphore value fails with a message “setting key “kernel.sem“: Numeri 环境 Red Hat Enterprise Linux 7.8 starting with kernel version 3.10.0-1127.el7.x86_64 Red Hat Enterprise Linux 8.1 starting with kernel version 4.18.0-147.el8_1.x86_64 问题On RHEL 7.8 and 8.1 servers, setting the value of semaphore parameterSE. 适用于 RHEL 7 的 PHP 5.6.x 的 RPM 规范文件 x86_64 的二进制(和 src)RPM 可在 如果您对 RHEL/CentOS 7 的 PHP 5.6.x 感兴趣,我建议您使用该链接提供的 yum 存储库,而不是使用这些规范文件自己构建它们,但是当然,您可以使用这些规范文件自己构建它们,如果你会更喜欢。 我从 Fedora 20 中的 PHP RPM 规范文件开始,并对其进行了修改,以在 CentOS 7 中构建 PHP 的 5.6.x 分支。大多数不是作为 PHP 本身的一部分构建的模块都是直接重建 CentOS 7 或 CentOS 7 中可用的源 RPM CentOS 7 或 Fedora 20 的 EPEL。 重建是必要的,因为 PHP 5.6.x 的二进制 API 版本与 RHEL/CentOS 7 附带的 PHP 版
linux_kernel_cves 这是一个用于跟踪上游linux内核中CVE的简单项目。 单个发行版(RHEL,Debian,Ubuntu等)通常会很好地跟踪自己内核的CVE,但上游内核缺少此信息。 该项目旨在帮助解决这一空白。 输出是通过一组尚未经过全面测试或公开的工具自动生成的。 如何查看数据 有两种查看/使用数据的方式。 最简单的是的Web前端。 您可以在此处按流或按CVE ID查看CVE。 第二种方法是此github页面。 在这里,数据以JSON和文本格式进行布局。 Linux安全说明 跟踪,缓解和修补CVE仅是维护安全内核的一小部分。 让我清楚一点,您可以修补所有已知的CVE,但仍然容易受到攻击。 通过正确配置内核/系统,可以减轻某些风险。 我建议您访问和其他内核安全性页面以获取更多信息。 阅读信息流报告 以下是您可能会在流报告中看到的某些字符串的定义列表。 流文档中应出现的唯一CVE是可能影响该流的CVE。 (即,在第一个发行版之前未修复且未在发行版之后引入的)如果CVE没有已知的修复提交,则默认情况下,假定在引入后在所有流中都存在。 '修复未知':提交映射中没有固定
最近在移植和测试syslogd代码时,碰到两个问题:Resource temporarily unavailable(EAGAIN)和 Numerical result out of range。 移植的时候,在初始化全局变量的时候,有sembuf的初始化。如下图 struct sembuf SMwup[1] = = { {1, -1, IPC_NOWAIT} }; //此部分对应V操作 net.ipv4.icmp_echo_ignore_broadcasts = 1 开启恶意icmp错误消息保护 net.ipv4.icmp_ignore_bogus_error_responses = 1 关闭路由转发 net.ipv4.ip_forward = 0
1、安装图cenos7,软件选择时勾上GNOME或者KDE,网上推荐gonme,说是为了桌面而桌面,kde比较重量级单内容丰富(缺点启动慢),我选择的是GNOME安装,orale的静默安装搞得有点头大,新手还是图像画安装容易点 接下来开始折腾................................... 2、创建用户和组 [root@localhost ~]# groupadd oi
用于为基于 PXE/DHCP 和 BOOTP 的安装服务配置服务器和客户端配置的 Ruby 脚本,例如: Solaris 11 自动安装程序 (AI) 服务 Solaris 10(及更早版本)Jumpstart 服务 Centos、Scientific、OEL、Fedora 和 RHEL Kickstart 服务 Ubuntu Linux Preseed 服务 SuSE Enterprise Linux AutoYast 服务 ESXi Kickstart 服务 简化 VirtualBox VM 的创建、删除、导入和导出 简化 VMware Fusion 虚拟机的创建、删除、导入和导出 简化 Solaris 区域的创建 为 SPARC 控制域简化 Solaris VM 服务器的创建 为 SPARC 来宾域简化 Solaris VM 服务器的创建