Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add patch check by using build kernel #250

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

opsiff
Copy link
Member

@opsiff opsiff commented Jun 5, 2024

Modify a GitHub action workflow to check pull requests by build kernel

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign utsweetyfish for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -0,0 +1,58 @@
name: build-kernel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

@@ -0,0 +1,58 @@
name: build-kernel

on:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

name: build-kernel

on:
push:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file


on:
push:
pull_request:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

on:
push:
pull_request:
workflow_dispatch:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

pull_request:
workflow_dispatch:

env:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

workflow_dispatch:

env:
KBUILD_BUILD_USER: deepin-kernel-sig
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file


env:
KBUILD_BUILD_USER: deepin-kernel-sig
KBUILD_BUILD_HOST: deepin-kernel-builder
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

env:
KBUILD_BUILD_USER: deepin-kernel-sig
KBUILD_BUILD_HOST: deepin-kernel-builder
email: [email protected]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

KBUILD_BUILD_USER: deepin-kernel-sig
KBUILD_BUILD_HOST: deepin-kernel-builder
email: [email protected]
KDEB_COMPRESS: xz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

KBUILD_BUILD_HOST: deepin-kernel-builder
email: [email protected]
KDEB_COMPRESS: xz
KDEB_CHANGELOG_DIST: unstable
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

email: [email protected]
KDEB_COMPRESS: xz
KDEB_CHANGELOG_DIST: unstable
OUT_DIR: out
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

KDEB_CHANGELOG_DIST: unstable
OUT_DIR: out

permissions:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

OUT_DIR: out

permissions:
pull-requests: read
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

permissions:
pull-requests: read

jobs:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

pull-requests: read

jobs:
build-kernel:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file


jobs:
build-kernel:
runs-on: ubuntu-latest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

jobs:
build-kernel:
runs-on: ubuntu-latest
steps:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

build-kernel:
runs-on: ubuntu-latest
steps:
- name: "Update APT sources"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

runs-on: ubuntu-latest
steps:
- name: "Update APT sources"
run: |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

steps:
- name: "Update APT sources"
run: |
sudo apt update
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

run: |
sudo apt update

- name: Free Disk Space (Ubuntu)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

sudo apt update

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file


- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

@opsiff opsiff force-pushed the opsiff-patch-build-kernel-ci branch from a6e708f to 3c02189 Compare June 6, 2024 03:39
@@ -0,0 +1,30 @@
name: build kernel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

@@ -0,0 +1,30 @@
name: build kernel
on:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

@@ -0,0 +1,30 @@
name: build kernel
on:
push:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

name: build kernel
on:
push:
pull_request:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

on:
push:
pull_request:
workflow_dispatch:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

pull_request:
workflow_dispatch:

env:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

workflow_dispatch:

env:
KBUILD_BUILD_USER: deepin-kernel-sig
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 工作流文件中的环境变量使用了硬编码的值,建议使用配置文件或环境变量来管理这些值。
  • 工作流中没有对nproc的环境变量进行错误处理,如果nproc命令失败,可能会导致未定义的变量错误。
  • 工作流中没有对make命令的输出进行错误处理,如果编译过程中出现错误,可能会导致后续步骤无法执行。
  • 工作流中没有对git config命令的输出进行错误处理,如果配置过程中出现错误,可能会导致未定义的变量错误。

是否建议立即修改:


env:
KBUILD_BUILD_USER: deepin-kernel-sig
KBUILD_BUILD_HOST: deepin-kernel-builder
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

env:
KBUILD_BUILD_USER: deepin-kernel-sig
KBUILD_BUILD_HOST: deepin-kernel-builder
email: [email protected]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

KBUILD_BUILD_HOST: deepin-kernel-builder
email: [email protected]

permissions:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

email: [email protected]

permissions:
pull-requests: read
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

permissions:
pull-requests: read

jobs:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

pull-requests: read

jobs:
build-kernel:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file


jobs:
build-kernel:
runs-on: [self-hosted, linux]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

jobs:
build-kernel:
runs-on: [self-hosted, linux]
steps:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

