Re: checkpatch.pl false positive?

2020-04-02 Thread Greg KH
On Thu, Apr 02, 2020 at 01:16:27PM +0100, Michele Sorcinelli wrote: > On 4/2/20 1:13 PM, Greg KH wrote: > > No, the structure should be changed to actually be correct, as that is > > not how it should be declared in order to not have any padding between > > variables in the s

Re: checkpatch.pl false positive?

2020-04-02 Thread Greg KH
On Thu, Apr 02, 2020 at 01:08:01PM +0100, Michele Sorcinelli wrote: > I tried to run the checkpatch.pl script as follows: > > scripts/checkpatch.pl -f drivers/hwmon/dell-smm-hwmon.c > > And I noticed this kind of warnings: > > WARNING: Missing a blank line after declarations >

Re: how to check regmap start address

2020-04-02 Thread Greg KH
On Thu, Apr 02, 2020 at 01:48:23PM +0200, Tomek The Messenger wrote: > Hi > Let's see how it looks: > https://github.com/u-boot/u-boot/blob/master/include/regmap.h > > I first time ever see such thing like this: > struct regmap_range { > ulong start; > ulong size; > }; > struct regmap { > enum

Re: Was there a way to bind a shared memory object onto a fixed physical memory address?

2020-04-02 Thread Greg KH
On Thu, Apr 02, 2020 at 05:38:31PM +0800, kipade wrote: > As the topic, I want to specify a fixed physical memory space to a shared > memory object, which can use > shm_XXX api to access the memory. Of course I do not want to use mmap api to > map /dev/mem device > memory into user program.

Re: probe fail, what with devm_kzalloc, kcalloc data?

2020-04-03 Thread Greg KH
On Fri, Apr 03, 2020 at 02:47:50PM +0200, Tomek The Messenger wrote: > Hi > What happens with devm_kzalloc and devm_kcalloc data when probe function > returns not 0? > Is this memory automatically deallocated? Yes. Try it and see :) greg k-h ___

Re: linux kernel coding style and checkpatch.pl script

2020-03-26 Thread Greg KH
On Thu, Mar 26, 2020 at 02:36:23PM +0300, Konstantin Andreev wrote: > Valdis Klētnieks, 26 Mar 2020 07:13 MSK: > > > > To borrow from Pirates of the Carribean, "They're not exactly rules, > > they're more like... suggestions..." > > > > Don't split literal strings, it means that grepping the

Re: linux kernel coding style and checkpatch.pl script

2020-03-25 Thread Greg KH
On Wed, Mar 25, 2020 at 10:36:08AM +0100, Tomek The Messenger wrote: > Hi > There is checkpatch.pl script where You can check if You wrote code in your > kernel module according to linux kernel style. > However can I ignore warning message? > WARNING: quoted string split across lines > #974: FILE:

Re: linux kernel coding style and checkpatch.pl script

2020-03-26 Thread Greg KH
but not old decent unix way: > > > > | static int __init > > | loglevel(char *str) > > | { > > Greg KH, 26 Mar 2020 15:06 MSK: > > Documentation/process/coding-style.rst > > This document does not answer my question. It does not even require >

Re: LDD3 vs Essential Linux Device Drivers

2020-05-01 Thread Greg KH
On Fri, May 01, 2020 at 07:58:11AM +0200, Mohamed Dawod wrote: > Hi, > > I would like to start learning about Linux kernel and device drivers > development. > Should I have to start with LDD3 as a lot of people advice ? or can I start > with the Essential Linux Device Drivers by Sreekrishnan

Re: LDD3 vs Essential Linux Device Drivers

2020-05-01 Thread Greg KH
On Fri, May 01, 2020 at 09:29:19AM +0200, Mohamed Dawod wrote: > > > > > Hi, > > > > > > I would like to start learning about Linux kernel and device drivers > > > development. > > > Should I have to start with LDD3 as a lot of people advice ? or can I > > start > > > with the Essential Linux

Re: What is the minimal set of firmware files I need for my hardware?

2020-05-04 Thread Greg KH
On Mon, May 04, 2020 at 03:56:40PM +0300, Doron Behar wrote: > On Mon, May 04, 2020 at 12:45:55PM +0200, Greg KH wrote: > > On Mon, May 04, 2020 at 01:26:35PM +0300, Doron Behar wrote: > > > I hope this question fits to this List. > > > > > > Today I le

Re: Reg : signature and/or required key missing

2020-05-04 Thread Greg KH
On Mon, May 04, 2020 at 06:14:59PM +0530, Majji SankaraRao wrote: > Hi, > > I got the following kernel message after inserting my sample char dev > module into kernel version - 5.3.0-51-generic > > *[17866.747927] mychardev: module verification failed: signature and/or > required key missing -

Re: Would .DTSIs without DTS be accepted into the kernel?

2020-05-04 Thread Greg KH
On Mon, May 04, 2020 at 04:40:00PM +0200, Dávid Virág wrote: > On Mon, May 4, 2020 at 4:16 PM Ezra Buehler wrote: > > > As far as I know they don't like that. > > > I see, thanks for the reply! > > Sorry for the double reply, I'm new to mailing lists, and forgot to CC > kernelnewbies. > If

Re: Reg : Writing modules in new Linux versions

2020-05-04 Thread Greg KH
On Mon, May 04, 2020 at 02:07:06PM +0530, Majji SankaraRao wrote: > Hi, > > Please suggest some IDE's to Linux code navigation and development > if possible. Any one you want to use should be fine. Pick your favorite one and go at it. Remember, there are not specific requirements to use an IDE

Re: What is the minimal set of firmware files I need for my hardware?

2020-05-04 Thread Greg KH
On Mon, May 04, 2020 at 01:26:35PM +0300, Doron Behar wrote: > I hope this question fits to this List. > > Today I learned that my distro's `linux-unfree-firmware` package is 491 > Mb in size. I'm pretty sure my hardware doesn't need all of these files. > Maybe different Linux distros call this

Re: how to perform i2c transaction with disabled irq?

2020-04-30 Thread Greg KH
On Thu, Apr 30, 2020 at 01:11:06PM +0200, Tomek The Messenger wrote: > Hi > If I don't have disabled irqs I can use API i2c_smbus_write_byte in order > to perform i2c transaction. > But how to make i2c transaction if I have disabled irq? Is any built-in > function which lets such operation, where

Re: passing __user function parameter from kernel_module result in EFAULT

2020-04-25 Thread Greg KH
On Tue, Apr 21, 2020 at 09:14:00PM +0300, Lev R. Oshvang . wrote: > Hi all, I am trying to do a mount from kernel module in kernel 5.4 on x86_64. > It fails with -14, I tried to set_fs(USER_DS) before calling do_mount > but it did not > help. > > > do_mount() returns -EFAUTL when it checks

Re: USB driver

2020-04-25 Thread Greg KH
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://daringfireball.net/2007/07/on_top On Sat, Apr 25, 2020 at 09:45:44AM +0200, Sohaib Mhmd wrote: > Sorry, do you mean

Re: USB driver

2020-04-25 Thread Greg KH
On Sat, Apr 25, 2020 at 07:44:12AM +0200, Sohaib Mhmd wrote: > Hi everyone, I made a very simple USB driver > , > but the problem is that the probe and disconnect functions never was called. What USB device is currently attached

Re: sound over USB

2020-05-12 Thread Greg KH
On Tue, May 12, 2020 at 10:13:10PM +0530, Subhashini Rao Beerisetty wrote: > Hi all, > > In my Linux machine, I connected the plantronics usb headset with mic > and I see(with the help of dmesg) that this device detected. > > > > [116676.507868] usb 2-2: new full-speed USB device number 5

Re: Location of files for a new driver

2020-05-05 Thread Greg KH
On Tue, May 05, 2020 at 04:38:06PM +0200, Jacko Dirks wrote: > On Tue, May 05, 2020 at 04:20:32PM +0200, Greg KH wrote: > > drivers/staging/ is only for code that needs lots and lots of work to > > get into the "real" part of the kernel. It also requires a TODO file &g

Re: the same name of external kernel module as one of source file

2020-05-05 Thread Greg KH
On Tue, May 05, 2020 at 03:39:11PM +0200, Tomek The Messenger wrote: > Hi > If I have something like this in makefile: > obj-m := reset-core.o > reset-core-y := reset-core-main.o reset-core-utils.o > then module is built OK. > If I have something like that: > obj-m := reset-core.o > reset-core-y

Re: Location of files for a new driver

2020-05-05 Thread Greg KH
On Tue, May 05, 2020 at 03:58:28PM +0200, Jacko Dirks wrote: > Hello, > > I am starting to work on a new driver. I think the actual driver > (c file) needs to be placed in drivers/staging/subdir (am I > correct?). drivers/staging/ is only for code that needs lots and lots of work to get into

Re: request_firmware in DMA region

2020-03-18 Thread Greg KH
On Wed, Mar 18, 2020 at 02:29:24PM +, Lucas Tanure wrote: > Hi, > > I'm sending firmware to usb device with this code: > But it`s falling because the request firmware call didn't put my firmware in > a DMA capable area. That's my guess. > > So how to request firmware in DMA capable area?

Re: request_firmware in DMA region

2020-03-18 Thread Greg KH
On Wed, Mar 18, 2020 at 04:55:47PM +, Lucas Tanure wrote: > On 2020-03-18 14:46, Greg KH wrote: > > On Wed, Mar 18, 2020 at 02:29:24PM +, Lucas Tanure wrote: > > > Hi, > > > > > > I'm sending firmware to usb device with this code: > > > But i

Re: the use case of MODULE_SOFTDEP

2020-03-22 Thread Greg KH
On Sun, Mar 22, 2020 at 05:17:21PM +0100, Tomek The Messenger wrote: > What is the use case of using: > MODULE_SOFTDEP("pre: another-external-kernel-module..."); > because I completely don't understand. > If I have phandle to another-external-kernel-module in dts which is > mandatory in my kernel

Re: Writing framework in kernel

2020-03-22 Thread Greg KH
On Sun, Mar 22, 2020 at 05:08:15PM +0100, Tomek The Messenger wrote: > Hi > I am writing some framework for my kernel drivers. I delegated to framework > the code which is common amongs all kernel drivers. So my framework module > core.c has none probe, remove functions. It has also none

Re: can kernel platform driver name be different than module name?

2020-03-22 Thread Greg KH
On Sun, Mar 22, 2020 at 05:26:09PM +0100, Tomek The Messenger wrote: > I suppose the response is yes but I would like to make sure: > Is below acceptable: > some_module_name.c: > #define DRIVER_NAME "some-driver-name" > ... > static struct platform_driver some_driver = { > .driver = {

Re: Unknown symbol reboot_mode

2020-03-23 Thread Greg KH
On Mon, Mar 23, 2020 at 11:27:50AM +0100, Tomek The Messenger wrote: > Hi > When I insert external kernel module which is compiled out of tree I got > error: > > root:/run# insmod ./my_module.ko > [ 137.443823] my_module: Unknown symbol reboot_mode (err 0) > > I investigated that I have

Re: Accessing rpmsg_device in sysfs attribute functions

2020-03-24 Thread Greg KH
On Tue, Mar 24, 2020 at 05:34:44AM +, Pelle Windestam wrote: > Hi, > > I am trying to develop a simple driver for the rpmsg bus, in order to send > various commands from user space in Linux to a secondary CPU (A Cortex M4). > I'm trying to keep things as simple as possible, so my idea was

Re: Accessing rpmsg_device in sysfs attribute functions

2020-03-24 Thread Greg KH
On Tue, Mar 24, 2020 at 10:49:46AM +0100, Martin Kaiser wrote: > Hi Greg, > > Thus wrote Greg KH (g...@kroah.com): > > > That is because you have created a driver attribute, not a device > > attribute. Create device attributes and you should be fine, they bind >

Re: Accessing rpmsg_device in sysfs attribute functions

2020-03-24 Thread Greg KH
On Tue, Mar 24, 2020 at 12:02:15PM +, Pelle Windestam wrote: > > On Tue, Mar 24, 2020 at 05:34:44AM +, Pelle Windestam wrote: > > > Hi, > > > > > > I am trying to develop a simple driver for the rpmsg bus, in order to send > > various commands from user space in Linux to a secondary CPU (A

Re: Finding bugs/issues to work on

2020-03-24 Thread Greg KH
On Tue, Mar 24, 2020 at 04:49:29PM +0530, Suraj Upadhyay wrote: > Hii newbies, > I just started studying for linux-kernel development although I am > not completely new to open source technologies. I wanted to clarify my > doubts in the following things > 1. Where can I find issues/tickets

Re: Accessing rpmsg_device in sysfs attribute functions

2020-03-24 Thread Greg KH
On Tue, Mar 24, 2020 at 01:05:48PM +, Pelle Windestam wrote: > > From: Greg KH > > Sent: Tuesday, 24 March 2020 13:31 > > To: Pelle Windestam > > Cc: kernelnewbies@kernelnewbies.org > > Subject: Re: Accessing rpmsg_device in sysfs attribute functions > >

Re: Why my patch in lore archive doe not have mbox?

2020-05-08 Thread Greg KH
On Fri, May 08, 2020 at 10:21:05AM +0300, Lev R. Oshvang . wrote: > Some time ago I posted patch to linux-integrity > https://lore.kernel.org/linux-integrity/20200330122434.GB28214@kl/ > > > 2 questions: > 1. Linux-integrity maintainer, Mimi Zohar, rule this patch out. > How can I arque with

Re: SElinux and its own error code?

2020-05-03 Thread Greg KH
On Sat, May 02, 2020 at 11:55:02PM -0400, Jeffrey Walton wrote: > Hi Guys, > > I lost about four hours chasing inaccurate messages from Apache. It > turns out SElinux was denying access, so the EPERM was not really > accurate. But Apache saw EPERM or EACCESS and logged a message related > to

Re: SElinux and its own error code?

2020-05-03 Thread Greg KH
On Sun, May 03, 2020 at 03:59:22AM -0400, Jeffrey Walton wrote: > > Among other things, it means that programs potentially have to have > > special-casing in the error handlers, which are *already* code that doesn't > > get fully tested in most cases. > > Why is that a bad thing? The goal is to

Re: Disable EISA and probes

2020-09-05 Thread Greg KH
On Sat, Sep 05, 2020 at 09:17:43AM -0400, Jeffrey Walton wrote: > On Sat, Sep 5, 2020 at 7:37 AM Greg KH wrote: > > > > On Sat, Sep 05, 2020 at 07:31:13AM -0400, Jeffrey Walton wrote: > > > On Sat, Sep 5, 2020 at 2:15 AM Greg KH wrote: > > > > > > &g

Re: Disable EISA and probes

2020-09-05 Thread Greg KH
On Fri, Sep 04, 2020 at 10:57:38PM -0400, Jeffrey Walton wrote: > Hi Everyone, > > I would like to disable EISA and its probes during boot. I found the > docs at https://www.kernel.org/doc/html/latest/driver-api/eisa.html, > but it does not discuss how to disable EISA or the probes. > > I also

Re: Disable EISA and probes

2020-09-05 Thread Greg KH
On Sat, Sep 05, 2020 at 07:31:13AM -0400, Jeffrey Walton wrote: > On Sat, Sep 5, 2020 at 2:15 AM Greg KH wrote: > > > > On Fri, Sep 04, 2020 at 10:57:38PM -0400, Jeffrey Walton wrote: > > > Hi Everyone, > > > > > > I would like to disable EISA and its

Re: Userspace app crash causes system crash on do_exit probe

2020-09-01 Thread Greg KH
On Tue, Sep 01, 2020 at 09:16:22AM +0200, César Augusto Marcelino dos Santos wrote: > Dear community, > > I have created a kernel module that adds probes to do_execve() and > do_exit() syscalls (code by the end of this email). It is running on a > custom kernel-based system, version 3.18.31.

Re: Can I reboot a USB device within a driver's probe function?

2020-09-14 Thread Greg KH
On Mon, Sep 14, 2020 at 10:03:49AM +0200, Thierry Seegers wrote: > Hi, thanks for the reply. > > > > One can even have this script executed automatically through a > > > ".rules" file. So far so good. My question is: can I write a driver > > > that will perform the same thing? > > > > Yes, but

Re: Please assess this patch: [PATCH] Docs: FIxed spelling errors in Documentation/devicetree/bindings/

2020-09-04 Thread Greg KH
On Fri, Sep 04, 2020 at 05:00:47PM +1000, Marlon Rac Cambasis wrote: > Hello, I would like to make my first contribution to the Linux kernel in the > form of a (trivial) spelling fix. Does this patch (including the subject and > the > way my mail is being displayed), meet the requirements?

Re: Can I reboot a USB device within a driver's probe function?

2020-09-13 Thread Greg KH
On Sun, Sep 13, 2020 at 06:17:49PM +0200, Thierry Seegers wrote: > Hi, Short answer to your subject line, yes, you can, we have been doing so since the 1990's :) > I have a USB device that when plugged into a computer shows up as a > generic USB device with product ID "0580". The only thing

Re: Accessing allocated space in a debugfs file

2020-10-02 Thread Greg KH
On Fri, Oct 02, 2020 at 04:59:24PM +0530, ymdatta wrote: > On 30/09/20 11:19 pm, Greg KH wrote: > > On Wed, Sep 30, 2020 at 10:32:05PM +0530, ymdatta wrote: > > >> > >> I want to write in this file, how should i be accessing the space created > >> from

Re: USB Question about devices being reconnected to the host

2020-10-15 Thread Greg KH
On Thu, Oct 15, 2020 at 01:17:45PM +0100, Lucas Tanure wrote: > Hi, > > I'm learning about USB drivers and I would like to know about disconnecting > and reconnecting usb devices. > > I can see my probe function being called and also the disconnect function. > But if I reconnect the device there

Re: opaque "pointer" API, model, best practice ?

2020-10-14 Thread Greg KH
On Wed, Oct 14, 2020 at 09:09:11AM -0600, jim.cro...@gmail.com wrote: > hi all, > > is there an api / usage model / or best practice > for opaque "handles" ? "it depends" :) What are you wanting to do exactly? > Im aware of 1 case: > the handle returned by zs_malloc > I have tried to use it,

Re: Scheduler benchmarks

2020-08-18 Thread Greg KH
On Tue, Aug 18, 2020 at 08:00:11PM +0530, Muni Sekhar wrote: > Hi all, > > I’ve two identical Linux systems with only kernel differences. What are the differences in the kernels? > While doing kernel profiling with perf, I got the below mentioned > metrics for Scheduler benchmarks. > > 1st

Re: Scheduler benchmarks

2020-08-18 Thread Greg KH
On Tue, Aug 18, 2020 at 11:01:35PM +0530, Muni Sekhar wrote: > On Tue, Aug 18, 2020 at 10:44 PM Greg KH wrote: > > > > On Tue, Aug 18, 2020 at 10:24:13PM +0530, Muni Sekhar wrote: > > > On Tue, Aug 18, 2020 at 8:06 PM Greg KH wrote: > > > > > > > >

Re: Scheduler benchmarks

2020-08-18 Thread Greg KH
On Tue, Aug 18, 2020 at 10:24:13PM +0530, Muni Sekhar wrote: > On Tue, Aug 18, 2020 at 8:06 PM Greg KH wrote: > > > > On Tue, Aug 18, 2020 at 08:00:11PM +0530, Muni Sekhar wrote: > > > Hi all, > > > > > > I’ve two identical Linux systems

Re: Scheduler benchmarks

2020-08-19 Thread Greg KH
On Wed, Aug 19, 2020 at 03:46:06PM +0530, Muni Sekhar wrote: > On Tue, Aug 18, 2020 at 11:45 PM peter enderborg > wrote: > > > > On 8/18/20 7:53 PM, Muni Sekhar wrote: > > > On Tue, Aug 18, 2020 at 11:06 PM Greg KH wrote: > > >> On Tue, Aug 18, 2020

Re: Scheduler benchmarks

2020-08-19 Thread Greg KH
On Wed, Aug 19, 2020 at 12:43:52PM -0400, Valdis Klētnieks wrote: > On Wed, 19 Aug 2020 12:42:54 +0200, Greg KH said: > > Look up Spectre and Meltdown for many many examples of what happened and > > what went wrong with chip designs and how we had to fix these things in > > t

Re: Please give advise about my first patch attempt

2020-08-27 Thread Greg KH
On Thu, Aug 27, 2020 at 11:52:56AM +0200, Garrit Franke wrote: > Hi Thomas, > > Noob here. > > On Thu, Aug 27, 2020 at 10:49 AM Thomas Schmitt wrote: > > > > Commit 210ba1d1724f5c4ed87a2ab1a21ca861a915f734 of january 2008 switched > > sr_drive_status() away from indirectly using sr_do_ioctl()

Re: Please give advise about my first patch attempt

2020-08-27 Thread Greg KH
On Thu, Aug 27, 2020 at 10:02:21AM -0400, Leam Hall wrote: > On Thu, Aug 27, 2020 at 9:20 AM Greg KH wrote: > > > That is also documented in the ever-growing submitting patches document > > somewhere... > > This? > > https://www.kernel.org/doc/html/v4.17/process/s

Re: Opening /proc//net/dev prevents network namespace from expiring

2020-08-24 Thread Greg KH
On Sat, Aug 22, 2020 at 11:05:53PM +0200, Arne Welzel wrote: > Hello, > > as an unprivileged user one is able to keep network namespaces from > expiring by opening /proc//net/dev of other processes. I've previously > put this on stackexchange [1] and then bugzilla [2]. That's been a while >

Re: What to do when a patch set gets no reply for 3 weeks ?

2020-09-29 Thread Greg KH
On Tue, Sep 29, 2020 at 12:26:20PM +0200, Thomas Schmitt wrote: > Hi, > > i sent my first patch set three weeks ago. See: > > https://lore.kernel.org/linux-scsi/20200908120207.5014-1-scdbac...@gmx.net/T/#u > > It was made with > git format-patch > and sent by > git send-email > to the

Re: timer API change from kernel 4.9 to 5.0

2020-09-30 Thread Greg KH
On Wed, Sep 30, 2020 at 06:34:07PM +0200, Fabien R wrote: > Hello, > In timer.h of 4.9, struct timer_list contains a field data which is unsigned > long. > In timer.c, call_timer_fn calls the triggered function with data as parameter. > As of 5.0, the field data disappears from struct timer_list

Re: Accessing allocated space in a debugfs file

2020-09-30 Thread Greg KH
On Wed, Sep 30, 2020 at 10:32:05PM +0530, ymdatta wrote: > Hello everyone, > > I am trying to create a debugfs file for exposing some information to the > userspace. (I am exploring on how to use debugfs) > > >From the documentation (Documentation/filesystems/debugfs.txt), i came > across a

Re: memory mapping from user space to kernel space

2020-09-19 Thread Greg KH
On Sat, Sep 19, 2020 at 09:45:33PM +0900, JeongHwan Kim wrote: > Hi, everyone > > > The memory mapping from memory allocated in kernel space to user space is > possible > > to use mmap, but is it possible to map memory allocated in user space to > kernel? It is possible, but very messy and

Re: Computing resources required for kernel development

2020-05-31 Thread Greg KH
On Sun, May 31, 2020 at 11:42:16AM +0530, Harsh chopra wrote: > I used > make -j2 all The number for -j should be at least the number of cores/cpus in your system, and usually double works well. I use -j10 for my tiny laptop and that runs quite nicely. I suggest running the kcbench tool to get

Re: __STDC_VERSION__ : What C dialect c89, c99,gnu90 kernel compiies

2020-05-20 Thread Greg KH
On Wed, May 20, 2020 at 10:30:53AM +0300, Lev R. Oshvang . wrote: > Hi All, > > I am building out of tree kernel module. Did you read the kernel documentation for how to do this? > I am trying to include user-space lib into kernel module You can't do this, sorry, it's not allowed at all,

Re: Invoke Firefox from kernel space

2020-10-22 Thread Greg KH
On Fri, Oct 23, 2020 at 01:35:53AM +0200, Sohaib Mhmd wrote: > Hello, > > I tried to use: call_usermodehelper > It worked fine with > > /sbin/shutdown and /bin/touch > but with /bin/firefox i got kernel oops: >

Re: [PATCH 0/8] dyndbg: WIP diet plan

2020-08-06 Thread Greg KH
On Wed, Aug 05, 2020 at 12:30:15PM -0600, Jim Cromie wrote: > dynamic-debug metadata is bloated; the __dyndbg linker section is > effectively an array of struct _ddebugs, its 1st 3 members are highly > repetetive, with 90%, 84%, 45% repeats. Total reported usage ~150kb > for ~2600 callsites on my

Re: Where to place my driver

2020-06-30 Thread Greg KH
On Tue, Jun 23, 2020 at 10:26:33PM +0200, jaap aarts wrote: > Hello kernel newbies, > > I am currently writing a driver for asetek 6th gen CPU coolers. > Communication to these coolers goes via USB, but 3/4 (but not all!!) > metrics are hwmon metrics. > There is a case for either USB or hwmon but

Re: Are there some potentially serious problems that I should be aware of if I totally disable the CONFIG_ACPI option on the X86_64 platform?

2020-07-01 Thread Greg KH
On Wed, Jul 01, 2020 at 05:15:52PM +0800, 孙世龙 sunshilong wrote: > Hi, list > > Are there some potentially serious problems that I should be aware of > if I totally disable the CONFIG_ACPI option on the X86_64 platform? Yes, your ACPI-based system will not boot. > Would it do harm to the

Re: For a bug in lib/vsprintf.c where should a patch be sent to ?

2020-07-06 Thread Greg KH
On Mon, Jul 06, 2020 at 06:57:34AM +0530, Santosh Sivaraj wrote: > William Tambe writes: > > > On Sun, Jul 5, 2020 at 8:40 PM William Tambe wrote: > >> > >> For a bug in lib/vsprintf.c where should a patch be sent to ? > > > > The bug is in kernel/kallsyms.c instead. > > > > So for a bug in

Re: Kbuild support for rebuilding a single driver gone?

2020-07-07 Thread Greg KH
On Tue, Jul 07, 2020 at 02:22:42PM +0200, Bjørn Mork wrote: > I have "always" tested simple patches by rebuilding just the affected > driver on whatever kernel I happen to run. Like this: Why not ask on the kbuild mailing list? ___ Kernelnewbies

Re: What's tha KOBJ_MAX action used for?

2020-07-13 Thread Greg KH
On Mon, Jul 13, 2020 at 01:17:25PM +0200, Garrit Franke wrote: > Hi all, > > I was wondering, what the KOBJ_MAX action in the kobject.h file does. > It is self explainatory what KOBJ_ADD, KOBJ_REMOVE etc. are used for, but > KOBJ_MAX puzzles me. > > On top of that, it is never referenced

Re: What's tha KOBJ_MAX action used for?

2020-07-14 Thread Greg KH
A: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Greg KH
On Wed, Jun 17, 2020 at 09:58:03AM +0200, Tomek The Messenger wrote: > Hi > Thanks for reply. > We make some proxy layer in linux /sys. So for example we have directories: > /sys/resets > /sys/routers Really? That's a total abuse of sysfs, don't do that. Seriously, that's not ok at all. > etc.

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Greg KH
On Wed, Jun 17, 2020 at 11:17:28AM +0200, Tomek The Messenger wrote: > OK, so I had to wrongly described something because in my company this is > popular approach to use /sys as some abstract layer to get access to > registers. Please do not do that. There are valid kernel apis to grant access

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Greg KH
On Wed, Jun 17, 2020 at 08:24:14AM -0400, Valdis Klētnieks wrote: > On Wed, 17 Jun 2020 12:39:08 +0200, Tomek The Messenger said: > > > OK, I will ask if it is possible to share the code. > > Well... if you planned to ship that code and that hardware outside > your organization, it's going to

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Greg KH
On Wed, Jun 17, 2020 at 04:26:49PM +0200, Tomek The Messenger wrote: > > If we have one unique sysfs interface then it is easier for > > everyone: tester, developer to proceed with such device, testing or > > debugging. > > >>No - not really. Because if you're mapping 3 or 4 SOC resets reasons

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-17 Thread Greg KH
On Wed, Jun 17, 2020 at 02:35:28PM +0200, Martin Kaiser wrote: > Hello Greg and all, > > Thus wrote Greg KH (g...@kroah.com): > > > Please do not do that. There are valid kernel apis to grant access to > > registers easily, > > the most simple case would be a

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Greg KH
On Sat, Jun 27, 2020 at 01:16:50PM +0800, 孙世龙 sunshilong wrote: > >So as per the above - you allocate one struct array at driver load time for > >this stuff. You already know how big the structure/array has to be based on > >the maximum number of devices or whatever you're trying to track. > >And

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Greg KH
On Fri, Jun 26, 2020 at 11:36:05PM +0800, 孙世龙 sunshilong wrote: > Thank you for your attention to this matter. > > >Why are you having so many issues in allocating memory? > I often saw the page allocation failure recently. I must resolve this problem. What code is causing that failure by asking

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-27 Thread Greg KH
On Sat, Jun 27, 2020 at 02:00:50PM +0800, 孙世龙 sunshilong wrote: > Hi, Greg KH > Thank you for your patience and your help. > >What code is causing that failure by asking for memory that you do not > >have? Please fix that up, the core kernel should be fine. > > >

Re: the cost of EXPORT_SYMBOL_GPL

2020-06-16 Thread Greg KH
On Tue, Jun 16, 2020 at 03:18:02PM +0200, Tomek The Messenger wrote: > Hi > I am in the middle of implementation of various external kernel modules. > All kernel modules touch some board specific registers. For example let's > say we have 3 groups of register areas: > #define REG1_ADDR

Re: Advice about the linux kernel development process

2020-06-22 Thread Greg KH
On Sat, Jun 20, 2020 at 04:39:15PM +0200, Oscar Carter wrote: > Hi, > > I've been working in the KSPP task number 20: "Enable -Wcast-function-type > globally" [1] but now I have some questions about the development process. > > I sent a v3 patch for the firewire subsystem [2] and a v5 patch

Re: Are there some potential problems that I should be aware of if I allocate the memory which doesn't have any relation to peripheral hardwares(i.e. DMA, PCI, serial port and etc) by vmalloc() instea

2020-06-26 Thread Greg KH
On Fri, Jun 26, 2020 at 04:30:48PM +0800, 孙世龙 sunshilong wrote: > Hi, list > > Besides kmalloc() is more efficient, are there some potential problems that > I should be aware of if I allocate the memory which doesn't have any > relation to peripheral hardwares(i.e. DMA,PCI,serial port and etc) by

Re: DKMS module and recipe for target '.../virtualbox/5.2.34/build/vboxdrv' failed

2020-06-18 Thread Greg KH
On Thu, Jun 18, 2020 at 01:41:23AM -0400, Jeffrey Walton wrote: > Hi Everyone, > > I recently upgraded Ubuntu 18.04 x86_64 to the 5.4.0-37 kernel. > VirtualBox died, and I am trying to reinstall virtualbox-dkms. The > reinstall fails because the build fails. The log is below. > > Is there

Re: Current Instruction Pointer Along Memory Access for A specific Process

2020-06-08 Thread Greg KH
On Mon, Jun 08, 2020 at 09:28:37PM +0900, Irfan Ullah (울라 이르판) wrote: > Hi everyone, > I am trying to generate the log of instruction pointers (IPs) along with > corresponding memory accesses (including the page faults) in a sequence for > a specific application. I have generated the log of page

Re: test tools to measure performance of the Linux kernel

2020-07-27 Thread Greg KH
On Mon, Jul 27, 2020 at 09:25:15PM +0530, Subhashini Rao Beerisetty wrote: > Hi all, > > I’m having a few Linux x86_64 systems(same hardware configuration) > with different Ubuntu kernels installed on those machines. > > I’m looking for any existing test suite which can be used to measure > the

Re: How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version

2021-01-12 Thread Greg KH
On Tue, Jan 12, 2021 at 07:39:37AM +, Jorge Fernandez Monteagudo wrote: > >> Hi all, this is my first post in this mailing list... I hope to find an > >> answer. I've post the question in stackoverflow with the same tittle with > >> no answers yet. Since then, I've been able to reduce the

Re: How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version

2021-01-11 Thread Greg KH
On Tue, Jan 12, 2021 at 07:21:46AM +, Jorge Fernandez Monteagudo wrote: > Hi all, this is my first post in this mailing list... I hope to find an > answer. I've post the question in stackoverflow with the same tittle with no > answers yet. Since then, I've been able to reduce the demo kernel

Re: How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version

2021-01-12 Thread Greg KH
On Tue, Jan 12, 2021 at 08:26:42AM +, Jorge Fernandez Monteagudo wrote: > >> Well, I can summarize as technological debt :( > >> I have to maintain an old code and I've been succesful until now with > >> minimal changes... Is there no way to overcome this? > > > >There might be, again, do you

Re: How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version

2021-01-12 Thread Greg KH
On Tue, Jan 12, 2021 at 09:12:36AM +, Jorge Fernandez Monteagudo wrote: > >> Well, I don't know if I'm allowed to share the full source code... > >> But, is it not enough with the minimal code I attached to grasp the > >> problem? > > > >I'm not allowed to help vendors with closed source

Re: How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version

2021-01-12 Thread Greg KH
On Tue, Jan 12, 2021 at 09:55:01AM +, Jorge Fernandez Monteagudo wrote: > >Patents have almost nothing to do with licenses, we have many things in > >the Linux kernel that are under a GPLv2 license that have patents issued > >for (and are actively enforced.)  The GPL can, and does, work with

Re: Looking for a good gmail alternative for kernel lists

2020-12-27 Thread Greg KH
On Sun, Dec 27, 2020 at 09:11:39AM +0100, Sebastian Fricke wrote: > Hello, > > I am currently looking for a good (paid) alternative to gmail. I get > more and more problems with gmails authentication policy, as I don't > want to depend on having a phone. And also I have decided that I don't >

Re: PCI / PCIe Device Memory - Rationale for Choosing MMIO Over PMIO (and Visa-Versa)

2020-11-05 Thread Greg KH
On Thu, Nov 05, 2020 at 02:27:58PM +, Jack Winch wrote: > Hi all, > > Over the last couple of months, I've been reading the hardware > documentation and Linux device driver source code for a range of > different PCI and PCIe devices. Those examined range from > multi-function data

Re: /proc/cpuinfo not showing all info

2021-01-18 Thread Greg KH
On Tue, Jan 19, 2021 at 07:38:13AM +, Pankaj Vinodrao Joshi wrote: > i agree each processor type exports different information but i need to pop > up information while i do /proc/cpu also i have observed that almost every > arch display information w.r.t frequency. Can you suggest how i can

Re: /proc/cpuinfo not showing all info

2021-01-19 Thread Greg KH
On Tue, Jan 19, 2021 at 09:08:23AM +, Pankaj Vinodrao Joshi wrote: > sorry for the last mail that i was not able to convey what i was meaning to, > i have noticed for almost all ARCH when i will do $ cat /proc/cpuinfo ,it > will shows all cpu related info including cpu frequency but for my

Re: /proc/cpuinfo not showing all info

2021-01-13 Thread Greg KH
On Wed, Jan 13, 2021 at 09:21:31AM +, Pankaj Vinodrao Joshi wrote: > Hi, > i am using sifive's u540, RISCV64 with custom kernel 5.10.2 and i am trying > to get all hardware information with the help of /proc/cpuinfo but i am not > able get all information i need. > > i am attaching current

Re: get_user_pages and pinning

2021-01-02 Thread Greg KH
On Sat, Jan 02, 2021 at 07:39:08AM -0500, Sadanand Warrier wrote: > Folks >Since Linux uses lazy evaluation with respect to allocating memory > what happens if a user process allocates memory using malloc in excess > of say 8 or nine pages and calls a device ioctl and passes the user > space

Re: why does an in-tree loadable module taint the kernel

2021-06-16 Thread Greg KH
On Tue, Jun 15, 2021 at 12:26:19PM -0600, jim.cro...@gmail.com wrote: > On Tue, Jun 15, 2021 at 10:24 AM Greg KH wrote: > > > > On Tue, Jun 15, 2021 at 10:06:08AM -0600, jim.cro...@gmail.com wrote: > > > On Mon, Jun 14, 2021 at 1:20 AM Greg KH wrote: > > > > &

Re: USB sound card issues

2021-06-08 Thread Greg KH
On Tue, Jun 08, 2021 at 04:20:07PM +0530, Muni Sekhar wrote: > Hi all, > > I am using a USB sound card(snd-usb-audio), and it fails while doing > the audio recording "arecord: pcm_read:2032: read error: Input/output > error". > > What could be the problem? and is there a workaround for this? >

Re: why does an in-tree loadable module taint the kernel

2021-06-15 Thread Greg KH
On Tue, Jun 15, 2021 at 10:06:08AM -0600, jim.cro...@gmail.com wrote: > On Mon, Jun 14, 2021 at 1:20 AM Greg KH wrote: > > > > On Mon, Jun 14, 2021 at 01:09:25AM -0600, jim.cro...@gmail.com wrote: > > > serio_raw is apparently tainting the kernel when its modprobed. &g

Re: why does an in-tree loadable module taint the kernel

2021-06-14 Thread Greg KH
On Mon, Jun 14, 2021 at 01:09:25AM -0600, jim.cro...@gmail.com wrote: > serio_raw is apparently tainting the kernel when its modprobed. > why ? other modules load properly, no code changes to this module > > bash-5.1# dmesg | grep -i taint > [6.517150] serio_raw: module verification failed:

Re: USB sound card issues

2021-06-08 Thread Greg KH
On Tue, Jun 08, 2021 at 05:44:42PM +0530, Muni Sekhar wrote: > On Tue, Jun 8, 2021 at 4:44 PM Greg KH wrote: > > > > On Tue, Jun 08, 2021 at 04:20:07PM +0530, Muni Sekhar wrote: > > > Hi all, > > > > > > I am using a USB sound card(snd-usb-audio)

Re: USB sound card issues

2021-06-08 Thread Greg KH
On Tue, Jun 08, 2021 at 06:15:57PM +0530, Muni Sekhar wrote: > On Tue, Jun 8, 2021 at 6:02 PM Greg KH wrote: > > > > On Tue, Jun 08, 2021 at 05:44:42PM +0530, Muni Sekhar wrote: > > > On Tue, Jun 8, 2021 at 4:44 PM Greg KH wrote: > > > > > > > >

<    5   6   7   8   9   10   11   12   >