All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jessica Yu <jeyu@kernel.org>
To: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: jeyu@redhat.com, rusty@rustcorp.com.au, keescook@chromium.org,
	tixxdz@gmail.com, mbenes@suse.cz, atomlin@redhat.com,
	pmladek@suse.com, hare@suse.com, james.l.morris@oracle.com,
	ebiederm@xmission.com, davem@davemloft.net,
	akpm@linux-foundation.org, torvalds@linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: module: add debugging alias parsing support
Date: Thu, 30 Nov 2017 14:17:11 +0100	[thread overview]
Message-ID: <20171130131710.ccccf4alzrnvmlp3@redbean> (raw)
In-Reply-To: <20171130023605.29568-4-mcgrof@kernel.org>

+++ Luis R. Rodriguez [29/11/17 18:36 -0800]:
>Debugging modules can often lead to an alias question. We purposely
>don't have alias parsing support upstream as this is all dealt with
>in userpace with the assumption that in-kernel we just process aliases
>and userspace Does The Right Thing (TM) about aliases.
>
>Obviously userspace can be buggy though, and it can lie to us. We
>currently have no easy way to determine this. Parsing aliases is
>an example debugging facility we can use to help with these sorts
>of problems.
>
>You can debug by adding to your dynamic debug:
>
>GRUB_CMDLINE_LINUX_DEFAULT="dyndbg=\"func module_process_aliases +p;\" "
>
>Upon boot for example here a few entries:
>
>module ext4 num_aliases: 5
>alias[0] = fs-ext4
>alias[1] = ext3
>alias[2] = fs-ext3
>alias[3] = ext2
>alias[4] = fs-ext2
>
>module xfs num_aliases: 1
>alias[0] = fs-xfs
>
>module floppy num_aliases: 3
>alias[0] = block-major-2-*
>alias[1] = acpi*:PNP0700:*
>alias[2] = pnp:dPNP0700*
>
>module ata_piix num_aliases: 89
>alias[0] = pci:v00008086d00008C81sv*sd*bc*sc*i*
>alias[1] = pci:v00008086d00008C80sv*sd*bc*sc*i*
>alias[2] = pci:v00008086d00008C89sv*sd*bc*sc*i*
>alias[3] = pci:v00008086d00008C88sv*sd*bc*sc*i*
>... etc ...
>
>Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
>Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>

Hi Luis,

Just some quick questions - are there any plans to use these in-kernel
module aliases anywhere else? Or are you using them just for debugging?

And if it's only for debugging, what's the benefit of printing the
aliases in-kernel when one could already use modinfo to print the
exact same information (namely, in-kernel module name, which was
recently added by Kees, + aliases)? We're essentially parsing the
.modinfo section of the module binary in two different places, just
that this patchset does it in-kernel and modinfo does it from
userspace, so I'm curious why we want to bring this into the kernel as
well without any additional users..

Thanks!

Jessica

  reply	other threads:[~2017-11-30 13:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30  2:36 [PATCH 0/3] module: process aliasing when debugging Luis R. Rodriguez
2017-11-30  2:36 ` [PATCH 1/3] module: use goto errors on check_modinfo() and layout_and_allocate() Luis R. Rodriguez
2017-11-30  2:36 ` [PATCH 2/3] module: add helper get_modinfo_idx() Luis R. Rodriguez
2017-11-30  2:36 ` [PATCH 3/3] module: add debugging alias parsing support Luis R. Rodriguez
2017-11-30 13:17   ` Jessica Yu [this message]
2017-11-30 18:39     ` Luis R. Rodriguez
2017-12-04  9:01       ` Djalal Harouni
2017-12-04 13:58         ` Jessica Yu
2017-12-04 14:17           ` Djalal Harouni
2017-12-07 19:51         ` Luis R. Rodriguez
2018-03-10 14:09 ` [PATCH 0/3] module: process aliasing when debugging Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171130131710.ccccf4alzrnvmlp3@redbean \
    --to=jeyu@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=hare@suse.com \
    --cc=james.l.morris@oracle.com \
    --cc=jeyu@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mcgrof@kernel.org \
    --cc=pmladek@suse.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tixxdz@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.