build-kernel:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
- name: "Install Deps"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

steps:
- uses: actions/checkout@v3
- name: "Install Deps"
run: |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

- uses: actions/checkout@v3
- name: "Install Deps"
run: |
git config --global user.email $email
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

- name: "Install Deps"
run: |
git config --global user.email $email
git config --global user.name $KBUILD_BUILD_USER
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

git config --global user.email $email
git config --global user.name $KBUILD_BUILD_USER

- name: "Compile kernel"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

git config --global user.name $KBUILD_BUILD_USER

- name: "Compile kernel"
run: |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file


- name: "Compile kernel"
run: |
# .config
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

- name: "Compile kernel"
run: |
# .config
make deepin_x86_desktop_defconfig
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

run: |
# .config
make deepin_x86_desktop_defconfig
make -j$(nproc)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: It's generally not useful to have the filename in the file

@Avenger-285714 Avenger-285714 merged commit 0e20953 into linux-6.6.y Jun 7, 2024
6 of 7 checks passed
@opsiff opsiff deleted the opsiff-patch-build-kernel-ci branch June 7, 2024 04:25
Avenger-285714 pushed a commit to Avenger-285714/DeepinKernel that referenced this pull request Jul 5, 2024
commit d92a7580392ad4681b1d4f9275d00b95375ebe01 upstream.

Only export struct fb_info.fix.smem_start if that is required by the
user and the memory does not come from vmalloc().

Setting struct fb_info.fix.smem_start breaks systems where DMA
memory is backed by vmalloc address space. An example error is
shown below.

[    3.536043] ------------[ cut here ]------------
[    3.540716] virt_to_phys used for non-linear address: 000000007fc4f540 (0xffff800086001000)
[    3.552628] WARNING: CPU: 4 PID: 61 at arch/arm64/mm/physaddr.c:12 __virt_to_phys+0x68/0x98
[    3.565455] Modules linked in:
[    3.568525] CPU: 4 PID: 61 Comm: kworker/u12:5 Not tainted 6.6.23-06226-g4986cc3e1b75-dirty deepin-community#250
[    3.577310] Hardware name: NXP i.MX95 19X19 board (DT)
[    3.582452] Workqueue: events_unbound deferred_probe_work_func
[    3.588291] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    3.595233] pc : __virt_to_phys+0x68/0x98
[    3.599246] lr : __virt_to_phys+0x68/0x98
[    3.603276] sp : ffff800083603990
[    3.677939] Call trace:
[    3.680393]  __virt_to_phys+0x68/0x98
[    3.684067]  drm_fbdev_dma_helper_fb_probe+0x138/0x238
[    3.689214]  __drm_fb_helper_initial_config_and_unlock+0x2b0/0x4c0
[    3.695385]  drm_fb_helper_initial_config+0x4c/0x68
[    3.700264]  drm_fbdev_dma_client_hotplug+0x8c/0xe0
[    3.705161]  drm_client_register+0x60/0xb0
[    3.709269]  drm_fbdev_dma_setup+0x94/0x148

Additionally, DMA memory is assumed to by contiguous in physical
address space, which is not guaranteed by vmalloc().

Resolve this by checking the module flag drm_leak_fbdev_smem when
DRM allocated the instance of struct fb_info. Fbdev-dma then only
sets smem_start only if required (via FBINFO_HIDE_SMEM_START). Also
guarantee that the framebuffer is not located in vmalloc address
space.

Signed-off-by: Thomas Zimmermann <[email protected]>
Reported-by: Peng Fan (OSS) <[email protected]>
Closes: https://lore.kernel.org/dri-devel/[email protected]/
Reported-by: Geert Uytterhoeven <[email protected]>
Closes: https://lore.kernel.org/dri-devel/CAMuHMdX3N0szUvt1VTbroa2zrT1Nye_VzPb5qqCZ7z5gSm7HGw@mail.gmail.com/
Fixes: a51c766 ("drm/fb-helper: Consolidate CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM")
Tested-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Cc: <[email protected]> # v6.4+
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants