Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Kate Hsuan (via Email Bridge)
From: Kate Hsuan on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1683371062

@jmflinuxtx Thank you for answering this.
I've updated the motivation in the description section. The idea is to disable
the unnecessary driver if we confirm the drivers are not used for x86 platform
and reduce the package size.
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Kate Hsuan (via Email Bridge)
From: Kate Hsuan on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1683344539

Hi,

I've updated the motivation of this work in the description section.
The main idea of it is to reduce the kernel module package size. We can
disable the unnecessary driver and reduce the package size. For the list
maintenance aspect, I got a list of accel config from @jwrdegoede and he also
came out with this idea. Maybe he can provide a solution to it. For now, this
work is an example of iio accel driver. It can be used for other types of
drivers as well.
Ideally, the script can be run through the automation process, such as "make
dist-configs"...etc. For now, it should run manually when we would like to
disable a list of unnecessary drivers.
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Justin M. Forbes (via Email Bridge)
From: Justin M. Forbes on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1682187133

The problem being solved would be unnecessarily enabled drivers.  Turning them
off lowers attack surface among other things. I would absolutely love a solid
data source which tells me what hardware is actually in the wild, and what I
can disable. But I don't know how much value the script is without some sort
of valid data source that is regularly updated.
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1682131422

Then, like @jstancek , I don't understand the problem being solved here.
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Justin M. Forbes (via Email Bridge)
From: Justin M. Forbes on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1682054528

I don't see why we would be using custom-overrides for this at all. If it is
hardware that does not exist on x86, we should be disabling the config there.
We have an issue that many of these drivers are written for an upstream chip,
but when they are merged to the kernel, we don't know what hardware they will
actually end up in. We have been turning them on if they are a vendor which
typically supplies to x86 board or pc manufacturers, so that if they do use
that part in a future product, it is supported.  This does make for a nice end
user experience as more things are supported on release, but it does present a
problem that we have a large number of drivers enabled as modules which serve
no purpose in the real world.
I like the problem that this is trying to solve, I just want to know where it
is getting the data to do so, and how that data is maintained.
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1682032702

Not to pile on but if you want to use the 'standard' config we've laid out and
then disable or enable configs, then why aren't you using the custom-overrides
functionality as described in redhat/configs/README ?
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Jan Stancek (via Email Bridge)
From: Jan Stancek on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1682015217

@hpa1 Can you please add to description what problem/bug is this MR solving?
Seeing this MR with no prior info, I can understand the 2nd commit (disable
bunch of configs), but I have similar questions as Justin. Who is supposed to
run this script and when?
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


Re: [OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Justin M. Forbes (via Email Bridge)
From: Justin M. Forbes on gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832#note_1681957728

While I certainly like the concept, how is the allow list maintained?  Where
is the information pulled from?
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue


[OS-BUILD PATCH 0/0] redhat: scripts: An automation script for disabling unused driver for x86

2023-12-06 Thread Kate Hsuan (via Email Bridge)
From: Kate Hsuan on gitlab.com
Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2832
NOTE: Truncated patchset due to missing public @redhat.com email
  address on your GitLab profile at https://gitlab.com/-/profile.
  Once that is fixed, close and reopen the merge request to
  retrigger sending the emails.

This script filters and disables the unused driver through an allow list
file in JSON format. The maintainer sets a list kernel config to the
allow list file and then runs this script. It will compare the current
setting with allow list. If the current settings aren't listed in the
allow list, the script will generate a redhat kernel config file and
disable it.

Moreover, the allow list file includes the setting of the commit title and
commit message. The maintainer can make that information according to the
requirement. The format is shown below.

{
  "name":"iio_accel",
  "driver_path":"drivers/iio/accel/",
  "redhat_config_path":"redhat/configs/fedora/generic",
  "redhat_x86_config_path":"redhat/configs/fedora/generic/x86",
  "allow_list":[
"CONFIG_BMC150_ACCEL_I2C",
"CONFIG_DA280",
"CONFIG_HID_SENSOR_ACCEL_3D",
"CONFIG_KXCJK1013",
"CONFIG_MMA7660",
"CONFIG_MMA8452",
"CONFIG_MXC4005",
"CONFIG_MXC6255",
"CONFIG_IIO_ST_ACCEL_I2C_3AXIS",
"CONFIG_IIO_ST_ACCEL_3AXIS",
"CONFIG_IIO_CROS_EC_ACCEL_LEGACY",
"CONFIG_BMC150_ACCEL"
],
  "commit_title":"Disable accel drivers for Fedora x86",
  "commit_msg":"Disable the following accel drivers because they are not used
on any x86 boards.\n{{ config_list }}"
}

The second commit includes the result of the script. It disabled the unused
iio accel drivers for x86 since they were not used in any x86 boards.

---
 redhat/configs/fedora/generic/x86/CONFIG_ADXL313_I2C|1 +
 redhat/configs/fedora/generic/x86/CONFIG_ADXL313_SPI|1 +
 redhat/configs/fedora/generic/x86/CONFIG_ADXL355_I2C|1 +
 redhat/configs/fedora/generic/x86/CONFIG_ADXL355_SPI|1 +
 redhat/configs/fedora/generic/x86/CONFIG_ADXL367_I2C|1 +
 redhat/configs/fedora/generic/x86/CONFIG_ADXL367_SPI|1 +
 redhat/configs/fedora/generic/x86/CONFIG_ADXL372_I2C|1 +
 redhat/configs/fedora/generic/x86/CONFIG_ADXL372_SPI|1 +
 redhat/configs/fedora/generic/x86/CONFIG_DA311  |1 +
 redhat/configs/fedora/generic/x86/CONFIG_DMARD10|1 +
 redhat/configs/fedora/generic/x86/CONFIG_IIO_KX022A_I2C |1 +
 redhat/configs/fedora/generic/x86/CONFIG_IIO_KX022A_SPI |1 +
 redhat/configs/fedora/generic/x86/CONFIG_IIO_ST_ACCEL_SPI_3AXIS |1 +
 redhat/configs/fedora/generic/x86/CONFIG_MSA311 |1 +
 redhat/configs/fedora/generic/x86/CONFIG_SCA3300|1 +
 redhat/scripts/filter-tools/x86_allow/x86_accel_allow   |   22 +
 redhat/scripts/filter-tools/x86_disable_unused_drivers.py   |  199 
++
 17 files changed, 236 insertions(+), 0 deletions(-)
--
___
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue