Re: [RFC PATCH 0/4] Add specific vt input's key map

2018-09-12 Thread Remi Pommarel
Hi,
 
On Tue, Sep 11, 2018 at 08:47:55PM +0200, Greg Kroah-Hartman wrote:  
> 
> Normally I do not review "RFC" patches as it implies the submitter does
> not think they are a valid solution.  How about resending them as if you
> think this is something ready to be merged?

I had used "RFC" here because I had one or two questions about the
implementation choices I made on those patches and not really on the
solution itself. So, yes, I don't mind sending another round of those
patches without RFC.

Thanks,

-- 
Remi



Re: [RFC PATCH 0/4] Add specific vt input's key map

2018-09-12 Thread Remi Pommarel
Hi,
 
On Tue, Sep 11, 2018 at 08:47:55PM +0200, Greg Kroah-Hartman wrote:  
> 
> Normally I do not review "RFC" patches as it implies the submitter does
> not think they are a valid solution.  How about resending them as if you
> think this is something ready to be merged?

I had used "RFC" here because I had one or two questions about the
implementation choices I made on those patches and not really on the
solution itself. So, yes, I don't mind sending another round of those
patches without RFC.

Thanks,

-- 
Remi



Re: [RFC PATCH 0/4] Add specific vt input's key map

2018-09-11 Thread Greg Kroah-Hartman
On Wed, Sep 05, 2018 at 07:20:23PM +0200, Remi Pommarel wrote:
> Hi,
> 
> Just a gentle ping.
> 
> Any comments on this patchset that adds a way to have multiple
> keyboards with different keymap on a VT would be nice.

Normally I do not review "RFC" patches as it implies the submitter does
not think they are a valid solution.  How about resending them as if you
think this is something ready to be merged?

thanks,

greg k-h


Re: [RFC PATCH 0/4] Add specific vt input's key map

2018-09-11 Thread Greg Kroah-Hartman
On Wed, Sep 05, 2018 at 07:20:23PM +0200, Remi Pommarel wrote:
> Hi,
> 
> Just a gentle ping.
> 
> Any comments on this patchset that adds a way to have multiple
> keyboards with different keymap on a VT would be nice.

Normally I do not review "RFC" patches as it implies the submitter does
not think they are a valid solution.  How about resending them as if you
think this is something ready to be merged?

thanks,

greg k-h


Re: [RFC PATCH 0/4] Add specific vt input's key map

2018-09-05 Thread Remi Pommarel
Hi,

Just a gentle ping.

Any comments on this patchset that adds a way to have multiple
keyboards with different keymap on a VT would be nice.

Thanks

-- 
Remi


Re: [RFC PATCH 0/4] Add specific vt input's key map

2018-09-05 Thread Remi Pommarel
Hi,

Just a gentle ping.

Any comments on this patchset that adds a way to have multiple
keyboards with different keymap on a VT would be nice.

Thanks

-- 
Remi


[RFC PATCH 0/4] Add specific vt input's key map

2018-08-22 Thread Remi Pommarel
This patchset adds a way to have a specific keyboard config (i.e.
keycode to keysym map) for a vt attached input.

Because one can have different keyboards with different layouts on the
same VT, it can be useful to be able to associate a different keymap
with a different input. In order to do so this patchset introduces
three new ioctls:

1) KDGKBIENT
Get an input key map's entry. If the input does not have a
specific key map the requested entry is fetched from global
key map.

2) KDSKBIENT
Set an input key map's entry. If the input does not yet have a
specific key map, a new one is created with the current global
key map content copied in.

3) KDSKBIRST
Reset an input key map. The input does not use a specific key
map anymore and keycode translations are done with global key
map.

In order to keep old behavior compatibility and not waste memory, an
input uses the global key_maps[] array by default and KDGKBENT/KDSKBENT
ioctls still get/set entries in this global key map. The specific key
map is only allocated on the first call to KDSKBIENT.

A patch for loadkeys is ready to be sent to the ML if this patchset
seems sane to you.

Here are some questions I had while doing this patchset:

- Maybe there is a way, I am not aware of, that can allow one to use
  different keyboard layout on same VT ?

- Is it ok to add new ioctl to old legacy code ? I added those ioctl
  the old way in order to match the header style. Maybe it is better to
  use the __IO* macros ?

- Should key_down bitmap be really input specific (i.e. PATCH 3/4) ?

- I am not quite sure about the meaning of keymap_count. IIUC, it is a
  counter of used keymap function arrays statically or dynamically
  allocated. If it is not the case, the modificiation in kc_setent() that
  decrements keymap_count even if a statically keymap function is removed
  with "K_NOSUCHMAP" (in PATCH 2/4) may be wrong ?

- kbd_detach_conf is a bit clumsy because it tries to copy a shared sparse
  pointer array without using GFP_ATOMIC.

- Is this patchset even a sensible idea ?

Remi Pommarel (4):
  drivers/tty/vt/keyboard.c: refactor getting/setting a keymap entry
  drivers/tty/vt/keyboard.c: add keyboard config for each vt's input
  drivers/tty/vt/keyboard.c: Make key_down[] bitmap input dependent
  drivers/tty/vt: add ioctl to manage input specific keyboard configs

 drivers/tty/vt/keyboard.c | 531 ++
 drivers/tty/vt/vt_ioctl.c |   9 +
 fs/compat_ioctl.c |   3 +
 include/linux/vt_kern.h   |   4 +
 include/uapi/linux/kd.h   |   9 +
 5 files changed, 452 insertions(+), 104 deletions(-)

-- 
2.18.0



[RFC PATCH 0/4] Add specific vt input's key map

2018-08-22 Thread Remi Pommarel
This patchset adds a way to have a specific keyboard config (i.e.
keycode to keysym map) for a vt attached input.

Because one can have different keyboards with different layouts on the
same VT, it can be useful to be able to associate a different keymap
with a different input. In order to do so this patchset introduces
three new ioctls:

1) KDGKBIENT
Get an input key map's entry. If the input does not have a
specific key map the requested entry is fetched from global
key map.

2) KDSKBIENT
Set an input key map's entry. If the input does not yet have a
specific key map, a new one is created with the current global
key map content copied in.

3) KDSKBIRST
Reset an input key map. The input does not use a specific key
map anymore and keycode translations are done with global key
map.

In order to keep old behavior compatibility and not waste memory, an
input uses the global key_maps[] array by default and KDGKBENT/KDSKBENT
ioctls still get/set entries in this global key map. The specific key
map is only allocated on the first call to KDSKBIENT.

A patch for loadkeys is ready to be sent to the ML if this patchset
seems sane to you.

Here are some questions I had while doing this patchset:

- Maybe there is a way, I am not aware of, that can allow one to use
  different keyboard layout on same VT ?

- Is it ok to add new ioctl to old legacy code ? I added those ioctl
  the old way in order to match the header style. Maybe it is better to
  use the __IO* macros ?

- Should key_down bitmap be really input specific (i.e. PATCH 3/4) ?

- I am not quite sure about the meaning of keymap_count. IIUC, it is a
  counter of used keymap function arrays statically or dynamically
  allocated. If it is not the case, the modificiation in kc_setent() that
  decrements keymap_count even if a statically keymap function is removed
  with "K_NOSUCHMAP" (in PATCH 2/4) may be wrong ?

- kbd_detach_conf is a bit clumsy because it tries to copy a shared sparse
  pointer array without using GFP_ATOMIC.

- Is this patchset even a sensible idea ?

Remi Pommarel (4):
  drivers/tty/vt/keyboard.c: refactor getting/setting a keymap entry
  drivers/tty/vt/keyboard.c: add keyboard config for each vt's input
  drivers/tty/vt/keyboard.c: Make key_down[] bitmap input dependent
  drivers/tty/vt: add ioctl to manage input specific keyboard configs

 drivers/tty/vt/keyboard.c | 531 ++
 drivers/tty/vt/vt_ioctl.c |   9 +
 fs/compat_ioctl.c |   3 +
 include/linux/vt_kern.h   |   4 +
 include/uapi/linux/kd.h   |   9 +
 5 files changed, 452 insertions(+), 104 deletions(-)

-- 
2.18.0